]> Pileus Git - ~andy/fetchmail/blobdiff - fetchmail.man
Before the IDLE patch.
[~andy/fetchmail] / fetchmail.man
index f2ed39f75d415fbe6bfd67f64c9311f119cb6569..3a5e29bbd26a211667190d8cfd6e467f53a45a71 100644 (file)
@@ -6,27 +6,27 @@
 .\" For license terms, see the file COPYING in this directory.
 .TH fetchmail 1
 .SH NAME
-fetchmail \- fetch mail from a POP, IMAP, or ETRN-capable server
+fetchmail \- fetch mail from a POP, IMAP, ETRN, or ODMR-capable server
 
 .SH SYNOPSIS
-\fBfetchmail\fR [\fIoptions\fR] [\fImailserver...\fR]
+\fBfetchmail\fR [\fIoption...\fR] [\fImailserver...\fR]
 .br
 \fBfetchmailconf\fR
 
 .SH DESCRIPTION
 .I fetchmail
-is a mail-retrieval and forwarding utility; it fetches
-mail from remote mailservers and forwards it to your local (client)
-machine's delivery system.  You can then handle the retrieved mail
-using normal mail user agents such as \fIelm\fR(1) or \fIMail\fR(1).
-The \fBfetchmail\fR utility can be run in a daemon mode to repeatedly
+is a mail-retrieval and forwarding utility; it fetches mail from
+remote mailservers and forwards it to your local (client) machine's
+delivery system.  You can then handle the retrieved mail using normal
+mail user agents such as \fImutt\fR(1), \fIelm\fR(1) or \fIMail\fR(1).
+The \fIfetchmail\fR utility can be run in a daemon mode to repeatedly
 poll one or more systems at a specified interval.
 .PP
 The
 .I fetchmail
 program can gather mail from servers supporting any of the common
 mail-retrieval protocols: POP2, POP3, IMAP2bis, IMAP4, and IMAPrev1.
-It can also use the ESMTP ETRN extension.  (The RFCs describing all
+It can also use the ESMTP ETRN extension and ODMR.  (The RFCs describing all
 these protocols are listed at the end of this manual page.)
 .PP
 While
@@ -46,6 +46,15 @@ delivery-control mechanisms (such as \fI.forward\fR files) normally
 available through your system MDA and local delivery agents will
 therefore work.
 .PP
+If no port 25 listener is available, but your fetchmail configuration
+was told about a reliable local MDA, it will use that MDA for local
+delivery instead.  At build time, fetchmail normally looks for
+executable
+.IR procmail (1)
+and 
+.IR sendmail (1)
+binaries.
+.PP
 If the program
 .I fetchmailconf
 is available, it will assist you in setting up and editing a
@@ -85,16 +94,16 @@ working \fI.fetchmailrc\fR file set up.
 .PP
 Almost all options have a corresponding keyword which can be used to
 declare them in a 
-.I fetchmailrc
+.I .fetchmailrc
 file.
 .PP
 Some special options are not covered here, but are documented instead
 in sections on AUTHENTICATION and DAEMON MODE which follow.
 .SS General Options
 .TP
-.B \-V, --version
+.B \-V | \-\-version
 Displays the version information for your copy of 
-.I fetchmail.
+.IR fetchmail .
 No mail fetch is performed.
 Instead, for each server specified, all the option information
 that would be computed if
@@ -104,63 +113,65 @@ passwords or other string names are shown as backslashed C-like
 escape sequences.  This option is useful for verifying that your
 options are set the way you want them.
 .TP
-.B \-c, --check
+.B \-c | \-\-check
 Return a status code to indicate whether there is mail waiting,
 without actually fetching or deleting mail (see EXIT CODES below).
 This option turns off daemon mode (in which it would be useless).  It
 doesn't play well with queries to multiple sites, and doesn't work
-with ETRN.  It will return a false positive if you leave read but
+with ETRN or ODMR.  It will return a false positive if you leave read but
 undeleted mail in your server mailbox and your fetch protocol can't
 tell kept messages from new ones.  This means it will work with IMAP,
 not work with POP2, and may occasionally flake out under POP3.
 .TP
-.B \-s, --silent
+.B \-s | \-\-silent
 Silent mode.  Suppresses all progress/status messages that are
 normally echoed to standard error during a fetch (but does not
 suppress actual error messages).  The --verbose option overrides this.
 .TP
-.B \-v, --verbose
+.B \-v | \-\-verbose
 Verbose mode.  All control messages passed between 
 .I fetchmail
-and the mailserver are echoed to stderr.  Overrides --silent.
+and the mailserver are echoed to stdout.  Overrides --silent.
 Doubling this option (-v -v) causes extra diagnostic information
 to be printed. 
 .SS Disposal Options
 .TP
-.B \-a, --all
+.B \-a | \-\-all
 (Keyword: fetchall)
 Retrieve both old (seen) and new messages from the mailserver.  The
 default is to fetch only messages the server has not marked seen.
 Under POP3, this option also forces the use of RETR rather than TOP.
 Note that POP2 retrieval behaves as though --all is always on (see
-RETRIEVAL FAILURE MODES below) and this option does not work with ETRN.
+RETRIEVAL FAILURE MODES below) and this option does not work with ETRN
+or ODMR.
 .TP
-.B \-k, --keep
+.B \-k | \-\-keep
 (Keyword: keep)
 Keep retrieved messages on the remote mailserver.  Normally, messages 
 are deleted from the folder on the mailserver after they have been retrieved.
 Specifying the 
 .B keep 
 option causes retrieved messages to remain in your folder on the
-mailserver.  This option does not work with ETRN.
+mailserver.  This option does not work with ETRN or ODMR.
 .TP
-.B \-K, --nokeep
+.B \-K | \-\-nokeep
 (Keyword: nokeep)
 Delete retrieved messages from the remote mailserver.  This
 option forces retrieved mail to be deleted.  It may be useful if
 you have specified a default of \fBkeep\fR in your
-\&\fI.fetchmailrc\fR.  This option is forced on with ETRN.
+\&\fI.fetchmailrc\fR.  This option is forced on with ETRN and ODMR.
 .TP
-.B \-F, --flush
+.B \-F | \-\-flush
 POP3/IMAP only.  Delete old (previously retrieved) messages from the mailserver
-before retrieving new messages. This option does not work with ETRN.
+before retrieving new messages. This option does not work with ETRN or
+ODMR.
 Warning: if your local MTA hangs and fetchmail is aborted, the next
 time you run fetchmail, it will delete mail that was never delivered to you.
 What you probably want is the default setting: if you don't specify `-k', then
 fetchmail will automatically delete messages after successful delivery.
 .SS Protocol and Query Options
 .TP
-.B \-p, \--protocol <proto>
+.B \-p <proto> | \-\-protocol <proto>
 (Keyword: proto[col])
 Specify the protocol to use when communicating with the remote 
 mailserver.  If no protocol is specified, the default is AUTO.
@@ -175,60 +186,55 @@ Post Office Protocol 2
 .IP POP3
 Post Office Protocol 3
 .IP APOP
-Use POP3 with MD5 authentication.
+Use POP3 with old-fashioned MD5-challenge authentication.
 .IP RPOP
 Use POP3 with RPOP authentication.
 .IP KPOP
-Use POP3 with Kerberos V4 preauthentication on port 1109.
+Use POP3 with Kerberos V4 authentication on port 1109.
 .IP SDPS
 Use POP3 with Demon Internet's SDPS extensions.
 .IP IMAP
 IMAP2bis, IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities).
-.IP IMAP-K4
-IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities)
-with RFC 1731 Kerberos v4 preauthentication.
-.IP IMAP-GSS
-IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities)
-with RFC 1731 GSSAPI preauthentication.
-.IP IMAP-CRAMMD5
-IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities)
-with RFC 2195 CRAM-MD5 authentication.
-.IP IMAP-LOGIN
-IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities)
-with plain LOGIN authentication only, even if the server supports
-better methods.
 .IP ETRN
 Use the ESMTP ETRN option.
