]> Pileus Git - ~andy/fetchmail/blob - fetchmail.man
Various small corrections.
[~andy/fetchmail] / fetchmail.man
1 '\" t
2 .\" ** The above line should force tbl to be used as a preprocessor **
3 .\"
4 .\" Man page for fetchmail
5 .\"
6 .\" For license terms, see the file COPYING in this directory.
7 .TH fetchmail 1
8 .SH NAME
9 fetchmail \- fetch mail from a POP, IMAP, or ETRN-capable server
10
11 .SH SYNOPSIS
12 \fBfetchmail\fR [\fIoptions\fR] [\fImailserver...\fR]
13 .br
14 \fBfetchmailconf\fR
15
16 .SH DESCRIPTION
17 .I fetchmail
18 is a mail-retrieval and forwarding utility; it fetches
19 mail from remote mailservers and forwards it to your local (client)
20 machine's delivery system.  You can then handle the retrieved mail
21 using normal mail user agents such as \fIelm\fR(1) or \fIMail\fR(1).
22 The \fBfetchmail\fR utility can be run in a daemon mode to repeatedly
23 poll one or more systems at a specified interval.
24 .PP
25 The
26 .I fetchmail
27 program can gather mail from servers supporting any of the common
28 mail-retrieval protocols: POP2, POP3, IMAP2bis, and IMAP4.  It can
29 also use the ESMTP ETRN extension.  (The RFCs describing all these
30 protocols are listed at the end of this manual page.)
31 .PP
32 While
33 .I fetchmail
34 is primarily intended to be used over on-demand TCP/IP links (such as
35 SLIP or PPP connections), it may also be useful as a message transfer
36 agent for sites which refuse for security reasons to permit
37 (sender-initiated) SMTP transactions with sendmail.
38 .PP
39 As each message is retrieved \fIfetchmail\fR normally delivers it via SMTP to
40 port 25 on the machine it is running on (localhost), just as though it
41 were being passed in over a normal TCP/IP link.  The mail will then be
42 delivered locally via your system's MDA (Mail Delivery Agent, usually
43 \fIsendmail\fR(8) but your system may use a different one such
44 as \fIsmail\fR, \fImmdf\fR, \fIexim\fR, or \fIqmail\fR).  All the
45 delivery-control mechanisms (such as \fI.forward\fR files) normally
46 available through your system MDA and local delivery agents will
47 therefore work.
48 .PP
49 If the program
50 .I fetchmailconf
51 is available, it will assist you in setting up and editing a
52 fetchmailrc configuration.  It runs under X and requires that the
53 language Python and the Tk toolkit be present on your system.  If
54 you are first setting up fetchmail for single-user mode, it is
55 recommended that you use Novice mode.  Expert mode provides
56 complete control of fetchmail configuration, including the
57 multidrop features.  In either case, the `Autoprobe' button
58 will tell you the most capable protocol a given mailserver
59 supported, and warn you of potential problems with that server.
60
61 .SH GENERAL OPERATION
62 The behavior of
63 .I fetchmail
64 is controlled by command-line options and a run control file,
65 .IR ~/.fetchmailrc\fR ,
66 the syntax of which we describe in a later section (this file is what
67 the \fIfetchmailconf\fR program edits).  Command-line options override
68 .I ~/.fetchmailrc
69 declarations.
70 .PP
71 Each server name that you specify following the options on the
72 command line will be queried.  If you don't specify any servers
73 on the command line, each `poll' entry in your 
74 .I ~/.fetchmailrc
75 file will be queried.
76 .PP
77 To facilitate the use of
78 .I fetchmail
79 in scripts and pipelines, it returns an appropriate exit code upon 
80 termination -- see EXIT CODES below.
81 .PP
82 The following options modify the behavior of \fIfetchmail\fR.  It is
83 seldom necessary to specify any of these once you have a
84 working \fI.fetchmailrc\fR file set up.
85 .PP
86 Almost all options have a corresponding keyword which can be used to
87 declare them in a 
88 .I fetchmailrc
89 file.
90 .PP
91 Some special options are not covered here, but are documented instead
92 in sections on AUTHENTICATION and DAEMON MODE which follow.
93 .SS General Options
94 .TP
95 .B \-V, --version
96 Displays the version information for your copy of 
97 .I fetchmail.
98 No mail fetch is performed.
99 Instead, for each server specified, all the option information
100 that would be computed if
101 .I fetchmail
102 were connecting to that server is displayed.  Any non-printables in
103 passwords or other string names are shown as backslashed C-like
104 escape sequences.  This option is useful for verifying that your
105 options are set the way you want them.
106 .TP
107 .B \-c, --check
108 Return a status code to indicate whether there is mail waiting,
109 without actually fetching or deleting mail (see EXIT CODES below).
110 This option turns off daemon mode (in which it would be useless).  It
111 doesn't play well with queries to multiple sites, and doesn't work
112 with ETRN.  It will return a false positive if you leave read but
113 undeleted mail in your server mailbox and your fetch protocol can't
114 tell kept messages from new ones.  This means it will work with IMAP,
115 not work with POP2, and may occasionally flake out under POP3.
116 .TP
117 .B \-s, --silent
118 Silent mode.  Suppresses all progress/status messages that are
119 normally echoed to standard error during a fetch (but does not
120 suppress actual error messages).  The --verbose option overrides this.
121 .TP
122 .B \-v, --verbose
123 Verbose mode.  All control messages passed between 
124 .I fetchmail
125 and the mailserver are echoed to stderr.  Overrides --silent.
126 Doubling this option (-v -v) causes extra diagnostic information
127 to be printed. 
128 .SS Disposal Options
129 .TP
130 .B \-a, --all
131 (Keyword: fetchall)
132 Retrieve both old (seen) and new messages from the mailserver.  The
133 default is to fetch only messages the server has not marked seen.
134 Under POP3, this option also forces the use of RETR rather than TOP.
135 Note that POP2 retrieval behaves as though --all is always on (see
136 RETRIEVAL FAILURE MODES below) and this option does not work with ETRN.
137 .TP
138 .B \-k, --keep
139 (Keyword: keep)
140 Keep retrieved messages on the remote mailserver.  Normally, messages 
141 are deleted from the folder on the mailserver after they have been retrieved.
142 Specifying the 
143 .B keep 
144 option causes retrieved messages to remain in your folder on the
145 mailserver.  This option does not work with ETRN.
146 .TP
147 .B \-K, --nokeep
148 (Keyword: nokeep)
149 Delete retrieved messages from the remote mailserver.  This
150 option forces retrieved mail to be deleted.  It may be useful if
151 you have specified a default of \fBkeep\fR in your
152 \&\fI.fetchmailrc\fR.  This option is forced on with ETRN.
153 .TP
154 .B \-F, --flush
155 POP3/IMAP only.  Delete old (previously retrieved) messages from the mailserver
156 before retrieving new messages. This option does not work with ETRN.
157 Warning: if your local MTA hangs and fetchmail is aborted, the next
158 time you run fetchmail, it will delete mail that was never delivered to you.
159 What you probably want is the default setting: if you don't specify `-k', then
160 fetchmail will automatically delete messages after successful delivery.
161 .SS Protocol and Query Options
162 .TP
163 .B \-p, \--protocol proto
164 (Keyword: proto[col])
165 Specify the protocol to use when communicating with the remote 
166 mailserver.  If no protocol is specified, the default is AUTO.
167 .I proto 
168 may be one of the following:
169 .RS
170 .IP AUTO
171 Tries each of the supported protocols in turn, terminating after
172 any successful attempt.
173 .IP POP2
174 Post Office Protocol 2
175 .IP POP3
176 Post Office Protocol 3
177 .IP APOP
178 Use POP3 with MD5 authentication.
179 .IP RPOP
180 Use POP3 with RPOP authentication.
181 .IP KPOP
182 Use POP3 with Kerberos V4 authentication on port 1109.
183 .IP SDPS
184 Use POP3 with Demon Internet's SDPS extensions.
185 .IP IMAP
186 IMAP2bis, IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities).
187 .IP IMAP-K4
188 IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities)
189 with RFC 1731 Kerberos v4 authentication.
190 .IP IMAP-GSS
191 IMAP4, or IMAP4rev1 (\fIfetchmail\fR autodetects their capabilities)
192 with RFC 1731 GSSAPI authentication.
193 .IP ETRN
194 Use the ESMTP ETRN option.
195 .RE
196 .P
197 All these alternatives work in basically the same way (communicating
198 with standard server daemons to fetch mail already delivered to a
199 mailbox on the server) except ETRN.  The ETRN mode allows you to ask a
200 compliant ESMTP server (such as BSD sendmail at release 8.8.0 or
201 higher) to immediately open a sender-SMTP connection to your
202 client machine and begin forwarding any items addressed to your client
203 machine in the server's queue of undelivered mail.
204 .TP
205 .B \-U, --uidl
206 (Keyword: uidl)
207 Force UIDL use (effective only with POP3).  Force client-side tracking
208 of `newness' of messages (UIDL stands for ``unique ID listing'' and is
209 described in RFC1725).  Use with `keep' to use a mailbox as a baby
210 news drop for a group of users.
211 .TP
212 .B \-P, --port
213 (Keyword: port)
214 The port option permits you to specify a TCP/IP port to connect on. 
215 This option will seldom be necessary as all the supported protocols have
216 well-established default port numbers.
217 .TP 
218 .B \-t, --timeout
219 (Keyword: timeout)
220 The timeout option allows you to set a server-nonresponse
221 timeout in seconds.  If a mailserver does not send a greeting message
222 or respond to commands for the given number of seconds,
223 \fIfetchmail\fR will hang up on it.  Without such a timeout
224 \fIfetchmail\fR might hang up indefinitely trying to fetch mail from a
225 down host.  This would be particularly annoying for a \fIfetchmail\fR
226 running in background.  There is a default timeout which fetchmail -V
227 will report.
228 .TP
229 .B \--plugin
230 (Keyword: plugin)
231 The plugin option allows you to use an external program to establish the
232 TCP connection.  This is useful if you want to use socks or need some
233 special firewalling setup.  The program will be looked up in $PATH and
234 it will be passed two arguments: the name of the server and the name of
235 the port.
236 .TP
237 .B \--plugout
238 (Keyword: plugout)
239 Identical to the plugin option above, but this one is used for the SMTP
240 connections (which will probably not need it, so it has been separated
241 from plugin).
242 .TP
243 .B \-r folder, --folder folder
244 (Keyword: folder[s])
245 Causes a specified non-default mail folder on the mailserver (or
246 comma-separated list of folders) to be retrieved.  The syntax of the
247 folder name is server-dependent.  This option is not available under
248 POP3 or ETRN.
249 .SS Delivery Control Options
250 .TP
251 .B \-S hosts, --smtphost hosts
252 (Keyword: smtp[host])
253 Specify a hunt list of hosts to forward mail to (one or more
254 hostnames, comma-separated).  In ETRN mode, set the host that the
255 mailserver is asked to ship mail to.  Hosts are tried in list order;
256 the first one that is up becomes the forwarding or ETRN target for the
257 current run.  Normally, `localhost' is added to the end of the list as
258 an invisible default.  However, when using ETRN mode or Kerberos
259 authentication, the FQDN of the machine running fetchmail is added to
260 the end of the list as an invisible default. Each hostname may have a 
261 port number following the host name.  The port number is separated from
262 the host name by a slash; the default port is 25 (or ``smtp'' under IPv6).
263 Example:
264
265         --smtphost server1,server2/2525,server3
266
267 .TP
268 .B \-D domain, --smtpaddress domain
269 (Keyword: smtpaddress) 
270 Specify the domain to be put in RCPT TO lines shipped to SMTP. The
271 name of the SMTP server (as specified by --smtphost, or defaulted to
272 "localhost") is used when this is not specified.
273 .TP
274 .B \-Z nnn, --antispam nnn[,nnn[,nnn...]]
275 (Keyword: antispam) 
276 Specifies the list of numeric SMTP errors that are to be interpreted
277 as a spam-block response from the listener.  A value of -1 disables
278 this option.  For the command-line option, the list values should
279 be comma-separated.
280 .TP
281 .B \-m, \--mda
282 (Keyword: mda)
283 You can force mail to be passed to an MDA directly (rather than
284 forwarded to port 25) with the -mda or -m option.  If \fIfetchmail\fR
285 is running as root, it sets its userid to that of the target user
286 while delivering mail through an MDA.  Some possible MDAs are
287 "/usr/sbin/sendmail -oem $USER", "/usr/bin/procmail -d $USER"
288 and "/usr/bin/deliver".  Local delivery addresses
289 will be inserted into the MDA command wherever you place a %T; the
290 mail message's From address will be inserted where you place an %F.  Do
291 \fInot\fR use an MDA invocation like
292 "sendmail -oem -t" that dispatches on the contents of To/Cc/Bcc, it
293 will create mail loops and bring the just wrath of many postmasters
294 down upon your head.
295 .TP 
296 .B \--lmtp
297 (Keyword: lmtp)
298 Cause delivery via LMTP (Local Mail Transfer Protocol).  A service
299 port \fImust\fR be explicitly specified (with a slash suffix) on each
300 host in the smtphost hunt list) if this option is selected; the
301 default port 25 will (in accordance with RFC 2033) not be accepted.
302 .TP
303 .B \--bsmtp
304 (keyword: bsmtp)
305 Append fetched mail to a BSMTP file.  This simply contains the SMTP
306 commands that would normally be generated by fetchmail when passing
307 mail to an SMTP listener daemon.  An argument of `-' causes the mail
308 to be written to standard output.  Note that fetchmail's
309 reconstruction of MAIL FROM and RCPT TO lines is not guaranteed
310 correct; the caveats discussed under THE USE AND ABUSE OF MULTIDROP
311 MAILBOXES below apply.
312 .SS Resource Limit Control Options
313 .TP
314 .B \-l, --limit
315 (Keyword: limit)
316 Takes a maximum octet size argument.  Messages larger than this size
317 will not be fetched, not be marked seen, and will be left on the
318 server (in foreground sessions, the progress messages will note that
319 they are "oversized").  An explicit --limit of 0 overrides any limits
320 set in your run control file. This option is intended for those
321 needing to strictly control fetch time due to expensive and variable
322 phone rates.  In daemon mode, oversize notifications are mailed to the
323 calling user (see the --warnings option).  This option does not work
324 with ETRN.
325 .TP
326 .B \-w, --warnings
327 (Keyword: warnings)
328 Takes an interval in seconds.  When you call
329 .I fetchmail
330 with a `limit' option in daemon mode, this controls the interval at
331 which warnings about oversized messages are mailed to the calling user
332 (or the user specified by the `postmaster' option).  One such
333 notification is always mailed at the end of the the first poll that
334 the oversized message is detected.  Thereafter, renotification is
335 suppressed until after the warning interval elapses (it will take
336 place at the end of the first following poll).
337 .TP
338 .B -b, --batchlimit
339 (Keyword: batchlimit)
340 Specify the maximum number of messages that will be shipped to an SMTP
341 listener before the connection is deliberately torn down and rebuilt
342 (defaults to 0, meaning no limit).  An explicit --batchlimit of 0
343 overrides any limits set in your run control file.  While
344 \fBsendmail\fR(8) normally initiates delivery of a message immediately
345 after receiving the message terminator, some SMTP listeners are not so
346 prompt.  MTAs like \fIqmail\fR(8) and \fIsmail\fR(8) may wait till the
347 delivery socket is shut down to deliver.  This may produce annoying
348 delays when
349 .I fetchmail
350 is processing very large batches.  Setting the batch limit to some
351 nonzero size will prevent these delays.
352 This option does not work with ETRN.
353 .TP
354 .B -B, --fetchlimit
355 (Keyword: fetchlimit)
356 Limit the number of messages accepted from a given server in a single
357 poll.  By default there is no limit. An explicit --fetchlimit of 0
358 overrides any limits set in your run control file.
359 This option does not work with ETRN.
360 .TP
361 .B -e, --expunge
362 (keyword: expunge)
363 When talking to an IMAP server, 
364 .I fetchmail
365 normally issues an EXPUNGE command after each deletion in order to
366 force the deletion to be done immediately.  This is safest when your
367 connection to the server is flaky and expensive, as it avoids
368 resending duplicate mail after a line hit.  However, on large
369 mailboxes the overhead of re-indexing after every message can slam the
370 server pretty hard, so if your connection is reliable it is good to do
371 expunges less frequently.  If you specify this option to an integer N,
372 it tells
373 .I fetchmail
374 to only issue expunges on every Nth delete.  An argument
375 of zero suppresses expunges entirely (so no expunges at all will be
376 done until the end of run). 
377 This option does not work with ETRN, POP2, or POP3.
378 .SS Authentication Options
379 .TP
380 .B \-u name, --username name
381 (Keyword: user[name])
382 Specifies the user identification to be used when logging in to the mailserver.
383 The appropriate user identification is both server and user-dependent.  
384 The default is your login name on the client machine that is running 
385 .I fetchmail.
386 See USER AUTHENTICATION below for a complete description.
387 .TP
388 .B \-I specification, --interface specification
389 (Keyword: interface)
390 Require that a specific interface device be up and have a specific local
391 IP address (or range) before polling.  Frequently
392 .I fetchmail
393 is used over a transient point-to-point TCP/IP link established directly
394 to a mailserver via SLIP or PPP.  That is a relatively secure channel.
395 But when other TCP/IP routes to the mailserver exist (e.g. when the link
396 is connected to an alternate ISP), your username and password may be
397 vulnerable to snooping (especially when daemon mode automatically polls
398 for mail, shipping a clear password over the net at predictable
399 intervals).  The --interface option may be used to prevent this.  When
400 the specified link is not up or is not connected to a matching IP
401 address, polling will be skipped.  The format is:
402 .sp
403         interface/iii.iii.iii.iii/mmm.mmm.mmm.mmm
404 .sp
405 The field before the first slash is the interface name (i.e. sl0, ppp0
406 etc.).  The field before the second slash is the acceptable IP address.
407 The field after the second slash is a mask which specifies a range of
408 IP addresses to accept.  If no mask is present 255.255.255.255 is
409 assumed (i.e. an exact match).  This option is currently only supported
410 under Linux.
411 .TP
412 .B \-M interface, --monitor interface
413 (Keyword: monitor)
414 Daemon mode can cause transient links which are automatically taken down
415 after a period of inactivity (e.g. PPP links) to remain up
416 indefinitely.  This option identifies a system TCP/IP interface to be
417 monitored for activity.  After each poll interval, if the link is up but
418 no other activity has occurred on the link, then the poll will be
419 skipped.  This option is currently only supported under Linux.
420 .TP
421 .B \-A, --auth
422 (Keyword: auth[enticate]) 
423 This option permits you to specify a preauthentication type (see USER
424 AUTHENTICATION below for details).  The possible values are
425 \&`\fBpassword\fR', `\fBkerberos_v5\fR' and `\fBkerberos\fR' (or, for
426 excruciating exactness, `\fBkerberos_v4\fR').  This option is provided
427 primarily for developers; choosing KPOP protocol automatically selects
428 Kerberos preauthentication, and all other alternatives use password
429 authentication (though APOP uses a generated one-time key as the
430 password and IMAP-K4 uses RFC1731 Kerberos v4 authentication).  This
431 option does not work with ETRN.
432 .SS Miscellaneous Options
433 .TP
434 .B \-f pathname, --fetchmailrc pathname
435 Specify a non-default name for the 
436 .I .fetchmailrc
437 run control file.  The pathname argument must be either "-" (a single
438 dash, meaning to read the configuration from standard input) or a
439 filename.  Unless the --version option is also on, a named file
440 argument must have permissions no more open than 0600 (u=rw,g=,o=) or
441 else be /dev/null.
442 .TP
443 .B \-i pathname, --idfile pathname
444 (Keyword: idfile)
445 Specify an alternate name for the .fetchids file used to save POP3
446 UIDs. 
447 .TP
448 .B \-n, --norewrite
449 (Keyword: no rewrite)
450 Normally,
451 .I fetchmail
452 edits RFC-822 address headers (To, From, Cc, Bcc, and Reply-To) in
453 fetched mail so that any mail IDs local to the server are expanded to
454 full addresses (@ and the mailserver hostname are appended).  This enables 
455 replies on the client to get addressed correctly (otherwise your
456 mailer might think they should be addressed to local users on the
457 client machine!).  This option disables the rewrite.  (This option is
458 provided to pacify people who are paranoid about having an MTA edit
459 mail headers and want to know they can prevent it, but it is generally
460 not a good idea to actually turn off rewrite.)
461 When using ETRN, the rewrite option is ineffective.
462 .TP
463 .B -E, --envelope
464 (Keyword: envelope)
465 This option changes the header 
466 .I fetchmail
467 assumes will carry a copy of the mail's envelope address.  Normally
468 this is `X-Envelope-To' but as this header is not standard, practice
469 varies. See the discussion of multidrop address handling below.  As a
470 special case, `envelope "Received"' enables parsing of sendmail-style
471 Received lines.  This is the default, and it should not be necessary
472 unless you have globally disabled Received parsing with `no envelope'
473 in the \fI.fetchmailrc\fR file.
474 .TP
475 .B -Q, --qvirtual
476 (Keyword: qvirtual)
477 The string prefix assigned to this option will be removed from the user
478 name found in the header specified with the \fIenvelope\fR option
479 (\fIbefore\fR doing multidrop name mapping or localdomain checking,
480 if either is applicable). This option is useful if you are using  
481 .I fetchmail
482 to collect the mail for an entire domain and your ISP (or your mail
483 redirection provider) is using qmail.
484 One of the basic features of qmail is the
485 .sp
486 \&`Delivered-To:'
487 .sp
488 message header.  Whenever qmail delivers a message to a local mailbox
489 it puts the username and hostname of the envelope recipient on this
490 line.  The major reason for this is to prevent mail loops.  To set up
491 qmail to batch mail for a disconnected site the ISP-mailhost will have
492 normally put that site in its `Virtualhosts' control file so it will
493 add a prefix to all mail addresses for this site. This results in mail
494 sent to 'username@userhost.userdom.dom.com' having a
495 \&`Delivered-To:' line of the form:
496 .sp
497 Delivered-To: mbox-userstr-username@userhost.userdom.dom.com
498 .sp
499 The ISP can make the 'mbox-userstr-' prefix anything they choose
500 but a string matching the user host name is likely.
501 By using the option `envelope Delivered-To:' you can make fetchmail reliably
502 identify the original envelope recipient, but you have to strip the
503 `mbox-userstr-' prefix to deliver to the correct user.
504 This is what this option is for.
505 .TP
506 .B --configdump
507 Parse the 
508 .I ~/.fetchmailrc
509 file, interpret any command-line options specified, and dump a
510 configuration report to standard output.  The configuration report is
511 a data structure assignment in the language Python.  This option
512 is meant to be used with an interactive 
513 .I ~/.fetchmailrc
514 editor written in Python.
515
516 .SH USER AUTHENTICATION AND ENCRYPTION
517 Every mode except ETRN requires authentication of the client.
518 Normal user authentication in 
519 .I fetchmail
520 is very much like the authentication mechanism of 
521 .IR ftp (1).
522 The correct user-id and password depend upon the underlying security
523 system at the mailserver.  
524 .PP
525 If the mailserver is a Unix machine on which you have an ordinary user 
526 account, your regular login name and password are used with 
527 .I fetchmail.
528 If you use the same login name on both the server and the client machines,
529 you needn't worry about specifying a user-id with the 
530 .B \-u
531 option \-\- 
532 the default behavior is to use your login name on the client machine as the 
533 user-id on the server machine.  If you use a different login name
534 on the server machine, specify that login name with the
535 .B \-u
536 option.  e.g. if your login name is 'jsmith' on a machine named 'mailgrunt',
537 you would start 
538 .I fetchmail 
539 as follows:
540 .IP
541 fetchmail -u jsmith mailgrunt
542 .PP
543 The default behavior of 
544 .I fetchmail
545 is to prompt you for your mailserver password before the connection is
546 established.  This is the safest way to use 
547 .I fetchmail
548 and ensures that your password will not be compromised.  You may also specify
549 your password in your
550 .I ~/.fetchmailrc
551 file.  This is convenient when using 
552 .I fetchmail
553 in daemon mode or with scripts.
554 .PP
555 If you do not specify a password, and
556 .I fetchmail
557 cannot extract one from your
558 .I .fetchmailrc
559 file, it will look for a 
560 .I .netrc
561 file in your home directory before requesting one interactively; if an
562 entry matching the mailserver is found in that file, the password will
563 be used.  See the
564 .IR ftp (1)
565 man page for details of the syntax of the
566 .I .netrc
567 file.  (This feature may allow you to avoid duplicating password
568 information in more than one file.)
569 .PP
570 On mailservers that do not provide ordinary user accounts, your user-id and 
571 password are usually assigned by the server administrator when you apply for 
572 a mailbox on the server.  Contact your server administrator if you don't know 
573 the correct user-id and password for your mailbox account.
574 .PP
575 Early versions of POP3 (RFC1081, RFC1225) supported a crude form of
576 independent authentication using the
577 .I rhosts
578 file on the mailserver side.  Under this RPOP variant, a fixed
579 per-user ID equivalent to a password was sent in clear over a link to
580 a reserved port, with the command RPOP rather than PASS to alert the
581 server that it should do special checking.  RPOP is supported
582 by
583 .I fetchmail
584 (you can specify `protocol RPOP' to have the program send `RPOP'
585 rather than `PASS') but its use is strongly discouraged.  This
586 facility was vulnerable to spoofing and was withdrawn in RFC1460.
587 .PP
588 RFC1460 introduced APOP authentication.  In this variant of POP3,
589 you register an APOP password on your server host (the program
590 to do this with on the server is probably called \fIpopauth\fR(8)).  You
591 put the same password in your 
592 .I .fetchmailrc
593 file.  Each time 
594 .I fetchmail
595 logs in, it sends a cryptographically secure hash of your password and
596 the server greeting time to the server, which can verify it by
597 checking its authorization database. 
598 .PP
599 If your \fIfetchmail\fR was built with Kerberos support and you specify 
600 Kerberos preauthentication (either with --auth or the \fI.fetchmailrc\fR
601 option \fBauthenticate kerberos_v4\fR) it will try to get a Kerberos
602 ticket from the mailserver at the start of each query.  Note: if
603 either the pollnane or via name is `hesiod', fetchmail will try to use
604 Hesiod to look up the mailserver.
605 .PP
606 If you use IMAP-K4, \fIfetchmail\fR will expect the IMAP server to have
607 RFC1731-conformant AUTHENTICATE KERBEROS_V4 capability, and will use it.
608 .PP
609 If you use IMAP-GSS, \fIfetchmail\fR will expect the IMAP server to have
610 RFC1731-conformant AUTHENTICATE GSSAPI capability, and will use it. 
611 Currently this has only been tested over Kerberos V, so you're expected
612 to already have a ticket-granting ticket. You may pass a username different
613 from your principal name using the standard \fB--user\fR command or by
614 the \fI.fetchmailrc\fR option \fBuser\fR.
615 .PP
616 If you are using POP3, and the server issues a one-time-password
617 challenge conforming to RFC1938, \fIfetchmail\fR will use your
618 password as a pass phrase to generate the required response. This
619 avoids sending secrets over the net unencrypted.
620 .PP
621 Compuserve's RPA authentication (similar to APOP) is supported.  If
622 you are using POP3, and the RPA code has been compiled into your
623 binary, and you query a server in the Compuserve csi.com domain,
624 \fIfetchmail\fR will try to perform an RPA pass-phrase authentication
625 instead of sending over the password en clair.
626 .PP
627 If you are using IPsec, the -T (--netsec) option can be used to pass
628 an IP security request to be used when outgoing IP connections are
629 initialized.  You can also do this using the `netsec' server option
630 in the .fetchmailrc file.  In either case, the option value is a
631 string in the format accepted by the net_security_strtorequest() 
632 function of the inet6_apps library.
633
634 .SH DAEMON MODE
635 The 
636 .B --daemon
637 or
638 .B -d 
639 option runs 
640 .I fetchmail
641 in daemon mode.  You must specify a numeric argument which is a
642 polling interval in seconds.
643 .PP
644 In daemon mode, 
645 .I fetchmail
646 puts itself in background and runs forever, querying each specified
647 host and then sleeping for the given polling interval.
648 .PP
649 Simply invoking
650 .IP
651 fetchmail -d 900
652 .PP
653 will, therefore, poll all the hosts described in your 
654 .I ~/.fetchmailrc
655 file (except those explicitly excluded with the `skip' verb) once
656 every fifteen minutes.
657 .PP
658 It is possible to set a polling interval 
659 in your
660 .I ~/.fetchmailrc
661 file by saying `set daemon <interval>', where <interval> is an
662 integer number of seconds.  If you do this, fetchmail will always
663 start in daemon mode unless you override it with the command-line
664 option --daemon 0 or -d0.
665 .PP
666 Only one daemon process is permitted per user; in daemon mode,
667 .I fetchmail
668 makes a per-user lockfile to guarantee this.
669 .PP
670 Normally, calling fetchmail with a daemon in the background sends a
671 wakeup signal to the daemon, forcing it to poll mailservers
672 immediately.  (The wakeup signal is SIGHUP if fetchmail is running as
673 root, SIGUSR1 otherwise.)
674 .PP
675 The option
676 .B --quit
677 will kill a running daemon process instead of waking it up (if there
678 is no such option, 
679 .I fetchmail
680 notifies you).  If the --quit option is the only command-line option,
681 that's all there is to it.
682 .PP
683 The quit option may also be mixed with other command-line options; its
684 effect is to kill any running daemon before doing what the other
685 options specify in combination with the rc file.
686 .PP
687 The
688 .B -L
689 or
690 .B --logfile
691 option (keyword: set logfile) allows you to redirect status messages
692 emitted while detached into a specified logfile (follow the
693 option with the logfile name).  The logfile is opened for append, so
694 previous messages aren't deleted.  This is primarily useful for
695 debugging configurations.
696 .PP
697 The
698 .B --syslog
699 option (keyword: set syslog) allows you to redirect status and error
700 messages emitted to the
701 .IR syslog (3)
702 system daemon if available.
703 Messages are logged with an id of \fBfetchmail\fR, the facility \fBLOG_MAIL\fR,
704 and priorities \fBLOG_ERR\fR, \fBLOG_ALERT\fR or \fBLOG_INFO\fR.
705 This option is intended for logging status and error messages which
706 indicate the status of the daemon and the results while fetching mail
707 from the server(s).
708 Error messages for command line options and parsing the \fI.fetchmailrc\fR
709 file are still written to stderr, or the specified log file if the
710 The
711 .B --nosyslog
712 option turns off use of 
713 .IR syslog (3),
714 assuming it's turned on in the 
715 .I .fetchmailrc 
716 file.
717 .B -L
718 or
719 .B --logfile
720 option was used.
721 .PP
722 The 
723 .B \-N
724 or --nodetach option suppresses backgrounding and detachment of the
725 daemon process from its control terminal.  This is primarily useful
726 for debugging.  Note that this also causes the logfile option to be
727 ignored (though perhaps it shouldn't).
728 .PP
729 Note that while running in daemon mode polling a POP2 or IMAP2bis server,
730 transient errors (such as DNS failures or sendmail delivery refusals)
731 may force the fetchall option on for the duration of the next polling
732 cycle.  This is a robustness feature.  It means that if a message is
733 fetched (and thus marked seen by the mailserver) but not delivered
734 locally due to some transient error, it will be re-fetched during the
735 next poll cycle.  (The IMAP logic doesn't delete messages until
736 they're delivered, so this problem does not arise.)
737
738 .SH ADMINISTRATIVE OPTIONS
739 .PP
740 The 
741 .B --postmaster
742 option (keyword: set postmaster) specifies the last-resort username to
743 which multidrop mail is to be forwarded if no matching local recipient
744 can be found.  Normally this is just the user who invoked fetchmail.
745 If the invoking user is root, then the default of this option is
746 the user `postmaster'.
747 .PP
748 The 
749 .B --invisible
750 option (keyword: set invisible) tries to make fetchmail invisible.
751 Normally, fetchmail behaves like any other MTA would -- it generates a
752 Received header into each message describing its place in the chain of
753 transmission, and tells the MTA it forwards to that the mail came from
754 the machine fetchmail itself is running on.  If the invisible option
755 is on, the Received header is suppressed and fetchmail tries to spoof
756 the MTA it forwards to into thinking it came directly from the
757 mailserver host.
758
759 .SH RETRIEVAL FAILURE MODES
760 The protocols \fIfetchmail\fR uses to talk to mailservers are next to
761 bulletproof.  In normal operation forwarding to port 25, no message is
762 ever deleted (or even marked for deletion) on the host until the SMTP
763 listener on the client has acknowledged to \fIfetchmail\fR that the
764 message has been accepted for delivery.  When forwarding to an MDA,
765 however, there is more possibility of error (because there's no way
766 for fetchmail to get a reliable positive acknowledgement from the MDA).
767 .PP
768 The normal mode of \fIfetchmail\fR is to try to download only `new'
769 messages, leaving untouched (and undeleted) messages you have already
770 read directly on the server (or fetched with a previous \fIfetchmail
771 --keep\fR).  But you may find that messages you've already read on the
772 server are being fetched (and deleted) even when you don't specify
773 --all.  There are several reasons this can happen.
774 .PP
775 One could be that you're using POP2.  The POP2 protocol includes no
776 representation of `new' or `old' state in messages, so \fIfetchmail\fR
777 must treat all messages as new all the time.  But POP2 is obsolete, so
778 this is unlikely.
779 .PP
780 Under POP3, blame RFC1725.  That version of the POP3 protocol
781 specification removed the LAST command, and some POP servers follow it
782 (you can verify this by invoking \fIfetchmail -v\fR to the mailserver
783 and watching the response to LAST early in the query).  The
784 \fIfetchmail\fR code tries to compensate by using POP3's UID feature,
785 storing the identifiers of messages seen in each session until the
786 next session, in the \fI.fetchids\fR file.  But this doesn't track
787 messages seen with other clients, or read directly with a mailer on
788 the host but not deleted afterward.  A better solution would be to
789 switch to IMAP.
790 .PP
791 Another potential POP3 problem might be servers that insert messages
792 in the middle of mailboxes (some VMS implementations of mail are
793 rumored to do this).  The \fIfetchmail\fR code assumes that new
794 messages are appended to the end of the mailbox; when this is not true
795 it may treat some old messages as new and vice versa.  The only 
796 real fix for this problem is to  switch to IMAP.
797 .PP
798 The IMAP code uses the presence or absence of the server flag \eSeen
799 to decide whether or not a message is new.  Under Unix, it counts on
800 your IMAP server to notice the BSD-style Status flags set by mail user
801 agents and set the \eSeen flag from them when appropriate.  All Unix
802 IMAP servers we know of do this, though it's not specified by the IMAP
803 RFCs.  If you ever trip over a server that doesn't, the symptom will
804 be that messages you have already read on your host will look new to
805 the server.  In this (unlikely) case, only messages you fetched with
806 \fIfetchmail --keep\fR will be both undeleted and marked old.
807 .PP
808 In ETRN mode, \fIfetchmail\fR does not actually retrieve messages;
809 instead, it asks the server's SMTP listener to start a queue flush
810 to the client via SMTP.  Therefore it sends only undelivered messages.
811
812 .SH SPAM FILTERING
813 Many SMTP listeners allow administrators to set up `spam filters' that
814 block unsolicited email from specified domains.  A MAIL FROM line that
815 triggers this feature will elicit an SMTP response which
816 (unfortunately) varies according to the listener.
817 .PP
818 Newer versions of 
819 .I sendmail
820 return an error code of 571.  This return value
821 is blessed by RFC1893 as "Delivery not authorized, message refused".
822 .PP
823 According to current drafts of the replacement for RFC821, the correct
824 thing to return in this situation is 550 "Requested action not taken:
825 mailbox unavailable" (the draft adds "[E.g., mailbox not found, no
826 access, or command rejected for policy reasons].").
827 .PP
828 The
829 .I exim
830 MTA returns 501 "Syntax error in parameters or arguments", but will
831 move to 550 soon.
832 .PP
833 The
834 .I fetchmail
835 code recognizes and discards the message on any of a list of responses
836 that defaults to [571, 550, 501] but can be set with the `antispam'
837 option.  This is the
838 .I only
839 circumstance under which fetchmail ever discards mail.
840 .PP
841 If
842 .I fetchmail
843 is fetching from an IMAP server, the antispam response will be detected and
844 the message rejected immediately after the headers have been fetched,
845 without reading the message body.  Thus, you won't pay for downloading 
846 spam message bodies.
847 .PP
848 Mail that is spam-blocked triggers an RFC1892 bounce message informing
849 the originator that we do not accept mail from it.
850
851 .SH SMTP/ESMTP ERROR HANDLING
852 Besides the spam-blocking described above,fetchmail takes special
853 actions on the following SMTP/ESMTP error responses
854 .TP 5
855 452 (insufficient system storage)
856 Leave the message in the server mailbox for later retrieval.
857 .TP 5
858 552 (message exceeds fixed maximum message size)
859 Delete the message from the server.  Send bounce-mail to the originator.
860 .TP 5
861 553 (invalid sending domain)
862 Delete the message from the server.  Send bounce-mail to the originator.
863 .PP
864 Other errors trigger bounce mail back to the originator.
865
866 .SH THE RUN CONTROL FILE
867 The preferred way to set up fetchmail is to write a
868 \&\fI.fetchmailrc\fR file in your home directory (you may do this
869 directly, with a text editor, or indirectly via \fIfetchmailconf\fR).
870 When there is a conflict between the command-line arguments and the
871 arguments in this file, the command-line arguments take precedence.
872 .PP
873 To protect the security of your passwords, when --version is not on
874 your \fI~/.fetchmailrc\fR may not have more than 0600 (u=rw,g=,o=) permissions;
875 .I fetchmail
876 will complain and exit otherwise.
877 .PP
878 You may read the \fI.fetchmailrc\fR file as a list of commands to 
879 be executed when 
880 .I fetchmail
881 is called with no arguments.
882 .SS Run Control Syntax
883 .PP
884 Comments begin with a '#' and extend through the end of the line.
885 Otherwise the file consists of a series of server entries or global
886 option statements in a free-format, token-oriented syntax.
887 .PP
888 There are four kinds of tokens: grammar keywords, numbers
889 (i.e. decimal digit sequences), unquoted strings, and quoted strings.
890 A quoted string is bounded by double quotes and may contain
891 whitespace (and quoted digits are treated as a string).  An unquoted
892 string is any whitespace-delimited token that is neither numeric, string
893 quoted nor contains the special characters `,', `;', `:', or `='.
894 .PP
895 Any amount of whitespace separates tokens in server entries, but is
896 otherwise ignored. You may use standard C-style escapes (\en, \et,
897 \eb, octal, and hex) to embed non-printable characters or string
898 delimiters in strings.
899 .PP
900 Each server entry consists of one of the keywords `poll' or `skip',
901 followed by a server name, followed by server options, followed by any
902 number of user descriptions.  Note: the most common cause of syntax
903 errors is mixing up user and server options.
904 .PP
905 For backward compatibility, the word `server' is a synonym for `poll'.
906 .PP
907 You can use the noise keywords `and', `with',
908 \&`has', `wants', and `options' anywhere in an entry to make
909 it resemble English.  They're ignored, but but can make entries much
910 easier to read at a glance.  The punctuation characters ':', ';' and
911 \&',' are also ignored.
912 .PP
913 .SS Poll vs. Skip
914 The `poll' verb tells fetchmail to query this host when it is run with
915 no arguments.  The `skip' verb tells
916 .I fetchmail 
917 not to poll this host unless it is explicitly named on the command
918 line.  (The `skip' verb allows you to experiment with test entries
919 safely, or easily disable entries for hosts that are temporarily down.)
920 .PP
921 .SS Keyword/Option Summary
922 Here are the legal options.  Keyword suffixes enclosed in
923 square brackets are optional.  Those corresponding to command-line
924 options are followed by `-' and the appropriate option letter.
925
926 Here are the legal global options:
927
928 .TS
929 l l lw34.
930 Keyword         Opt     Function
931 _
932 set daemon      \&      T{
933 Set a background poll interval in seconds
934 T}
935 set postmaster          \&      T{
936 Give the name of the last-resort mail recipient
937 T}
938 set logfile     \&      T{
939 Name of a file to dump error and status messages to
940 T}
941 set idfile      \&      T{
942 Name of the file to store UID lists in
943 T}
944 set syslog      \&      T{
945 Do error logging through syslog(3).
946 T}
947 set nosyslog    \&      T{
948 Turn off error logging through syslog(3).
949 T}
950 .TE
951
952 Here are the legal server options:
953
954 .TS
955 l l lw34.
956 Keyword         Opt     Function
957 _
958 via             \&      T{
959 Specify DNS name of mailserver, overriding poll name
960 T}
961 proto[col]      -p      T{
962 Specify protocol (case insensitive):
963 POP2, POP3, IMAP, IMAP-K4, IMAP-GSS, APOP, KPOP
964 T}
965 port            -P      T{
966 Specify TCP/IP service port
967 T}
968 auth[enticate]  -A      T{
969 Set preauthentication type (default `password')
970 T}
971 timeout         -t      T{
972 Server inactivity timeout in seconds (default 300)
973 T}
974 envelope        -E      T{
975 Specify envelope-address header name
976 T}
977 no envelope     \&      T{
978 Disable looking for envelope address
979 T}
980 qvirtual        -Q      T{
981 Qmail virtual domain prefix to remove from user name
982 T}
983 aka             \&      T{
984 Specify alternate DNS names of mailserver
985 T}
986 interface       -I      T{
987 specify IP interface(s) that must be up for server poll to take place
988 T}
989 monitor         -M      T{
990 Specify IP address to monitor for activity
991 T}
992 plugin          \&      T{
993 Specify command through which to make server connections.
994 T}
995 plugout         \&      T{
996 Specify command through which to make listener connections.
997 T}
998 dns             \&      T{
999 Enable DNS lookup for multidrop (default)
1000 T}
1001 no dns          \&      T{
1002 Disable DNS lookup for multidrop
1003 T}
1004 checkalias      \&      T{
1005 Do comparison by IP address for multidrop
1006 T}
1007 no checkalias   \&      T{
1008 Do comparison by name for multidrop (default)
1009 T}
1010 uidl            -U      T{
1011 Force POP3 to use client-side UIDLs
1012 T}
1013 no uidl         \&      T{
1014 Turn off POP3 use of client-side UIDLs (default)
1015 T}
1016 .TE
1017
1018 Here are the legal user options:
1019
1020 .TS
1021 l l lw34.
1022 Keyword         Opt     Function
1023 _
1024 user[name]      -u      T{
1025 Set remote user name 
1026 (local user name if name followed by `here') 
1027 T}
1028 is              \&      T{
1029 Connect local and remote user names
1030 T}
1031 to              \&      T{
1032 Connect local and remote user names
1033 T}
1034 pass[word]      \&      T{
1035 Specify remote account password
1036 T}
1037 folder          -r      T{
1038 Specify remote folder to query
1039 T}
1040 smtphost        -S      T{
1041 Specify smtp host(s) to forward to
1042 T}
1043 smtpaddress     -D      T{
1044 Specify the domain to be put in RCPT TO lines
1045 T}
1046 antispam        -Z      T{
1047 Specify what SMTP returns are interpreted as spam-policy blocks
1048 T}
1049 mda             -m      T{
1050 Specify MDA for local delivery
1051 T}
1052 bsmtp           -o      T{
1053 Specify BSMTP batch file to append to
1054 T}
1055 preconnect      \&      T{
1056 Command to be executed before each connection
1057 T}
1058 postconnect     \&      T{
1059 Command to be executed after each connection
1060 T}
1061 keep            -k      T{
1062 Don't delete seen messages from server
1063 T}
1064 flush           -F      T{
1065 Flush all seen messages before querying
1066 T}
1067 fetchall        -a      T{
1068 Fetch all messages whether seen or not
1069 T}
1070 rewrite         \&      T{
1071 Rewrite destination addresses for reply (default)
1072 T}
1073 stripcr         \&      T{
1074 Strip carriage returns from ends of lines
1075 T}
1076 forcecr         \&      T{
1077 Force carriage returns at ends of lines
1078 T}
1079 pass8bits       \&      T{
1080 Force BODY=8BITMIME to ESMTP listener
1081 T}
1082 dropstatus      \&      T{
1083 Strip Status and X-Mozilla-Status lines out of incoming mail
1084 T}
1085 mimedecode      \&      T{
1086 Convert quoted-printable to 8-bit in MIME messages
1087 T}
1088 no keep         -K      T{
1089 Delete seen messages from server (default)
1090 T}
1091 no flush        \&      T{
1092 Don't flush all seen messages before querying (default)
1093 T}
1094 no fetchall     \&      T{
1095 Retrieve only new messages (default)
1096 T}
1097 no rewrite      \&      T{
1098 Don't rewrite headers
1099 T}
1100 no stripcr      \&      T{
1101 Don't strip carriage returns (default)
1102 T}
1103 no forcecr      \&      T{
1104 Don't force carriage returns at EOL (default)
1105 T}
1106 no pass8bits    \&      T{
1107 Don't force BODY=8BITMIME to ESMTP listener (default)
1108 T}
1109 no dropstatus   \&      T{
1110 Don't drop Status headers (default)
1111 T}
1112 no mimedecode   \&      T{
1113 Don't convert quoted-printable to 8-bit in MIME messages (default)
1114 T}
1115 limit           -l      T{
1116 Set message size limit
1117 T}
1118 warnings        -l      T{
1119 Set message size warning interval
1120 T}
1121 batchlimit      -b      T{
1122 Max # messages to fetch in single connect
1123 T}
1124 fetchlimit      -B      T{
1125 Max # messages to forward in single connect
1126 T}
1127 expunge         -e      T{
1128 Perform an expunge on every #th message (IMAP only)
1129 T}
1130 properties      \&      T{
1131 String value is ignored by fetchmail (may be used by extension scripts)
1132 T}
1133 .TE
1134 .PP
1135 Remember that all user options must \fIfollow\fR all server options.
1136 .PP
1137 In the .fetchmailrc file, the `envelope' string argument may be
1138 preceded by a whitespace-separated number.  This number, if specified,
1139 is the number of such headers to skip (that is, an argument of 1
1140 selects the second header of the given type).  This is sometime useful
1141 for ignoring bogus Received headers created by an ISP's local delivery
1142 agent.
1143 .SS Keywords Not Corresponding To Option Switches
1144 .PP
1145 The `folder' and `smtphost' options (unlike their command-line
1146 equivalents) can take a space- or comma-separated list of names
1147 following them.
1148 .PP
1149 All options correspond to the obvious command-line arguments, except
1150 the following: `via', `interval', `aka', `is', `to', `dns'/`no dns',
1151 `checkalias'/`no checkalias', `password', `preconnect', `postconnect',
1152 `localdomains', `stripcr'/`no stripcr', `forcecr'/`no forcecr',
1153 `pass8bits'/`no pass8bits' `dropstatus/no dropstatus', `mimedecode/no
1154 mimedecode', and `no envelope'.
1155 .PP
1156 The `via' option is for use with ssh, or if you want to have more
1157 than one configuration pointing at the same site.  If it is present,
1158 the string argument will be taken as the actual DNS name of the 
1159 mailserver host to query.
1160 This will override the argument of poll, which can then simply be a
1161 distinct label for the configuration (e.g. what you would give on the
1162 command line to explicitly query this host).
1163 If the `via' name is `localhost', the poll name will also still be
1164 used as a possible match in multidrop mode; otherwise the `via' name
1165 will be used instead and the poll name will be purely a label.
1166 .PP
1167 The `interval' option (which takes a numeric argument) allows you to poll a
1168 server less frequently than the basic poll interval.  If you say
1169 \&`interval N' the server this option is attached to will only be
1170 queried every N poll intervals. 
1171 .PP
1172 The `is' or `to' keywords associate the following local (client)
1173 name(s) (or server-name to client-name mappings separated by =) with
1174 the mailserver user name in the entry.  If an is/to list has `*' as
1175 its last name, unrecognized names are simply passed through.
1176 .PP
1177 A single local name can be used to support redirecting your mail when
1178 your username on the client machine is different from your name on the
1179 mailserver.  When there is only a single local name, mail is forwarded
1180 to that local username regardless of the message's Received, To, Cc,
1181 and Bcc headers.  In this case 
1182 .I fetchmail
1183 never does DNS lookups.
1184 .PP
1185 When there is more than one local name (or name mapping) the
1186 \fIfetchmail\fR code does look at the Received, To, Cc, and Bcc
1187 headers of retrieved mail (this is `multidrop mode').  It looks for
1188 addresses with hostname parts that match your poll name or your `via',
1189 `aka' or `localdomains' options, and usually also for hostname parts
1190 which DNS tells it are aliases of the mailserver.  See the discussion
1191 of `dns', `checkalias', `localdomains', and `aka' for details on how
1192 matching addresses are handled.
1193 .PP
1194 If \fIfetchmail\fR cannot match any mailserver usernames or
1195 localdomain addresses, the default recipient is the value of the
1196 `postmaster' global option if that has been set; otherwise it's the
1197 calling user (as set by the USER or LOGNAME variable in the
1198 environment).
1199 .PP
1200 The `dns' option (normally on) controls the way addresses from
1201 multidrop mailboxes are checked.  On, it enables logic to check each
1202 host address that doesn't match an `aka' or `localdomains' declaration
1203 by looking it up with DNS.  When a mailserver username is recognized
1204 attached to a matching hostname part, its local mapping is added to
1205 the list of local recipients.
1206 .PP
1207 The `checkalias' option (normally off) extends the lookups performed
1208 by the `dns' keyword in multidrop mode, providing a way to cope with
1209 remote MTAs that identify themselves using their canonical name, while
1210 they're polled using an alias.
1211 When such a server is polled, checks to extract the envelope address
1212 fail, and
1213 .IR fetchmail 
1214 reverts to delivery using the To/Cc/Bcc headers (See below 
1215 `Header vs. Envelope addresses'). 
1216 Specifying this option instructs
1217 .IR fetchmail 
1218 to retrieve all the IP addresses associated with both the poll name
1219 and the name used by the remote MTA and to do a comparison of the IP
1220 addresses.  This comes in handy in situations where the remote server
1221 undergoes frequent canonical name changes, that would otherwise
1222 require modifications to the rcfile.  `checkalias' has no effect if
1223 `no dns' is specified in the rcfile.
1224 .PP
1225 The `aka' option is for use with multidrop mailboxes.  It allows you
1226 to pre-declare a list of DNS aliases for a server.  This is an
1227 optimization hack that allows you to trade space for speed.  When
1228 .IR fetchmail ,
1229 while processing a multidrop mailbox, grovels through message headers
1230 looking for names of the mailserver, pre-declaring common ones can
1231 save it from having to do DNS lookups.
1232 .PP
1233 The `localdomains' option allows you to declare a list of domains
1234 which fetchmail should consider local.  When fetchmail is parsing
1235 address lines in multidrop modes, and a trailing segment of a host
1236 name matches a declared local domain, that address is passed through
1237 to the listener or MDA unaltered (local-name mappings are \fInot\fR
1238 applied).
1239 .PP
1240 If you are using `localdomains', you may also need to specify \&`no
1241 envelope', which disables \fIfetchmail\fR's normal attempt to deduce
1242 an envelope address from the Received line or X-Envelope-To header or
1243 whatever header has been previously set by `envelope'.  If you set `no
1244 envelope' in the defaults entry it is possible to undo that in
1245 individual entries by using `envelope <string>'.  As a special case,
1246 \&`envelope "Received"' restores the default parsing of
1247 Received lines.
1248 .PP
1249 The \fBpassword\fR option requires a string argument, which is the password
1250 to be used with the entry's server.
1251 .PP
1252 The `preconnect' keyword allows you to specify a shell command to be
1253 executed just before each time
1254 .I fetchmail
1255 establishes a mailserver connection.  This may be useful if you are 
1256 attempting to set up secure POP connections with the aid of
1257 .IR ssh (1).
1258 If the command returns a nonzero status, the poll of that mailserver
1259 will be aborted.
1260 .PP
1261 Similarly, the `postconnect' keyword similarly allows you to specify a
1262 shell command to be executed just after each time a mailserver
1263 connection is taken down.
1264 .PP
1265 The `forcecr' option controls whether lines terminated by LF only are
1266 given CRLF termination before forwarding.  Strictly speaking RFC821
1267 requires this, but few MTAs enforce the requirement it so this option
1268 is normally off (only one such MTA, qmail, is in significant use at
1269 time of writing).  
1270 .PP
1271 The `stripcr' option controls whether carriage returns are stripped
1272 out of retrieved mail before it is forwarded.  It is normally not
1273 necessary to set this, because it defaults to `on' (CR stripping
1274 enabled) when there is an MDA declared but `off' (CR stripping
1275 disabled) when forwarding is via SMTP.  If `stripcr' and `forcecr' are
1276 both on, `stripcr' will override.
1277 .PP
1278 The `pass8bits' option exists to cope with Microsoft mail programs that
1279 stupidly slap a "Content-Transfer-Encoding: 7bit" on everything.  With
1280 this option off (the default) and such a header present, 
1281 .I fetchmail
1282 declares BODY=7BIT to an ESMTP-capable listener; this causes problems for
1283 messages actually using 8-bit ISO or KOI-8 character sets, which will
1284 be garbled by having the high bits of all characters stripped.  If
1285 \&`pass8bits' is on, 
1286 .I fetchmail
1287 is forced to declare BODY=8BITMIME to any ESMTP-capable listener.  If
1288 the listener is 8-bit-clean (as all the major ones now are) the right
1289 thing will probably result.
1290 .PP
1291 The `dropstatus' option controls whether nonempty Status and
1292 X-Mozilla-Status lines are retained in fetched mail (the default) or
1293 discarded.  Retaining them allows your MUA to see what messages (if
1294 any) were marked seen on the server.  On the other hand, it can
1295 confuse some new-mail notifiers, which assume that anything with a
1296 Status line in it has been seen.  (Note: the empty Status lines
1297 inserted by some buggy POP servers are unconditionally discarded.)
1298 .PP
1299 The `mimedecode' option controls whether MIME messages using the
1300 quoted-printable encoding are automatically converted into pure
1301 8-bit data. If you are delivering mail to an ESMTP-capable,
1302 8-bit-clean listener (that includes all of the major programs
1303 like sendmail), then this will automatically convert quoted-printable
1304 message headers and data into 8-bit data, making it easier to
1305 understand when reading mail. If your e-mail programs know how to
1306 deal with MIME messages, then this option is not needed.
1307 .PP
1308 The `properties' option is an extension mechanism.  It takes a string
1309 argument, which is ignored by fetchmail itself.  The string argument may be
1310 used to store configuration information for scripts which require it.
1311 In particular, the output of `--configdump' option will make properties
1312 associated with a user entry readily available to a Python script.
1313 .PP
1314 .SS Miscellaneous Run Control Options
1315 The words `here' and `there' have useful English-like
1316 significance.  Normally `user eric is esr' would mean that 
1317 mail for the remote user `eric' is to be delivered to `esr',
1318 but you can make this clearer by saying `user eric there is esr here',
1319 or reverse it by saying `user esr here is eric there'
1320 .PP
1321 Legal protocol identifiers for use with the `protocol' keyword are:
1322
1323     auto (or AUTO)
1324     pop2 (or POP2)
1325     pop3 (or POP3)
1326     sdps (or SDPS)
1327     imap (or IMAP)
1328     imap-k4 (or IMAP-K4)
1329     imap-gss (or IMAP-GSS)
1330     apop (or APOP)
1331     kpop (or KPOP)
1332
1333 .PP
1334 Legal authentication types are `password' or `kerberos'.  The former
1335 specifies authentication by normal transmission of a password (the
1336 password may be plaintext or subject to protocol-specific encryption
1337 as in APOP); the second tells \fIfetchmail\fR to try to get a Kerberos
1338 ticket at the start of each query instead, and send an arbitrary
1339 string as the password.
1340 .PP
1341 Specifying `kpop' sets POP3 protocol over port 1109 with Kerberos V4
1342 preauthentication.  These defaults may be overridden by later options.
1343 .PP
1344 There are currently three global option statements; `set logfile'
1345 followed by a string sets the same global specified by --logfile.  A
1346 command-line --logfile option will override this.  Also, `set daemon'
1347 sets the poll interval as --daemon does.  This can be overridden by
1348 a command-line --daemon option; in particular --daemon 0 can be used 
1349 to force foreground operation. Finally, `set syslog' sends log
1350 messages to syslogd(8).
1351
1352 .SH INTERACTION WITH RFC 822
1353 When trying to determine the originating address of a message,
1354 fetchmail looks through headers in the following order: 
1355
1356         Return-Path:
1357         Resent-Sender:
1358         Sender:
1359         Resent-From:
1360         From:
1361         Reply-To:
1362         Apparently-From:
1363
1364 The originating address is used for logging, and to set the MAIL FROM
1365 address when forwarding to SMTP.  This order is intended to cope
1366 gracefully with receiving mailing list messages in multidrop mode. The
1367 intent is that if a local address doesn't exist, the bounce message
1368 won't be returned blindly to the author or to the list itself, but
1369 rather to the list manager (which is less annoying).
1370
1371 In multidrop mode, destination headers are processed as follows:
1372 First, fetchmail looks for the Received: header (or whichever one is
1373 specified by the `envelope' option) to determine the local
1374 recipient address. If the mail is addressed to more than one recipient,
1375 the Received line won't contain any information regarding recipient addresses.
1376
1377 Then fetchmail looks for the Resent-To:, Resent-Cc:, and Resent-Bcc:
1378 lines.  If they exists, they should contain the final recipients and
1379 have precedence over their To:/Cc:/Bcc: counterparts.  If the Resent-*
1380 lines doesn't exist, the To:, Cc:, Bcc: and Apparently-To: lines are
1381 looked for. (The presence of a Resent-To: is taken to imply that the
1382 person referred by the To: address has already received the original
1383 copy of the mail).
1384
1385 .SH CONFIGURATION EXAMPLES
1386 Basic format is:
1387
1388 .nf
1389   poll SERVERNAME protocol PROTOCOL username NAME password PASSWORD 
1390 .fi
1391 .PP
1392 Example:
1393
1394 .nf
1395   poll pop.provider.net protocol pop3 username jsmith password secret1
1396 .fi
1397 .PP
1398 Or, using some abbreviations:
1399
1400 .nf
1401   poll pop.provider.net proto pop3 user jsmith password secret1
1402 .fi
1403 .PP
1404 Multiple servers may be listed:
1405
1406 .nf
1407   poll pop.provider.net proto pop3 user jsmith pass secret1
1408   poll other.provider.net proto pop2 user John.Smith pass My^Hat
1409 .fi
1410
1411 Here's a version of those two with more whitespace and some noise words: 
1412
1413 .nf
1414   poll pop.provider.net proto pop3
1415       user jsmith, with password secret1, is jsmith here;
1416   poll other.provider.net proto pop2:
1417       user John.Smith, with password My^Hat, is John.Smith here;
1418 .fi
1419
1420 This version is much easier to read and doesn't cost significantly
1421 more (parsing is done only once, at startup time).
1422
1423 .PP
1424 If you need to include whitespace in a parameter string, enclose the
1425 string in double quotes.  Thus:
1426
1427 .nf
1428   poll mail.provider.net with proto pop3:
1429         user jsmith there has password "u can't krak this"
1430                     is jws here and wants mda "/bin/mail"
1431 .fi
1432
1433 You may have an initial server description headed by the keyword
1434 `defaults' instead of `poll' followed by a name.  Such a record
1435 is interpreted as defaults for all queries to use. It may be overwritten
1436 by individual server descriptions.  So, you could write:
1437
1438 .nf
1439   defaults proto pop3
1440         user jsmith
1441   poll pop.provider.net
1442         pass secret1
1443   poll mail.provider.net
1444         user jjsmith there has password secret2
1445 .fi
1446
1447 It's possible to specify more than one user per server (this is only
1448 likely to be useful when running fetchmail in daemon mode as root).
1449 The `user' keyword leads off a user description, and every user specification
1450 in a multi-user entry must include it.  Here's an example:
1451
1452 .nf
1453   poll pop.provider.net proto pop3 port 3111
1454         user jsmith with pass secret1 is smith here
1455         user jones with pass secret2 is jjones here
1456 .fi
1457
1458 This associates the local username `smith' with the pop.provider.net
1459 username `jsmith' and the local username `jjones' with the
1460 pop.provider.net username `jones'.
1461 .PP
1462 Here's what a simple retrieval configuration for a multi-drop mailbox
1463 looks like:
1464
1465 .nf
1466   poll pop.provider.net:
1467         user maildrop with pass secret1 to golux hurkle=happy snark here
1468 .fi
1469
1470 This says that the mailbox of account `maildrop' on the server is a
1471 multi-drop box, and that messages in it should be parsed for the
1472 server user names `golux', `hurkle', and `snark'.  It further
1473 specifies that `golux' and `snark' have the same name on the
1474 client as on the server, but mail for server user `hurkle' should be
1475 delivered to client user `happy'.
1476 .PP
1477 Here's an example of another kind of multidrop connection:
1478
1479 .nf
1480   poll pop.provider.net localdomains loonytoons.org toons.org:
1481         user maildrop with pass secret1 to esr * here
1482 .fi
1483
1484 This also says that the mailbox of account `maildrop' on the server is
1485 a multi-drop box.  It tells fetchmail that any address in the
1486 loonytoons.org or toons.org domains (including subdomain addresses like
1487 `joe@daffy.loonytoons.org') should be passed through to the local SMTP
1488 listener without modification.  Be careful of mail loops if you do this!
1489 .PP
1490 Here's an example configuration using ssh.  The queries go through an
1491 ssh connecting local port 1234 to port 110 on mailhost.net; the
1492 preconnect command sets up the ssh.
1493
1494 .nf
1495 poll mailhost.net via localhost port 1234 with proto pop3:
1496         preconnect "ssh -f -L 1234:mailhost.net:110
1497                 mailhost.net sleep 20 </dev/null >/dev/null";
1498 .fi
1499
1500 .SH THE USE AND ABUSE OF MULTIDROP MAILBOXES
1501 Use the multiple-local-recipients feature with caution -- it can bite.
1502 Also note that all multidrop features are ineffective in ETRN mode.
1503
1504 .SS Header vs. Envelope addresses 
1505 The fundamental problem is that by having your mailserver toss several
1506 peoples' mail in a single maildrop box, you may have thrown away
1507 potentially vital information about who each piece of mail was
1508 actually addressed to (the `envelope address', as opposed to the
1509 header addresses in the RFC822 To/Cc/Bcc headers).  This `envelope
1510 address' is the address you need in order to reroute mail properly.
1511 .PP
1512 Sometimes 
1513 .I fetchmail
1514 can deduce the envelope address.  If the mailserver MTA is
1515 .I sendmail
1516 and the item of mail had just one recipient, the MTA will have written
1517 a `by/for' clause that gives the envelope addressee into its Received
1518 header. But this doesn't work reliably for other MTAs, nor if there is
1519 more than one recipient.  By default, \fIfetchmail\fR looks for
1520 envelope addresses in these lines; you can restore this default with
1521 -E "Received" or \&`envelope Received'.
1522 .PP
1523 Alternatively, some SMTP listeners and/or mail servers insert a header
1524 in each message containing a copy of the envelope addresses.  This
1525 header (when it exists) is often `X-Envelope-To'.  Fetchmail's
1526 assumption about this can be changed with the -E or `envelope' option.
1527 Note that writing an envelope header of this kind exposes the names of
1528 recipients (including blind-copy recipients) to all receivers of the
1529 messages; it is therefore regarded by some administrators as a
1530 security/privacy problem.
1531 .PP
1532 A slight variation of the `X-Envelope-To' header is the `Delivered-To' put
1533 by qmail to avoid mail loops. It will probably prefix the user name with a
1534 string that normally matches the user's domain. To remove this prefix you
1535 can use the -Q or `qvirtual' option.
1536 .PP
1537 Sometimes, unfortunately, neither of these methods works.  When they
1538 all fail, fetchmail must fall back on the contents of To/Cc/Bcc
1539 headers to try to determine recipient addressees -- and these are not
1540 reliable.  In particular, mailing-list software often ships mail with
1541 only the list broadcast address in the To header.
1542 .PP
1543 When
1544 .I fetchmail
1545 cannot deduce a recipient address that is local, and the intended
1546 recipient address was anyone other than fetchmail's invoking user,
1547 mail will get lost.  This is what makes the multidrop feature risky.
1548 .PP
1549 A related problem is that when you blind-copy a mail message, the Bcc
1550 information is carried \fIonly\fR as envelope address (it's not put
1551 in the headers fetchmail can see unless there is an X-Envelope
1552 header).  Thus, blind-copying to someone who gets mail over a
1553 fetchmail link will fail unless the the mailserver host routinely
1554 writes X-Envelope or an equivalent header into messages in your maildrop.
1555
1556 .SS Good Ways To Use Multidrop Mailboxes
1557 Multiple local names can be used to administer a mailing list from the
1558 client side of a \fIfetchmail\fR collection.  Suppose your name is
1559 \&`esr', and you want to both pick up your own mail and maintain a mailing
1560 list called (say) "fetchmail-friends", and you want to keep the alias
1561 list on your client machine.
1562 .PP
1563 On your server, you can alias \&`fetchmail-friends' to `esr'; then, in
1564 your \fI.fetchmailrc\fR, declare \&`to esr fetchmail-friends here'.
1565 Then, when mail including `fetchmail-friends' as a local address
1566 gets fetched, the list name will be appended to the list of
1567 recipients your SMTP listener sees.  Therefore it will undergo alias
1568 expansion locally.  Be sure to include `esr' in the local alias
1569 expansion of fetchmail-friends, or you'll never see mail sent only to
1570 the list.  Also be sure that your listener has the "me-too" option set
1571 (sendmail's -oXm command-line option or OXm declaration) so your name
1572 isn't removed from alias expansions in messages you send.
1573 .PP
1574 This trick is not without its problems, however.  You'll begin to see
1575 this when a message comes in that is addressed only to a mailing list
1576 you do \fInot\fR have declared as a local name.  Each such message
1577 will feature an `X-Fetchmail-Warning' header which is generated
1578 because fetchmail cannot find a valid local name in the recipient
1579 addresses.  Such messages default (as was described above) to being
1580 sent to the local user running
1581 .IR fetchmail ,
1582 but the program has no way to know that that's actually the right thing.
1583
1584 .SS Bad Ways To Abuse Multidrop Mailboxes
1585 Multidrop mailboxes and 
1586 .I fetchmail
1587 serving multiple users in daemon mode do not mix.  The problem, again, is
1588 mail from mailing lists, which typically does not have an individual
1589 recipient address on it.   Unless 
1590 .I fetchmail
1591 can deduce an envelope address, such mail will only go to the account
1592 running fetchmail (probably root).  Also, blind-copied users are very
1593 likely never to see their mail at all.
1594 .PP
1595 If you're tempted to use 
1596 .I fetchmail 
1597 to retrieve mail for multiple users from a single mail drop via POP or
1598 IMAP, think again (and reread the section on header and envelope
1599 addresses above).  It would be smarter to just let the mail sit in the
1600 mailserver's queue and use fetchmail's ETRN mode to trigger SMTP sends
1601 periodically (of course, this means you have to poll more frequently
1602 than the mailserver's expiry period).  If you can't arrange this, try
1603 setting up a UUCP feed.
1604 .PP
1605 If you absolutely \fImust\fR use multidrop for this purpose, make sure
1606 your mailserver writes an envelope-address header that fetchmail can
1607 see.  Otherwise you \fIwill\fR lose mail and it \fIwill\fR come back
1608 to haunt you.
1609
1610 .SS Speeding Up Multidrop Checking
1611 Normally, when multiple user are declared 
1612 .I fetchmail
1613 extracts recipient addresses as described above and checks each host
1614 part with DNS to see if it's an alias of the mailserver.  If so, the
1615 name mappings described in the to ... here declaration are done and
1616 the mail locally delivered.
1617 .PP
1618 This is the safest but also slowest method.  To speed it up,
1619 pre-declare mailserver aliases with `aka'; these are checked before
1620 DNS lookups are done.  If you're certain your aka list contains
1621 .B all
1622 DNS aliases of the mailserver (and all MX names pointing at it) 
1623 you can declare `no dns' to suppress DNS lookups entirely and
1624 \fIonly\fR match against the aka list.
1625
1626 .SH EXIT CODES
1627 To facilitate the use of 
1628 .I fetchmail
1629 in shell scripts, an exit code is returned to give an indication
1630 of what occurred during a given connection.
1631 .PP
1632 The exit codes returned by 
1633 .I fetchmail
1634 are as follows:
1635 .IP 0
1636 One or more messages were successfully retrieved (or, if the -c option
1637 was selected, were found waiting but not retrieved).
1638 .IP 1
1639 There was no mail awaiting retrieval.  (There may have been old mail still
1640 on the server but not selected for retrieval.)
1641 .IP 2
1642 An error was encountered when attempting to open a socket to retrieve
1643 mail.  If you don't know what a socket is, don't worry about it --
1644 just treat this as an 'unrecoverable error'.
1645 .IP 3
1646 The user authentication step failed.  This usually means that a bad 
1647 user-id, password, or APOP id was specified.
1648 .IP 4
1649 Some sort of fatal protocol error was detected.
1650 .IP 5
1651 There was a syntax error in the arguments to 
1652 .I fetchmail.
1653 .IP 6
1654 The run control file had bad permissions.
1655 .IP 7
1656 There was an error condition reported by the server.  Can also
1657 fire if
1658 .I fetchmail
1659 timed out while waiting for the server.
1660 .IP 8
1661 Client-side exclusion error.  This means 
1662 .I fetchmail
1663 either found another copy of itself already running, or failed in such
1664 a way that it isn't sure whether another copy is running.
1665 .IP 9
1666 The user authentication step failed because the server responded "lock
1667 busy".  Try again after a brief pause!  This error is not implemented
1668 for all protocols, nor for all servers.  If not implemented for your
1669 server, "3" will be returned instead, see above.  May be returned when
1670 talking to qpopper or other servers that can respond with "lock busy"
1671 or some similar text containing the word "lock".
1672 .IP 10
1673 The 
1674 .I fetchmail
1675 run failed while trying to do an SMTP port open or transaction.
1676 .IP 11
1677 Fatal DNS error.  Fetchmail encountered an error while performing
1678 a DNS lookup at startup and could not proceed.
1679 .IP 12
1680 BSMTP batch file could not be opened.
1681 .IP 23
1682 Internal error.  You should see a message on standard error with
1683 details.
1684 .PP
1685 When
1686 .I fetchmail
1687 queries more than one host, return status is 0 if \fIany\fR query
1688 successfully retrieved mail. Otherwise the returned error status is
1689 that of the last host queried.
1690
1691 .SH AUTHOR
1692 Eric S. Raymond <esr@snark.thyrsus.com>.  
1693 This program is descended from and replaces 
1694 .IR popclient , 
1695 by Carl Harris <ceharris@mal.com>; the internals have become quite different, 
1696 but some of its interface design is directly traceable to that
1697 ancestral program.
1698
1699 .SH FILES
1700 .TP 5
1701 ~/.fetchmailrc
1702 default run control file
1703 .TP 5
1704 ~/.fetchids
1705 default location of file associating hosts with last message IDs seen
1706 (used only with newer RFC1725-compliant POP3 servers supporting the
1707 UIDL command).
1708 .TP 5
1709 ~/.netrc 
1710 your FTP run control file, which (if present) will be searched for
1711 passwords as a last resort before prompting for one interactively.
1712 .TP 5
1713 ~/.fetchmail.pid
1714 lock file to help prevent concurrent runs (non-root mode).
1715 .TP 5
1716 /var/run/fetchmail.pid
1717 lock file to help prevent concurrent runs (root mode, Linux systems).
1718 .TP 5
1719 /etc/fetchmail.pid
1720 lock file to help prevent concurrent runs (root mode, systems without /var/run).
1721
1722 .SH ENVIRONMENT
1723 For correct initialization, 
1724 .I fetchmail
1725 requires either that both the USER and HOME environment variables are
1726 correctly set, or that \fBgetpwuid\fR(3) be able to retrieve a password
1727 entry from your user ID.
1728
1729 .SH SIGNALS
1730 If a
1731 .I fetchmail
1732 daemon is running as root, SIGHUP wakes it up from its sleep phase and
1733 forces a poll of all non-skipped servers (this is in accordance with
1734 the usual conventions for system daemons).
1735 .PP
1736 If
1737 .I fetchmail
1738 is running in daemon mode as non-root, use SIGUSR1 to wake it (this is
1739 so SIGHUP due to logout can retain the default action of killing it).
1740 .PP
1741 Running
1742 .I fetchmail
1743 in foreground while a background fetchmail is running will do
1744 whichever of these is appropriate to wake it up.
1745
1746 .SH BUGS AND KNOWN PROBLEMS
1747 Enabling the `mimedecode' option (which defaults to off) may render
1748 invalid any PGP signatures attached to mail with quoted-printable headers.
1749 This bug will be fixed in a future version.
1750 .PP
1751 The RFC822 address parser used in multidrop mode chokes on some
1752 @-addresses that are technically legal but bizarre.  Strange uses of
1753 quoting and embedded comments are likely to confuse it.
1754 .PP
1755 Use of any of the supported protocols other than POP3 with OTP or RPA, APOP,
1756 KPOP, IMAP-K4, IMAP-GSS, or ETRN requires that the program send unencrypted
1757 passwords over the TCP/IP connection to the mailserver.  This creates
1758 a risk that name/password pairs might be snaffled with a packet
1759 sniffer or more sophisticated monitoring software.  Under Linux, the
1760 --interface option can be used to restrict polling to availability of
1761 a specific interface device with a specific local IP address, but
1762 snooping is still possible if (a) either host has a network device
1763 that can be opened in promiscuous mode, or (b) the intervening network
1764 link can be tapped.
1765 .PP
1766 Use of the %F or %T escapes in an mda option could open a security
1767 hole, because they pass text manipulable by an attacker to a shell
1768 command.  Potential shell characters are replaced by `_' before
1769 execution.  The hole is further reduced by the fact that fetchmail
1770 temporarily discards any suid privileges it may have while running the
1771 MDA.  For maximum safety, however, don't use an mda command containing
1772 %F or %T when fetchmail is run from the root account itself.
1773 .PP
1774 Fetchmail's method of sending bouncemail requires that port 25 of localhost
1775 be available for sending mail via SMTP.
1776 .PP
1777 Send comments, bug reports, gripes, and the like to the
1778 fetchmail-friends list <fetchmail-friends@ccil.org>.  An HTML FAQ is
1779 available at the fetchmail home page; surf to
1780 http://www.tuxedo.org/~esr/fetchmail or do a WWW search for pages with
1781 `fetchmail' in their titles.
1782
1783 .SH SEE ALSO
1784 mutt(1), elm(1), mail(1), sendmail(8), popd(8), imapd(8)
1785 .SH APPLICABLE STANDARDS
1786 .TP 5
1787 SMTP/ESMTP:
1788 RFC 821, RFC 1869, RFC 1652, RFC 1870, RFC1983, RFC 1985
1789 .TP 5
1790 mail:
1791 RFC 822, RFC 1892
1792 .TP 5
1793 POP2:
1794 RFC 937
1795 .TP 5
1796 POP3:
1797 RFC 1081, RFC 1225, RFC 1460, RFC 1725, RFC 1939
1798 .TP 5
1799 APOP:
1800 RFC 1460, RFC 1725, RFC 1939
1801 .TP 5
1802 RPOP:
1803 RFC 1081, RFC 1225
1804 .TP 5
1805 IMAP2/IMAP2BIS:
1806 RFC 1176, RFC 1732
1807 .TP 5
1808 IMAP4:
1809 RFC 1730, RFC 1731, RFC 1732, RFC 2060, RFC 2061
1810 .TP 5
1811 ETRN:
1812 RFC 1985
1813 .TP 5
1814 OTP:
1815 RFC 1938
1816 .TP 5
1817 LMTP:
1818 RFC 2033