diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1997-07-29 03:27:42 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1997-07-29 03:27:42 +0000 |
commit | c0383178914341c24198cc2208c836bfaf102396 (patch) | |
tree | 14eb5bd73221d51c73385f9eedfce16f7a40a60d | |
parent | c0f2cf52b48135e088b1ae9b3cdd3148518c9ae1 (diff) | |
download | fetchmail-c0383178914341c24198cc2208c836bfaf102396.tar.gz fetchmail-c0383178914341c24198cc2208c836bfaf102396.tar.bz2 fetchmail-c0383178914341c24198cc2208c836bfaf102396.zip |
Slightly changed handling of Envelope option.
svn path=/trunk/; revision=1195
-rw-r--r-- | NEWS | 2 | ||||
-rw-r--r-- | driver.c | 26 | ||||
-rw-r--r-- | fetchmail.man | 30 |
3 files changed, 32 insertions, 26 deletions
@@ -21,7 +21,7 @@ ------------------------------------------------------------------------------ fetchmail-4.0.4 () * Overhauled the build machinery. -* The `no envelope' option now suppresses parsing or Received lines. +* The `no envelope' option now suppresses parsing of Received lines. * Added Al Youngwerth as a backup maintainer. fetchmail-4.0.3 (Mon Jul 28 16:39:17 EDT 1997) @@ -679,13 +679,6 @@ char *realname; /* real name of host */ from_offs = (line - headers); else if (from_offs == -1 && !strncasecmp("Apparently-From:", line, 16)) from_offs = (line - headers); - - else if (ctl->server.envelope != STRING_DISABLED && env_offs == -1 - && !strncasecmp(ctl->server.envelope, - line, - strlen(ctl->server.envelope))) - env_offs = (line - headers); - else if (!strncasecmp("To:", line, 3)) { if (next_address >= sizeof(addressoffs)/sizeof(addressoffs[0])) @@ -710,14 +703,21 @@ char *realname; /* real name of host */ else if (!strncasecmp("Content-Transfer-Encoding:", line, 26)) ctt_offs = (line - headers); + else if (MULTIDROP(ctl) && ctl->server.envelope != STRING_DISABLED) + { + if (ctl->server.envelope + && strcasecmp(ctl->server.envelope, "received")) + { + if (env_offs == -1 && !strncasecmp(ctl->server.envelope, + line, + strlen(ctl->server.envelope))) + env_offs = (line - headers); + } #ifdef HAVE_RES_SEARCH - /* - * The `no envelope' option should also disable parsing of Received - * lines. - */ - else if (MULTIDROP(ctl) && ctl->server.envelope != STRING_DISABLED && !received_for && !strncasecmp("Received:", line, 9)) - received_for = parse_received(ctl, line); + else if (!received_for && !strncasecmp("Received:", line, 9)) + received_for = parse_received(ctl, line); #endif /* HAVE_RES_SEARCH */ + } } /* diff --git a/fetchmail.man b/fetchmail.man index 8e28bfdb..10093502 100644 --- a/fetchmail.man +++ b/fetchmail.man @@ -328,10 +328,11 @@ This option changes the header .I fetchmail assumes will carry a copy of the mail's envelope address. Normally this is `X-Envelope-To' but as this header is not standard, practice -varies. See the discussion of multidrop address handling below. Note: -do \fInot\fR say `envelope "Received"'; this is not necessary as fetchmail -will try to parse Received lines if `envelope' is not specified (unless -you explicitly disable Received parsing with `no envelope'). +varies. See the discussion of multidrop address handling below. As a +special case, `envelope "Received"' enables parsing of sendmail-style +Received lines. This is the default, and it should not be necessary +unless you have globally disable Received parsing with `no envelope' +in the \fI.fetchmailrc\fR file. .SH USER AUTHENTICATION Every mode except ETRN requires authentication of the client. @@ -785,7 +786,9 @@ envelope', which disables \fIfetchmail\fR's normal attempt to deduce an envelope address from the Received line or X-Envelope-To header or whatever header has been previously set by `envelope'. If you set `no envelope' in the defaults entry it is possible to undo that in -individual entries by using `envelope <string>'. +individual entries by using `envelope <string>'. As a special case, +\&`envelope "Received"' restores the default parsing of +Received lines. .PP The \fBpassword\fR option requires a string argument, which is the password to be used with the entry's server. @@ -996,8 +999,10 @@ can deduce the envelope address. If the mailserver MTA is .I sendmail and the item of mail had just one recipient, the MTA will have written a `for' clause that gives the envelope addressee into its Received -header. But this doesn't work reliably for other MTAs, nor if there is more -than one recipient. +header. But this doesn't work reliably for other MTAs, nor if there is +more than one recipient. By default, \fIfetchmail\fR looks for +envelope addresses in these lines; you can restore this default with +-E "Received" or \&`envelope Received'. .PP Alternatively, some SMTP listeners and/or mail servers insert a header in each message containing a copy of the envelope addresses. This @@ -1059,11 +1064,12 @@ running fetchmail (probably root). .PP If you're tempted to use .I fetchmail -to retrieve mail for multiple users via POP or IMAP, think again. -It would be smarter to just let it sit in the mailserver's queue and -use 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. +to retrieve mail for multiple users from a single mail drop via POP or +IMAP, think again. It would be smarter to just let it sit in the +mailserver's queue and use 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. .SS Speeding Up Multidrop Checking Normally, when multiple user are declared |