+.IP ODMR
+Use the the On-Demand Mail Relay ESMTP profile.
 .RE
 .P
 All these alternatives work in basically the same way (communicating
 with standard server daemons to fetch mail already delivered to a
-mailbox on the server) except ETRN.  The ETRN mode allows you to ask a
-compliant ESMTP server (such as BSD sendmail at release 8.8.0 or
-higher) to immediately open a sender-SMTP connection to your
-client machine and begin forwarding any items addressed to your client
-machine in the server's queue of undelivered mail.
+mailbox on the server) except ETRN and ODMR.  The ETRN mode
+allows you to ask a compliant ESMTP server (such as BSD sendmail at
+release 8.8.0 or higher) to immediately open a sender-SMTP connection
+to your client machine and begin forwarding any items addressed to
+your client machine in the server's queue of undelivered mail.   The
+ODMR mode requires an ODMR-capable server and works similarly to
+ETRN, except that it does not require the client machine to have
+a static DNS.
 .TP
-.B \-U, --uidl
+.B \-U | \-\-uidl
 (Keyword: uidl)
 Force UIDL use (effective only with POP3).  Force client-side tracking
 of `newness' of messages (UIDL stands for ``unique ID listing'' and is
 described in RFC1725).  Use with `keep' to use a mailbox as a baby
-news drop for a group of users.
+news drop for a group of users. The fact that seen messages are skipped
+is logged, unless error logging is done through syslog while running in
+daemon mode.
+
 .TP
-.B \-P, --port <portnumber>
+.B \-P <portnumber> | \-\-port <portnumber>
 (Keyword: port)
 The port option permits you to specify a TCP/IP port to connect on. 
 This option will seldom be necessary as all the supported protocols have
 well-established default port numbers.
 .TP
-.B \--principal <principal>
+.B \-\-principal <principal>
 (Keyword: principal)
 The principal option permits you to specify a service principal for
 mutual authentication.  This is applicable to POP3 or IMAP with Kerberos
 authentication.
 .TP 
-.B \-t, --timeout <seconds>
+.B \-t <seconds> | -\-timeout <seconds>
 (Keyword: timeout)
 The timeout option allows you to set a server-nonresponse
 timeout in seconds.  If a mailserver does not send a greeting message
@@ -239,43 +245,52 @@ down host.  This would be particularly annoying for a \fIfetchmail\fR
 running in background.  There is a default timeout which fetchmail -V
 will report.  If a given connection receives too many timeouts in 
 succession, fetchmail will consider it wedged and stop retrying,
-the calkling user will be notified by email if this happens.
+the calling user will be notified by email if this happens.
 .TP
-.B \--plugin <command>
+.B \-\-plugin <command>
 (Keyword: plugin) The plugin option allows you to use an external
 program to establish the TCP connection.  This is useful if you want
 to use socks, SSL, ssh, or need some special firewalling setup.  The
 program will be looked up in $PATH and can optionally be passed the
 hostname and port as arguments using "%h" and "%p" respectively (note
-that the interpolation logic is rather promitive, and these token must
+that the interpolation logic is rather primitive, and these token must
 be bounded by whitespace or beginning of string or end of string).
 Fetchmail will write to the plugin's stdin and read from the plugin's
 stdout.
 .TP
-.B \--plugout <command>
+.B \-\-plugout <command>
 (Keyword: plugout)
 Identical to the plugin option above, but this one is used for the SMTP
 connections (which will probably not need it, so it has been separated
 from plugin).
 .TP
-.B \-r <name>, --folder <name>
+.B \-r <name> | \-\-folder <name>
 (Keyword: folder[s])
 Causes a specified non-default mail folder on the mailserver (or
 comma-separated list of folders) to be retrieved.  The syntax of the
 folder name is server-dependent.  This option is not available under
-POP3 or ETRN.
+POP3, ETRN, or ODMR.
+.TP
+.B \-\-tracepolls
+(Keyword: tracepolls)
+Tell fetchail to poll trace information in the form `polling %s
+account %s' to the Received line it generates, where the %s parts are
+replaced by the user's remote name and the poll label (the Received
+header also normally includes the server's truename).  This can be
+used to facilate mail filtering based on the account it is being
+received from.
 .TP
-.B \--ssl
+.B \-\-ssl
 (Keyword: ssl)
 Causes the connection to the mail server to be encrypted via SSL.  Connect
 to the server using the specified base protocol over a connection secured
 by SSL.  SSL support must be present at the server.  If no port is
 specified, the connection is attempted to the well known port of the SSL
 version of the base protocol.  This is generally a different port than the
-port used by the base protocol.  For imap, this is port 143 for the clear
+port used by the base protocol.  For IMAP, this is port 143 for the clear
 protocol and port 993 for the SSL secured protocol.
 .TP
-.B \--sslcert <name>
+.B \-\-sslcert <name>
 (Keyword: sslcert)
 Specifies the file name of the client side public SSL certificate.  Some
 SSL encrypted servers may require client side keys and certificates for
@@ -288,7 +303,7 @@ servers may not request it at all.  It may be the same file
 as the private key (combined key and certificate file) but this is not
 recommended.
 .TP
-.B \--sslkey <name>
+.B \-\-sslkey <name>
 (Keyword: sslkey)
 Specifies the file name of the client side private SSL key.  Some SSL
 encrypted servers may require client side keys and certificates for
@@ -302,71 +317,115 @@ as the public key (combined key and certificate file) but this is not
 recommended.  If a password is required to unlock the key, it will be
 prompted for at the time just prior to establishing the session to the
 server.  This can cause some complications in daemon mode.
+.TP
+.B \-\-sslproto <name>
+(Keyword: sslproto)
+Forces an ssl protocol. Possible values are \&`\fBssl2\fR', `\fBssl3\fR' and
+`\fBtls1\fR'. Try this if the default handshake does not work for your server.
+.TP
+.B \-\-sslcertck
+(Keyword: sslcertck)
+Causes fetchmail to strictly check the server certificate against a set of
+local trusted certificates (see the \fBsslcertpath\fR option). If the server
+certificate is not signed by one of the trusted ones (directly or indirectly),
+the SSL connection will fail. This checking should prevent man-in-the-middle
+attacks against the SSL connection. Note that CRLs are seemingly not currently
+supported by OpenSSL in certificate verification! Your system clock should
+be reasonably accurate when using this option!
+.TP
+.B \-\-sslcertpath <directory>
+(Keyword: sslcertpath)
+Sets the directory fetchmail uses to look up local certificates. The default
+is your OpenSSL default one. The directory must be hashed as OpenSSL expects
+it - every time you add or modify a certificate in the directory, you need
+to use the \fBc_rehash\fR tool (which comes with OpenSSL in the tools/
+subdirectory).
+.TP
+.B \-\-sslfingerprint
+(Keyword: sslfingerprint)
+Specify the fingerprint of the server key (an MD5 hash of the key) in
+hexadecimal notation with colons separating groups of two digits. The letter
+hex digits must be in upper case. This is the default format OpenSSL uses,
+and the one fetchmail uses to report the fingerprint when an SSL connection
+is established. When this is specified, fetchmail will compare the server key
+fingerprint with the given one, and the connection will fail if they do not
+match. This can be used to prevent man-in-the-middle attacks.
 .SS Delivery Control Options
 .TP
-.B \-S <hosts>, --smtphost <hosts>
+.B \-S <hosts> | \-\-smtphost <hosts>
 (Keyword: smtp[host])
 Specify a hunt list of hosts to forward mail to (one or more
-hostnames, comma-separated).  In ETRN mode, set the host that the
-mailserver is asked to ship mail to.  Hosts are tried in list order;
-the first one that is up becomes the forwarding or ETRN target for the
-current run.  Normally, `localhost' is added to the end of the list as
-an invisible default.  However, when using ETRN mode or Kerberos
-preauthentication, the FQDN of the machine running fetchmail is added to
-the end of the list as an invisible default. Each hostname may have a 
-port number following the host name.  The port number is separated from
-the host name by a slash; the default port is 25 (or ``smtp'' under IPv6).
-If you specify an absolute pathname (beginning with a /), it will be
+hostnames, comma-separated). Hosts are tried in list order; the first
+one that is up becomes the forwarding target for the current run.
+Normally, `localhost' is added to the end of the list as an invisible
+default.  However, when using Kerberos authentication, the FQDN of the
+machine running fetchmail is added to the end of the list as an
+invisible default. Each hostname may have a port number following the
+host name.  The port number is separated from the host name by a
+slash; the default port is 25 (or ``smtp'' under IPv6).  If you
+specify an absolute pathname (beginning with a /), it will be
 interpreted as the name of a UNIX socket accepting LMTP connections
 (such as is supported by the Cyrus IMAP daemon) Example:
-
+.sp
+.nf
        --smtphost server1,server2/2525,server3,/var/imap/socket/lmtp
-
+.fi
+.sp
+This option can be used with ODMR, and will make fetchmail a relay
+between the ODMR server and SMTP or LMTP receiver.
+.TP 
+.B \-\-fetchdomains <hosts>
+(Keyword: fetchdomains)
+In ETRN or ODMR mode, this option specifies the list of domains the
+server should ship mail for once the connection is turned around.  The
+default is the FQDN of the machine running 
+.IR fetchmail .
 .TP
-.B \-D <domain>, --smtpaddress <domain>
-(Keyword: smtpaddress) 
-Specify the domain to be put in RCPT TO lines shipped to SMTP. The
-name of the SMTP server (as specified by --smtphost, or defaulted to
-"localhost") is used when this is not specified.
+.B \-D <domain> | \-\-smtpaddress <domain>
+(Keyword: smtpaddress) Specify the domain to be appended to addresses
+in RCPT TO lines shipped to SMTP. The name of the SMTP server (as
+specified by --smtphost, or defaulted to "localhost") is used when
+this is not specified.
 .TP
-.B --smtpname <user@domain>
+.B \-\-smtpname <user@domain>
 (Keyword: smtpname) 
 Specify the domain and user to be put in RCPT TO lines shipped to SMTP.
 The default user is the current local user.
 .TP
-.B \-Z <nnn>, --antispam <nnn[, nnn]...>
+.B \-Z <nnn> | \-\-antispam <nnn[, nnn]...>
 (Keyword: antispam) 
 Specifies the list of numeric SMTP errors that are to be interpreted
 as a spam-block response from the listener.  A value of -1 disables
 this option.  For the command-line option, the list values should
 be comma-separated.
 .TP
-.B \-m <command>, \--mda <command>
+.B \-m <command> | \-\-mda <command>
 (Keyword: mda)
 You can force mail to be passed to an MDA directly (rather than
-forwarded to port 25) with the -mda or -m option.  Be aware that this
-disables some valuable resource-exhaustion checks and error handling
-provided by SMTP listeners; it's not a good idea unless running an
-SMTP listener is impossible.  If \fIfetchmail\fR is running as root,
-it sets its userid to that of the target user while delivering mail
-through an MDA.  Some possible MDAs are "/usr/sbin/sendmail -oem -f %F
-%T", "/usr/bin/deliver" and "/usr/bin/procmail -d %T" (but the latter
-is usually redundant as it's what SMTP listeners usually forward
-to).  Local delivery addresses will be inserted into the MDA command
-wherever you place a %T; the mail message's From address will be
-inserted where you place an %F.  Do \fInot\fR use an MDA invocation
-like "sendmail -oem -t" that dispatches on the contents of To/Cc/Bcc,
-it will create mail loops and bring the just wrath of many postmasters
-down upon your head.
+forwarded to port 25) with the --mda or -m option.  To avoid losing
+mail, use this option only with MDAs like procmail or sendmail that
+return a nonzero status on disk-full and other resource-exhaustion
+errors; the nonzero status tells fetchmail that delivery failed and
+prevents the message from being deleted off the server.  If
+\fIfetchmail\fR is running as root, it sets its userid to that of the
+target user while delivering mail through an MDA.  Some possible MDAs
+are "/usr/sbin/sendmail -i -f %F %T", "/usr/bin/deliver" and
+"/usr/bin/procmail -d %T" (but the latter is usually redundant as it's
+what SMTP listeners normally forward to).  Local delivery addresses
+will be inserted into the MDA command wherever you place a %T; the
+mail message's From address will be inserted where you place an %F.
+Do \fInot\fR use an MDA invocation like "sendmail -i -t" that
+dispatches on the contents of To/Cc/Bcc, it will create mail loops and
+bring the just wrath of many postmasters down upon your head.
 .TP 
-.B \--lmtp
+.B \-\-lmtp
 (Keyword: lmtp)
 Cause delivery via LMTP (Local Mail Transfer Protocol).  A service
 port \fImust\fR be explicitly specified (with a slash suffix) on each
-host in the smtphost hunt list) if this option is selected; the
+host in the smtphost hunt list if this option is selected; the
 default port 25 will (in accordance with RFC 2033) not be accepted.
 .TP
-.B \--bsmtp <filename>
+.B \-\-bsmtp <filename>
 (keyword: bsmtp)
 Append fetched mail to a BSMTP file.  This simply contains the SMTP
 commands that would normally be generated by fetchmail when passing
@@ -377,7 +436,7 @@ correct; the caveats discussed under THE USE AND ABUSE OF MULTIDROP
 MAILBOXES below apply.
 .SS Resource Limit Control Options
 .TP
-.B \-l <maxbytes>, --limit <maxbytes>
+.B \-l <maxbytes> | \-\-limit <maxbytes>
 (Keyword: limit)
 Takes a maximum octet size argument.  Messages larger than this size
 will not be fetched and will be left on the server (in foreground
@@ -388,9 +447,9 @@ explicit --limit of 0 overrides any limits set in your run control
 file. This option is intended for those needing to strictly control
 fetch time due to expensive and variable phone rates.  In daemon mode,
 oversize notifications are mailed to the calling user (see the
---warnings option).  This option does not work with ETRN.
+--warnings option).  This option does not work with ETRN or ODMR.
 .TP
-.B \-w <interval>, --warnings <interval>
+.B \-w <interval> | \-\-warnings <interval>
 (Keyword: warnings)
 Takes an interval in seconds.  When you call
 .I fetchmail
@@ -402,7 +461,7 @@ the oversized message is detected.  Thereafter, renotification is
 suppressed until after the warning interval elapses (it will take
 place at the end of the first following poll).
 .TP
-.B -b <count>, --batchlimit <count>
+.B \-b <count> | \-\-batchlimit <count>
 (Keyword: batchlimit)
 Specify the maximum number of messages that will be shipped to an SMTP
 listener before the connection is deliberately torn down and rebuilt
@@ -410,22 +469,20 @@ listener before the connection is deliberately torn down and rebuilt
 overrides any limits set in your run control file.  While
 \fBsendmail\fR(8) normally initiates delivery of a message immediately
 after receiving the message terminator, some SMTP listeners are not so
-prompt.  MTAs like \fIqmail\fR(8) and \fIsmail\fR(8) may wait till the
+prompt.  MTAs like \fIsmail\fR(8) may wait till the
 delivery socket is shut down to deliver.  This may produce annoying
-delays when
-.I fetchmail
-is processing very large batches.  Setting the batch limit to some
-nonzero size will prevent these delays.
-This option does not work with ETRN.
+delays when \fIfetchmail\fR is processing very large batches.  Setting
+the batch limit to some nonzero size will prevent these delays.  This
+option does not work with ETRN or ODMR.
 .TP
-.B -B <number>, --fetchlimit <number>
+.B \-B <number> | \-\-fetchlimit <number>
 (Keyword: fetchlimit)
 Limit the number of messages accepted from a given server in a single
 poll.  By default there is no limit. An explicit --fetchlimit of 0
 overrides any limits set in your run control file.
-This option does not work with ETRN.
+This option does not work with ETRN or ODMR.
 .TP
-.B -e <count>, --expunge <count>
+.B \-e <count> | \-\-expunge <count>
 (keyword: expunge) 
 Arrange for deletions to be made final after a given number of
 messages.  Under POP2 or POP3, fetchmail cannot make deletions final
@@ -441,23 +498,26 @@ connection to the server is flaky and expensive, as it avoids
 resending duplicate mail after a line hit.  However, on large
 mailboxes the overhead of re-indexing after every message can slam the
 server pretty hard, so if your connection is reliable it is good to do
-expunges less frequently.  If you specify this option to an integer N,
+expunges less frequently.  Also note that some servers enforce a delay
+of a few seconds after each quit, so fetchmail may not be able to get
+back in immediately after an expunge -- you may see "lock busy" errors
+if this happens. If you specify this option to an integer N,
 it tells
 .I fetchmail
 to only issue expunges on every Nth delete.  An argument of zero
 suppresses expunges entirely (so no expunges at all will be done until
-the end of run).  This option does not work with ETRN.
+the end of run).  This option does not work with ETRN or ODMR.
 .SS Authentication Options
 .TP
-.B \-u <name>, --username <name>
+.B \-u <name> | \-\-username <name>
 (Keyword: user[name])
 Specifies the user identification to be used when logging in to the mailserver.
 The appropriate user identification is both server and user-dependent.  
 The default is your login name on the client machine that is running 
-.I fetchmail.
+.IR fetchmail .
 See USER AUTHENTICATION below for a complete description.
 .TP
-.B \-I <specification>, --interface <specification>
+.B \-I <specification> | \-\-interface <specification>
 (Keyword: interface)
 Require that a specific interface device be up and have a specific local
 or remote IP address (or range) before polling.  Frequently
@@ -472,7 +532,9 @@ intervals).  The --interface option may be used to prevent this.  When
 the specified link is not up or is not connected to a matching IP
 address, polling will be skipped.  The format is:
 .sp
+.nf
        interface/iii.iii.iii.iii/mmm.mmm.mmm.mmm
+.fi
 .sp
 The field before the first slash is the interface name (i.e. sl0, ppp0
 etc.).  The field before the second slash is the acceptable IP address.
@@ -483,7 +545,7 @@ under Linux and FreeBSD. Please see the
 .B monitor 
 section for below for FreeBSD specific information.
 .TP
-.B \-M <interface>, --monitor <interface>
+.B \-M <interface> | --monitor <interface>
 (Keyword: monitor)
 Daemon mode can cause transient links which are automatically taken down
 after a period of inactivity (e.g. PPP links) to remain up
@@ -503,37 +565,42 @@ fetchmail runs with the effective GID set to that of the kmem group
 .I only
 when interface data is being collected.
 .TP
-.B --preauth <type>
-(Keyword: preauth[enticate]) 
-This option permits you to specify a preauthentication type (see USER
-AUTHENTICATION below for details).  The possible values are
+.B \-\-auth <type>
+(Keyword: auth[enticate])
+This option permits you to specify aauthentication type (see USER
+AUTHENTICATION below for details).  The possible values are \fBany\fR,
 \&`\fBpassword\fR', `\fBkerberos_v5\fR' and `\fBkerberos\fR' (or, for
-excruciating exactness, `\fBkerberos_v4\fR'), and \fBssh\fR.  Use
-\fBssh\fR to suppress fetchmail's normal inquiry for a password when
-you are using an end-to-end secure connection such as an ssh tunnel.
-Other values of this option are provided primarily for developers;
-choosing KPOP protocol automatically selects Kerberos
-preauthentication, and all other alternatives use password
-authentication (though APOP uses a generated one-time key as the
-password and IMAP-K4 uses RFC1731 Kerberos v4 authentication).  This
-option does not work with ETRN.
+excruciating exactness, `\fBkerberos_v4\fR'), \fRgssapi\fR,
+\fIcram-md5\fR, \fIotp\fR, \fIntlm\fR, and \fBssh\fR.  When \fBany\fR (the
+default) is specified, fetchmail tries first methods that don't
+require a password (GSSAPI, KERBEROS_IV); then it looks for methods
+that mask your password (CRAM-MD5, X-OTP, NTLM); and only if the server
+doesn't support any of those will it ship your password en clair.
+Other values may be used to force various authentication methods
+(\fBssh\fR suppresses authentication).  Any value other than
+\fIpassword\fR, \fIcram-md5\fR, \fIntlm\fR or \fIotp\fR suppresses fetchmail's
+normal inquiry for a password.  Specify \fIssh\fR when you are using
+an end-to-end secure connection such as an ssh tunnel; specify
+\fRgssapi\fR or \fBkerberos_v4\fR if you are using a protocol variant
+that employs GSSAPI or K4.  Choosing KPOP protocol automatically
+selects Kerberos authentication.  This option does not work with ETRN.
 .SS Miscellaneous Options
 .TP
-.B \-f <pathname>, --fetchmailrc <pathname>
+.B \-f <pathname> | \-\-fetchmailrc <pathname>
 Specify a non-default name for the 
-.I .fetchmailrc
+.I ~/.fetchmailrc
 run control file.  The pathname argument must be either "-" (a single
 dash, meaning to read the configuration from standard input) or a
 filename.  Unless the --version option is also on, a named file
 argument must have permissions no more open than 0600 (u=rw,g=,o=) or
 else be /dev/null.
 .TP
-.B \-i <pathname>, --idfile <pathname>
+.B \-i <pathname> | \-\-idfile <pathname>
 (Keyword: idfile)
 Specify an alternate name for the .fetchids file used to save POP3
 UIDs. 
 .TP
-.B \-n, --norewrite
+.B \-n | \-\-norewrite
 (Keyword: no rewrite)
 Normally,
 .I fetchmail
@@ -546,9 +613,9 @@ client machine!).  This option disables the rewrite.  (This option is
 provided to pacify people who are paranoid about having an MTA edit
 mail headers and want to know they can prevent it, but it is generally
 not a good idea to actually turn off rewrite.)
-When using ETRN, the rewrite option is ineffective.
+When using ETRN or ODMR, the rewrite option is ineffective.
 .TP
-.B -E <line>, --envelope <line>
+.B \-E <line> | \-\-envelope <line>
 (Keyword: envelope)
 This option changes the header 
 .I fetchmail
@@ -560,7 +627,7 @@ Received lines.  This is the default, and it should not be necessary
 unless you have globally disabled Received parsing with `no envelope'
 in the \fI.fetchmailrc\fR file.
 .TP
-.B -Q <prefix>, --qvirtual <prefix>
+.B \-Q <prefix> | \-\-qvirtual <prefix>
 (Keyword: qvirtual)
 The string prefix assigned to this option will be removed from the user
 name found in the header specified with the \fIenvelope\fR option
@@ -579,10 +646,11 @@ line.  The major reason for this is to prevent mail loops.  To set up
 qmail to batch mail for a disconnected site the ISP-mailhost will have
 normally put that site in its `Virtualhosts' control file so it will
 add a prefix to all mail addresses for this site. This results in mail
-sent to 'username@userhost.userdom.dom.com' having a
+.\" The \&@\& tries to stop HTML converters from making a mailto URL here.
+sent to 'username\&@\&userhost.userdom.dom.com' having a
 \&`Delivered-To:' line of the form:
 .sp
-Delivered-To: mbox-userstr-username@userhost.userdom.dom.com
+Delivered-To: mbox-userstr-username\&@\&userhost.userdom.dom.com
 .sp
 The ISP can make the 'mbox-userstr-' prefix anything they choose
 but a string matching the user host name is likely.
@@ -604,7 +672,7 @@ editor like
 written in Python.
 
 .SH USER AUTHENTICATION AND ENCRYPTION
-Every mode except ETRN requires authentication of the client.
+All modes except ETRN require authentication of the client to the server.
 Normal user authentication in 
 .I fetchmail
 is very much like the authentication mechanism of 
@@ -614,14 +682,14 @@ system at the mailserver.
 .PP
 If the mailserver is a Unix machine on which you have an ordinary user 
 account, your regular login name and password are used with 
-.I fetchmail.
+.IR fetchmail .
 If you use the same login name on both the server and the client machines,
 you needn't worry about specifying a user-id with the 
 .B \-u
-option \-\- 
-the default behavior is to use your login name on the client machine as the 
-user-id on the server machine.  If you use a different login name
-on the server machine, specify that login name with the
+option \-\- the default behavior is to use your login name on the
+client machine as the user-id on the server machine.  If you use a
+different login name on the server machine, specify that login name
+with the
 .B \-u
 option.  e.g. if your login name is 'jsmith' on a machine named 'mailgrunt',
 you would start 
@@ -645,16 +713,16 @@ in daemon mode or with scripts.
 If you do not specify a password, and
 .I fetchmail
 cannot extract one from your
-.I .fetchmailrc
+.I ~/.fetchmailrc
 file, it will look for a 
-.I .netrc
+.I ~/.netrc
 file in your home directory before requesting one interactively; if an
 entry matching the mailserver is found in that file, the password will
 be used.  Fetchmail first looks for a match on poll name; if it finds none,
 it checks for a match on via name.  See the
 .IR ftp (1)
 man page for details of the syntax of the
-.I .netrc
+.I ~/.netrc
 file.  (This feature may allow you to avoid duplicating password
 information in more than one file.)
 .PP
@@ -680,7 +748,7 @@ RFC1460 introduced APOP authentication.  In this variant of POP3,
 you register an APOP password on your server host (the program
 to do this with on the server is probably called \fIpopauth\fR(8)).  You
 put the same password in your 
-.I .fetchmailrc
+.I ~/.fetchmailrc
 file.  Each time 
 .I fetchmail
 logs in, it sends a cryptographically secure hash of your password and
@@ -688,26 +756,24 @@ the server greeting time to the server, which can verify it by
 checking its authorization database. 
 .PP
 If your \fIfetchmail\fR was built with Kerberos support and you specify 
-Kerberos preauthentication (either with --auth or the \fI.fetchmailrc\fR
+Kerberos authentication (either with --auth or the \fI.fetchmailrc\fR
 option \fBauthenticate kerberos_v4\fR) it will try to get a Kerberos
 ticket from the mailserver at the start of each query.  Note: if
 either the pollnane or via name is `hesiod', fetchmail will try to use
 Hesiod to look up the mailserver.
 .PP
-If you use IMAP-K4, \fIfetchmail\fR will expect the IMAP server to have
-RFC1731-conformant AUTHENTICATE KERBEROS_V4 capability, and will use it.
-.PP
-If you use IMAP-GSS, \fIfetchmail\fR will expect the IMAP server to have
-RFC1731-conformant AUTHENTICATE GSSAPI capability, and will use it. 
-Currently this has only been tested over Kerberos V, so you're expected
-to already have a ticket-granting ticket. You may pass a username different
-from your principal name using the standard \fB--user\fR command or by
-the \fI.fetchmailrc\fR option \fBuser\fR.
+If you use POP3 or IMAP with GSSAPI authentication, \fIfetchmail\fR will
+expect the server to have RFC1731- or RFC1734-conformant GSSAPI
+capability, and will use it.  Currently this has only been tested over
+Kerberos V, so you're expected to already have a ticket-granting
+ticket. You may pass a username different from your principal name
+using the standard \fB--user\fR command or by the \fI.fetchmailrc\fR
+option \fBuser\fR.
 .PP
 If your IMAP daemon returns the PREAUTH response in its greeting line, 
 fetchmail will notice this and skip the normal authentication step.
-This could be useful, e.g. if you start imapd explicitly using ssh.
-In this case you can declare the preauthentication value `ssh' on that
+This can be useful, e.g. if you start imapd explicitly using ssh.
+In this case you can declare the authentication value `ssh' on that
 site entry to stop \fI.fetchmail\fR from asking you for a password
 when it starts up.
 .PP
@@ -721,13 +787,13 @@ compile in the support, \fIfetchmail\fR will try to perform an RPA pass-phrase
 authentication instead of sending over the password en clair if it
 detects "@compuserve.com" in the hostname.
 .PP
-Microsoft's NTLM authentication (used by Microsoft Exchange) is
-supported. If you compile in the support, \fIfetchmail\fR will try to
-perform an NTLM authentication (instead of sending over the
+If you are using IMAP, Microsoft's NTLM authentication (used by Microsoft
+Exchange) is supported. If you compile in the support, \fIfetchmail\fR
+will try to perform an NTLM authentication (instead of sending over the
 password en clair) whenever the server returns AUTH=NTLM in its
-capability response.  Note: if you specify a user option value
-that looks like `user@domain', the part to the left of the @ will
-be passed as the username and the part to the right as the NTLM domain.
+capability response. Specify a user option value that looks like
+`user@domain': the part to the left of the @ will be passed as the
+username and the part to the right as the NTLM domain.
 .PP
 If you are using IPsec, the -T (--netsec) option can be used to pass
 an IP security request to be used when outgoing IP connections are
@@ -762,12 +828,28 @@ is not valid.  Some servers may require client side certificates be signed
 by a recognized Certifying Authority.  The format for the key files and
 the certificate files is that required by the underlying SSL libraries
 (OpenSSL in the general case).
+.PP
+A word of care about the use of SSL: While above mentioned
+setup with self-signed server certificates retrieved over the wires
+can protect you from a passive eavesdropper it doesn't help against an
+active attacker. It's clearly an improvement over sending the
+passwords in clear but you should be aware that a man-in-the-middle
+attack is trivially possible (in particular with tools such as dsniff,
+http://www.monkey.org/~dugsong/dsniff/).  Use of an ssh tunnel (see
+below for some examples) is preferable if you care seriously about the
+security of your mailbox.
+.PP
+.B fetchmail
+also supports authentication to the ESMTP server on the client side
+according to RFC 2554.  You can specify a name/password pair to be
+used with the keywords `esmtpname' and `esmtppassword'; the former
+defaults to the username of the calling user.
 
 .SH DAEMON MODE
 The 
-.B --daemon <interval>
+.B \-\-daemon <interval>
 or
-.B -d <interval>
+.B \-d <interval>
 option runs 
 .I fetchmail
 in daemon mode.  You must specify a numeric argument which is a
@@ -819,9 +901,9 @@ effect is to kill any running daemon before doing what the other
 options specify in combination with the rc file.
 .PP
 The
-.B -L <filename>
+.B \-L <filename>
 or
-.B --logfile <filename>
+.B \-\-logfile <filename>
 option (keyword: set logfile) allows you to redirect status messages
 emitted while detached into a specified logfile (follow the
 option with the logfile name).  The logfile is opened for append, so
@@ -829,7 +911,7 @@ previous messages aren't deleted.  This is primarily useful for
 debugging configurations.
 .PP
 The
-.B --syslog
+.B \-\-syslog
 option (keyword: set syslog) allows you to redirect status and error
 messages emitted to the
 .IR syslog (3)
@@ -842,15 +924,15 @@ from the server(s).
 Error messages for command line options and parsing the \fI.fetchmailrc\fR
 file are still written to stderr, or to the specified log file.
 The
-.B --nosyslog
+.B \-\-nosyslog
 option turns off use of 
 .IR syslog (3),
 assuming it's turned on in the 
-.I .fetchmailrc 
+.I ~/.fetchmailrc 
 file, or that the
-.B -L
+.B \-L
 or
-.B --logfile <file>
+.B \-\-logfile <file>
 option was used.
 .PP
 The 
@@ -870,35 +952,37 @@ next poll cycle.  (The IMAP logic doesn't delete messages until
 they're delivered, so this problem does not arise.)
 .PP
 If you touch or change the 
-.I .fetchmailrc 
+.I ~/.fetchmailrc 
 file while fetchmail is running in daemon mode, this will be detected 
 at the beginning of the next poll cycle.  When a changed
-.I .fetchmailrc 
+.I ~/.fetchmailrc 
 is detected, fetchmail rereads it and restarts from scratch (using
 exec(2); no state information is retained in the new instance).  Note also
 that if you break the
-.I .fetchmailrc 
+.I ~/.fetchmailrc 
 file's syntax, the new instance will softly and silently vanish away
 on startup.
 
 .SH ADMINISTRATIVE OPTIONS
 .PP
 The 
-.B --postmaster <name>
+.B \-\-postmaster <name>
 option (keyword: set postmaster) specifies the last-resort username to
 which multidrop mail is to be forwarded if no matching local recipient
-can be found.  Normally this is just the user who invoked fetchmail.
+can be found.  Normally this is just the user who invoked 
+.IR fetchmail .
 If the invoking user is root, then the default of this option is
-the user `postmaster'.
+the user `postmaster'.  Setting postmaster to the empty string causes
+such mail to be discarded.
 .PP
 The
-.B --nobounce
+.B \-\-nobounce
 option suppresses the normal action of bouncing errors back to the 
 sender in an RFC1894-conformant error message.  If nobounce is on, the
 message will go to the postmaster instead.
 .PP
 The 
-.B --invisible
+.B \-\-invisible
 option (keyword: set invisible) tries to make fetchmail invisible.
 Normally, fetchmail behaves like any other MTA would -- it generates a
 Received header into each message describing its place in the chain of
@@ -909,21 +993,49 @@ the MTA it forwards to into thinking it came directly from the
 mailserver host.
 .PP
 The 
-.B --showdots
+.B \-\-showdots
 option (keyword: set showdots) forces fetchmail to show progress dots
 even if the current tty is not stdout (for example logfiles).
 Starting with fetchmail version 5.3.0, 
 progress dots are only shown on stdout by default.
+.PP
+By specifying the
+.B \-\-tracepolls
+option, you can ask fetchmail to add information to the Received
+header on the form "polling {label} account {user}", where {label} is
+the account label (from the specified rcfile, normally ~/.fetchmailrc)
+and {user} is the username which is used to log on to the mail
+server. This header can be used to make filtering email where no
+useful header information is available and you want mail from
+different accounts sorted into different mailboxes (this could, for
+example, occur if you have an account on the same server running a
+mailing list, and are subscribed to the list using that account). The
+default is not adding any such header.  In
+.IR .fetchmailrc , 
+this is called `tracepolls'.
 
 .SH RETRIEVAL FAILURE MODES
 The protocols \fIfetchmail\fR uses to talk to mailservers are next to
 bulletproof.  In normal operation forwarding to port 25, no message is
 ever deleted (or even marked for deletion) on the host until the SMTP
-listener on the client has acknowledged to \fIfetchmail\fR that the
-message has been accepted for delivery or rejected due to a spam
-block.  When forwarding to an MDA, however, there is more possibility
-of error (because there's no way for fetchmail to get a reliable
-positive acknowledgement from the MDA).
+listener on the client side has acknowledged to \fIfetchmail\fR that
+the message has been either accepted for delivery or rejected due to a
+spam block.
+.PP
+When forwarding to an MDA, however, there is more possibility
+of error.  Some MDAs are `safe' and reliably return a nonzero status
+on any delivery error, even one due to temporary resource limits.
+The well-known
+.IR procmail (1)
+program is like this; so are most programs designed as mail transport
+agents, such as 
+.IR sendmail (1),
+and
+.IR exim (1).
+These programs give back a reliable positive acknowledgement and
+can be used with the mda option with no risk of mail loss.  Unsafe
+MDAs, though, may return 0 even on delivery failure.  If this
+happens, you will lose mail.
 .PP
 The normal mode of \fIfetchmail\fR is to try to download only `new'
 messages, leaving untouched (and undeleted) messages you have already
@@ -970,7 +1082,7 @@ be that messages you have already read on your host will look new to
 the server.  In this (unlikely) case, only messages you fetched with
 \fIfetchmail --keep\fR will be both undeleted and marked old.
 .PP
-In ETRN mode, \fIfetchmail\fR does not actually retrieve messages;
+In ETRN and ODMR modes, \fIfetchmail\fR does not actually retrieve messages;
 instead, it asks the server's SMTP listener to start a queue flush
 to the client via SMTP.  Therefore it sends only undelivered messages.
 
@@ -985,25 +1097,27 @@ Newer versions of
 return an error code of 571.  This return value
 is blessed by RFC1893 as "Delivery not authorized, message refused".
 .PP
-According to current drafts of the replacement for RFC821, the correct
-thing to return in this situation is 550 "Requested action not taken:
-mailbox unavailable" (the draft adds "[E.g., mailbox not found, no
-access, or command rejected for policy reasons].").
+According to RFC2821, the correct thing to return in this situation is
+550 "Requested action not taken: mailbox unavailable" (the draft adds
+"[E.g., mailbox not found, no access, or command rejected for policy
+reasons].").
 .PP
-The
+Older versions of the
 .I exim
-MTA returns 501 "Syntax error in parameters or arguments", but will
-move to 550 soon.
+MTA return 501 "Syntax error in parameters or arguments".
 .PP
 The
 .I postfix
 MTA runs 554 as an antispam response.
 .PP
-The
+.I Zmailer 
+may reject code with a 500 response (followed by an enhanced status
+code that contains more information).
+.PP
+Return codes which 
 .I fetchmail
-code recognizes and discards the message on any of a list of responses
-that defaults to [571, 550, 501, 554] but can be set with the `antispam'
-option.  This is one of the
+treats as antispam responses and discards
+the message can be set with the `antispam' option.  This is one of the
 .I only
 three circumstance under which fetchmail ever discards mail (the others
 are the 552 and 553 errors described below, and the suppression of
@@ -1016,21 +1130,26 @@ the message rejected immediately after the headers have been fetched,
 without reading the message body.  Thus, you won't pay for downloading 
 spam message bodies.
 .PP
-Mail that is spam-blocked triggers an RFC1892 bounce message informing
-the originator that we do not accept mail from it.
+By default, the list of antispam responses is empty.
+.PP
+If the \fIspambounce\fR option is on, mail that is spam-blocked
+triggers an RFC1892 bounce message informing the originator that we do
+not accept mail from it.
 
 .SH SMTP/ESMTP ERROR HANDLING
-Besides the spam-blocking described above,fetchmail takes special
+Besides the spam-blocking described above, fetchmail takes special
 actions on the following SMTP/ESMTP error responses
 .TP 5
 452 (insufficient system storage)
 Leave the message in the server mailbox for later retrieval.
 .TP 5
 552 (message exceeds fixed maximum message size)
-Delete the message from the server.  Send bounce-mail to the originator.
+Delete the message from the server.  Send bounce-mail to the
+originator.
 .TP 5
 553 (invalid sending domain)
-Delete the message from the server.  Send bounce-mail to the originator.
+Delete the message from the server.  Don't even try to send
+bounce-mail to the originator.
 .PP
 Other errors trigger bounce mail back to the originator.
 
@@ -1140,7 +1259,7 @@ Specify DNS name of mailserver, overriding poll name
 T}
 proto[col]     -p      T{
 Specify protocol (case insensitive):
-POP2, POP3, IMAP, IMAP-K4, IMAP-GSS, APOP, KPOP
+POP2, POP3, IMAP, APOP, KPOP
 T}
 local[domains] \&      T{
 Specify domain(s) to be regarded as local
@@ -1148,8 +1267,8 @@ T}
 port           -P      T{
 Specify TCP/IP service port
 T}
-auth[enticate] -A      T{
-Set preauthentication type (default `password')
+auth[enticate] \&      T{
+Set authentication type (default `any')
 T}
 timeout        -t      T{
 Server inactivity timeout in seconds (default 300)
@@ -1203,7 +1322,13 @@ netsec           \&      T{
 Pass in IPsec security option request.
 T}
 principal      \&      T{
-Set Kerberos principal (only useful with imap-k4)
+Set Kerberos principal (only useful with imap and kerberos)
+T}
+esmtpname      \&      T{
+Set name for RFC2554 authentication to the ESMTP server.
+T}
+esmtppassword          \&      T{
+Set password for RFC2554 authentication to the ESMTP server.
 T}
 .TE
 
@@ -1235,12 +1360,18 @@ T}
 sslkey                 T{
 Specify file for client side private SSL key
 T}
+sslproto               T{
+Force ssl protocol for connection
+T}
 folder         -r      T{
 Specify remote folder to query
 T}
 smtphost       -S      T{
 Specify smtp host(s) to forward to
 T}
+fetchdomains   \&      T{
+Specify domains for which mail should be fetched
+T}
 smtpaddress    -D      T{
 Specify the domain to be put in RCPT TO lines
 T}
@@ -1343,6 +1474,9 @@ T}
 expunge        -e      T{
 Perform an expunge on every #th message (IMAP and POP3 only)
 T}
+tracepolls     \&      T{
+Add poll tracing information to the Received header
+T}
 properties     \&      T{
 String value is ignored by fetchmail (may be used by extension scripts)
 T}
@@ -1370,16 +1504,13 @@ the following: `via', `interval', `aka', `is', `to', `dns'/`no dns',
 `dropdelivered/no dropdelivered', `mimedecode/no mimedecode', `idle/no
 idle', and `no envelope'.
 .PP
-The `via' option is for use with ssh, or if you want to have more
+The `via' option is for if you want to have more
 than one configuration pointing at the same site.  If it is present,
 the string argument will be taken as the actual DNS name of the 
 mailserver host to query.
 This will override the argument of poll, which can then simply be a
 distinct label for the configuration (e.g. what you would give on the
 command line to explicitly query this host).
-If the `via' name is `localhost', the poll name will also still be
-used as a possible match in multidrop mode; otherwise the `via' name
-will be used instead and the poll name will be purely a label.
 .PP
 The `interval' option (which takes a numeric argument) allows you to poll a
 server less frequently than the basic poll interval.  If you say
@@ -1542,9 +1673,10 @@ of each poll.  This will tell the IMAP server to hold the connection
 open and notify the client when new mail is available.  If you need to
 poll a link frequently, IDLE can save bandwidth by eliminating TCP/IP
 connects and LOGIN/LOGOUT sequences. On the other hand, an IDLE 
-connection will eat almost akll of your fetchmail's time, because it
+connection will eat almost all of your fetchmail's time, because it
 will never drop the connection and allow other pools to occur unless
-the server times out the IDLE.
+the server times out the IDLE.  It also doesn't work with multiple 
+folders; only the first folder will ever be polled.
 .PP
 The `properties' option is an extension mechanism.  It takes a string
 argument, which is ignored by fetchmail itself.  The string argument may be
@@ -1560,29 +1692,30 @@ but you can make this clearer by saying `user eric there is esr here',
 or reverse it by saying `user esr here is eric there'
 .PP
 Legal protocol identifiers for use with the `protocol' keyword are:
-
+.sp
+.nf
     auto (or AUTO)
     pop2 (or POP2)
     pop3 (or POP3)
     sdps (or SDPS)
     imap (or IMAP)
-    imap-k4 (or IMAP-K4)
-    imap-gss (or IMAP-GSS)
-    imap-crammd5 (or IMAP-CRAMMD5)
-    imap-login (or IMAP-LOGIN)
     apop (or APOP)
     kpop (or KPOP)
-
+.fi
+.sp
 .PP
-Legal authentication types are `password' or `kerberos'.  The former
-specifies authentication by normal transmission of a password (the
-password may be plaintext or subject to protocol-specific encryption
-as in APOP); the second tells \fIfetchmail\fR to try to get a Kerberos
-ticket at the start of each query instead, and send an arbitrary
-string as the password.
+Legal authentication types are `any', `password', `kerberos', 'kereberos_v5' 
+and `gssapi', `cram-md5', `otp', `ntlm', `ssh`.
+The `password' type specifies authentication by normal transmission of a
+password (the password may be plaintext or subject to
+protocol-specific encryption as in APOP); `kerberos' tells
+\fIfetchmail\fR to try to get a Kerberos ticket at the start of each
+query instead, and send an arbitrary string as the password; and
+`gssapi' tells fetchmail to use GSSAPI authentication.  See the description
+of the `auth' keyword for more.
 .PP
 Specifying `kpop' sets POP3 protocol over port 1109 with Kerberos V4
-preauthentication.  These defaults may be overridden by later options.
+authentication.  These defaults may be overridden by later options.
 .PP
 There are currently four global option statements; `set logfile'
 followed by a string sets the same global specified by --logfile.  A
@@ -1596,15 +1729,17 @@ matches.  Finally, `set syslog' sends log messages to syslogd(8).
 .SH INTERACTION WITH RFC 822
 When trying to determine the originating address of a message,
 fetchmail looks through headers in the following order: 
-
+.sp
+.nf
         Return-Path:
-        Resent-Sender:
-        Sender:
+        Resent-Sender: (ignored if it doesn't contain an @ or !)
+        Sender: (ignored if it doesn't contain an @ or !)
         Resent-From:
         From:
         Reply-To:
         Apparently-From:
-
+.fi
+.sp
 The originating address is used for logging, and to set the MAIL FROM
 address when forwarding to SMTP.  This order is intended to cope
 gracefully with receiving mailing list messages in multidrop mode. The
@@ -1627,6 +1762,12 @@ person referred by the To: address has already received the original
 copy of the mail).
 
 .SH CONFIGURATION EXAMPLES
+Note that although there are password declarations in a good many
+of the examples below, this is mainly for illustrative purposes.
+We recommend stashing account/password pairs in your $HOME/.netrc
+file, where they can be used not just by fetchmail but by ftp(1) and
+other programs.
+
 Basic format is:
 
 .nf
@@ -1696,19 +1837,20 @@ in a multi-user entry must include it.  Here's an example:
 .nf
   poll pop.provider.net proto pop3 port 3111
         user "jsmith" with pass "secret1" is "smith" here
-        user jones with pass "secret2" is "jjones" here
+        user jones with pass "secret2" is "jjones" here keep
 .fi
 
 This associates the local username `smith' with the pop.provider.net
 username `jsmith' and the local username `jjones' with the
-pop.provider.net username `jones'.
+pop.provider.net username `jones'.  Mail for `jones' is kept on the
+server after download.
 .PP
 Here's what a simple retrieval configuration for a multi-drop mailbox
 looks like:
 
 .nf
   poll pop.provider.net:
-        user maildrop with pass secret1 to golux hurkle=happy snark here
+        user maildrop with pass secret1 to golux 'hurkle'='happy' snark here
 .fi
 
 This says that the mailbox of account `maildrop' on the server is a
@@ -1722,7 +1864,7 @@ Here's an example of another kind of multidrop connection:
 
 .nf
   poll pop.provider.net localdomains loonytoons.org toons.org:
-        user maildrop with pass secret1 to esr * here
+        user maildrop with pass secret1 to * here
 .fi
 
 This also says that the mailbox of account `maildrop' on the server is
@@ -1731,29 +1873,19 @@ loonytoons.org or toons.org domains (including subdomain addresses like
 `joe@daffy.loonytoons.org') should be passed through to the local SMTP
 listener without modification.  Be careful of mail loops if you do this!
 .PP
-Here's an example configuration using ssh.  The queries go through an
-ssh connecting local port 1234 to port 110 on mailhost.net; the
-preconnect command sets up the ssh.
-
-.nf
-poll mailhost.net via localhost port 1234 with proto pop3:
-        preconnect "ssh -f -L 1234:mailhost.net:110
-               mailhost.net sleep 20 </dev/null >/dev/null";
-.fi
-
-.PP
-Here's an another example configuration using ssh and the plugin option.
-The queries are made directly on the stdin and stdout of imapd via ssh.
+Here's an example configuration using ssh and the plugin option.  The
+queries are made directly on the stdin and stdout of imapd via ssh.
 Note that in this setup, IMAP authentication can be skipped.
 
 .nf
-poll mailhost.net with proto imap and preauth ssh:
-        plugin "ssh %h /usr/sbin/imapd";
+poll mailhost.net with proto imap:
+        plugin "ssh %h /usr/sbin/imapd" auth ssh;
+       user esr is esr here
 .fi
 
 .SH THE USE AND ABUSE OF MULTIDROP MAILBOXES
 Use the multiple-local-recipients feature with caution -- it can bite.
-Also note that all multidrop features are ineffective in ETRN mode.
+All multidrop features are ineffective in ETRN and ODMR modes.
 
 Also, note that in multidrop mode duplicate mails are suppressed.  A
 piece of mail is considered duplicate if it has the same message-ID as
@@ -1857,10 +1989,10 @@ If you're tempted to use
 to retrieve mail for multiple users from a single mail drop via POP or
 IMAP, think again (and reread the section on header and envelope
 addresses above).  It would be smarter to just let the mail sit in the
-mailserver's queue and use fetchmail's ETRN mode to trigger SMTP sends
-periodically (of course, this means you have to poll more frequently
-than the mailserver's expiry period).  If you can't arrange this, try
-setting up a UUCP feed.
+mailserver's queue and use fetchmail's ETRN or ODMR modes to trigger
+SMTP sends periodically (of course, this means you have to poll more
+frequently than the mailserver's expiry period).  If you can't arrange
+this, try setting up a UUCP feed.
 .PP
 If you absolutely \fImust\fR use multidrop for this purpose, make sure
 your mailserver writes an envelope-address header that fetchmail can
@@ -1868,7 +2000,7 @@ see.  Otherwise you \fIwill\fR lose mail and it \fIwill\fR come back
 to haunt you.
 
 .SS Speeding Up Multidrop Checking
-Normally, when multiple user are declared 
+Normally, when multiple users are declared 
 .I fetchmail
 extracts recipient addresses as described above and checks each host
 part with DNS to see if it's an alias of the mailserver.  If so, the
@@ -1913,7 +2045,7 @@ missing password.
 Some sort of fatal protocol error was detected.
 .IP 5
 There was a syntax error in the arguments to 
-.I fetchmail.
+.IR fetchmail .
 .IP 6
 The run control file had bad permissions.
 .IP 7
@@ -1944,6 +2076,8 @@ a DNS lookup at startup and could not proceed.
 BSMTP batch file could not be opened.
 .IP 13
 Poll terminated by a fetch limit (see the --fetchlimit option).
+.IP 14
+Server busy indication.
 .IP 23
 Internal error.  You should see a message on standard error with
 details.
@@ -1954,15 +2088,6 @@ queries more than one host, return status is 0 if \fIany\fR query
 successfully retrieved mail. Otherwise the returned error status is
 that of the last host queried.
 
-.SH AUTHOR
-Eric S. Raymond <esr@snark.thyrsus.com>.  Too many other people to
-name here have contributed code and patches. 
-This program is descended from and replaces 
-.IR popclient , 
-by Carl Harris <ceharris@mal.com>; the internals have become quite different, 
-but some of its interface design is directly traceable to that
-ancestral program.
-
 .SH FILES
 .TP 5
 ~/.fetchmailrc
@@ -1999,7 +2124,7 @@ multiple names per userid gracefully).
 If the environment variable FETCHMAILHOME is set to a valid and
 existing directory name, the .fetchmailrc and .fetchids and
 \&.fetchmail.pid files are put there instead of in the invoking user's
-home directory (and lose the leading dots on theirt names).  The
+home directory (and lose the leading dots on their names).  The
 \&.netrc file is looked for in the the invoking user's home directory
 regardless of FETCHMAILHOME's setting.
 
@@ -2021,6 +2146,13 @@ in foreground while a background fetchmail is running will do
 whichever of these is appropriate to wake it up.
 
 .SH BUGS AND KNOWN PROBLEMS
+The mda and plugin options interact badly.  In order to collect error
+status from the MDA, fetchmail has to change its normal signal
+handling so that dead plugin processes don't get reaped until the end
+of the poll cycle.  This can cause resource starvation if too many
+zombies accumulate.  So either don't deliver to a MDA using plugins or
+risk being overrun by an army of undead.
+.PP
 The RFC822 address parser used in multidrop mode chokes on some
 @-addresses that are technically legal but bizarre.  Strange uses of
 quoting and embedded comments are likely to confuse it.
@@ -2031,16 +2163,18 @@ mailserver-side filter that consolidates the contents of all envelope
 headers into a single one (procmail, mailagent, or maildrop can be
 programmed to do this fairly easily).
 .PP
-Use of any of the supported protocols other than POP3 with OTP or RPA,
-APOP, KPOP, IMAP-K4, IMAP-GSS, IMAP-CRAMMD5, or ETRN requires that the
-program send unencrypted passwords over the TCP/IP connection to the
-mailserver.  This creates a risk that name/password pairs might be
-snaffled with a packet sniffer or more sophisticated monitoring
-software.  Under Linux and FreeBSD, the --interface option can be used
-to restrict polling to availability of a specific interface device
-with a specific local or remote IP address, but snooping is still
-possible if (a) either host has a network device that can be opened
-in promiscuous mode, or (b) the intervening network link can be tapped.
+Use of some of these protocols requires that the program send
+unencrypted passwords over the TCP/IP connection to the mailserver.
+This creates a risk that name/password pairs might be snaffled with a
+packet sniffer or more sophisticated monitoring software.  Under Linux
+and FreeBSD, the --interface option can be used to restrict polling to
+availability of a specific interface device with a specific local or
+remote IP address, but snooping is still possible if (a) either host
+has a network device that can be opened in promiscuous mode, or (b)
+the intervening network link can be tapped.  We recommend the use of
+.IR ssh (1)
+tunnelling to not only shroud your passwords but encrypt the entire
+conversation.
 .PP
 Use of the %F or %T escapes in an mda option could open a security
 hole, because they pass text manipulable by an attacker to a shell
@@ -2050,23 +2184,20 @@ temporarily discards any suid privileges it may have while running the
 MDA.  For maximum safety, however, don't use an mda command containing
 %F or %T when fetchmail is run from the root account itself.
 .PP
-Fetchmail's method of sending bouncemail and spambounce requires that
+Fetchmail's method of sending bouncemail and spam bounces requires that
 port 25 of localhost be available for sending mail via SMTP.
 .PP
 If you modify a
-.I .fetchmailrc
+.I ~/.fetchmailrc
 while a background instance is running and break the syntax, the
 background instance will die silently.  Unfortunately, it can't 
 die noisily because we don't yet know whether syslog should be enabled.
+On some systems, fetchmail dies quietly even if there is no syntax
+error; this seems to have something to do with buggy terminal ioctl
+code in the kernel.
 .PP
-The RFC 2177 IDLE support is flaky.  It sort of works, but may generate
-spurious socket error messages or silently hang in the presence of
-various network or server errors.
-.PP
-The combination of using a remote name with embedded spaces and POP3
-UIDs will not work; the UIDL-handling code will core-dump while trying
-to read in what it sees as malformed .fetchids lines, typically
-on the second poll after startup.
+The -f - option (reading a configuration from stdin) is incompatible
+with the plugin option.
 .PP
 The UIDL code is generally flaky and tends to lose its state on errors
 and line drops (so that old messages are re-seen).  If this happens to
@@ -2075,45 +2206,63 @@ you, switch to IMAP4.
 The `principal' option only handles Kerberos IV, not V.
 .PP
 Send comments, bug reports, gripes, and the like to the
-fetchmail-friends list <fetchmail-friends@ccil.org>.  An HTML FAQ is
+fetchmail-friends list <fetchmail-friends@lists.ccil.org>.  An HTML FAQ is
 available at the fetchmail home page; surf to
 http://www.tuxedo.org/~esr/fetchmail or do a WWW search for pages with
 `fetchmail' in their titles.
 
+.SH AUTHOR
+Eric S. Raymond <esr@snark.thyrsus.com>.  Too many other people to
+name here have contributed code and patches. 
+This program is descended from and replaces 
+.IR popclient , 
+by Carl Harris <ceharris@mal.com>; the internals have become quite different, 
+but some of its interface design is directly traceable to that
+ancestral program.
+
 .SH SEE ALSO
-mutt(1), elm(1), mail(1), sendmail(8), popd(8), imapd(8)
+mutt(1), elm(1), mail(1), sendmail(8), popd(8), imapd(8), netrc(5)
 .SH APPLICABLE STANDARDS
 .TP 5
 SMTP/ESMTP:
-RFC 821, RFC 1869, RFC 1652, RFC 1870, RFC1983, RFC 1985
+RFC 821, RFC2821, RFC 1869, RFC 1652, RFC 1870, RFC 1983, RFC 1985,
+RFC 2554.
 .TP 5
 mail:
-RFC 822, RFC 1892, RFC 1894
+RFC 822, RFC2822, RFC 1123, RFC 1892, RFC 1894.
 .TP 5
 POP2:
 RFC 937
 .TP 5
 POP3:
-RFC 1081, RFC 1225, RFC 1460, RFC 1725, RFC 1939, RFC 1957, RFC2195, RFC 2449
+RFC 1081, RFC 1225, RFC 1460, RFC 1725, RFC1734, RFC 1939, RFC 1957,
+RFC2195, RFC 2449.
 .TP 5
 APOP:
-RFC 1460, RFC 1725, RFC 1939
+RFC 1460, RFC 1725, RFC 1939.
 .TP 5
 RPOP:
-RFC 1081, RFC 1225
+RFC 1081, RFC 1225.
 .TP 5
 IMAP2/IMAP2BIS:
-RFC 1176, RFC 1732
+RFC 1176, RFC 1732.
 .TP 5
 IMAP4/IMAP4rev1:
 RFC 1730, RFC 1731, RFC 1732, RFC 2060, RFC 2061, RFC 2195, RFC 2177,
-RFC 2683
+RFC 2683.
 .TP 5
 ETRN:
-RFC 1985
+RFC 1985.
+.TP 5
+ODMR/ATRN:
+RFC 2645.
 .TP 5
 OTP:
-RFC 1938
+RFC 1938.
 .TP 5
 LMTP:
-RFC 2033
+RFC 2033.
+.TP 5
+GSSAPI:
+RFC 1508.
+