diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1996-11-27 16:01:17 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1996-11-27 16:01:17 +0000 |
commit | d3567f9aa9a3e8c050eed0f2a56f636a108ceba4 (patch) | |
tree | 8c6aee8850f1170399acd83c9b5bb01826800da1 | |
parent | f9103441391f9a083d718ca0ef2724640e67d5c3 (diff) | |
download | fetchmail-d3567f9aa9a3e8c050eed0f2a56f636a108ceba4.tar.gz fetchmail-d3567f9aa9a3e8c050eed0f2a56f636a108ceba4.tar.bz2 fetchmail-d3567f9aa9a3e8c050eed0f2a56f636a108ceba4.zip |
Cope with X-Envelope-To.
svn path=/trunk/; revision=572
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | driver.c | 14 |
2 files changed, 10 insertions, 5 deletions
@@ -9,6 +9,7 @@ pl 2.0.1 (): * Try to use envelope From. If that fails, fall back on calling-user. * Added FAQ file * Added `logfile' keyword to rc syntax. +* We now use X-Envelope-To headers. fetchmail-2.0 (Mon Nov 18 00:32:17 EST 1996): @@ -277,7 +277,7 @@ int delimited; /* does the protocol use a message delimiter? */ struct query *ctl; /* query control record */ { char buf [MSGBUFSIZE+1]; - char *bufp, *headers, *fromhdr, *tohdr, *cchdr, *bcchdr, *received_for; + char *bufp, *headers, *fromhdr,*tohdr,*cchdr,*bcchdr,*received_for,*envto; int n, oldlen, mboxfd; int inheaders,lines,sizeticker; FILE *sinkfp; @@ -287,7 +287,7 @@ struct query *ctl; /* query control record */ /* read the message content from the server */ inheaders = 1; - headers = fromhdr = tohdr = cchdr = bcchdr = received_for = NULL; + headers = fromhdr = tohdr = cchdr = bcchdr = received_for = envto = NULL; lines = 0; sizeticker = 0; oldlen = 0; @@ -365,7 +365,9 @@ struct query *ctl; /* query control record */ else if (!strncasecmp("To:", bufp, 3)) tohdr = bufp; else if (!strncasecmp("Apparently-To:", bufp, 14)) - tohdr = bufp; + envto = bufp; + else if (!strncasecmp("X-Envelope-To:", bufp, 14)) + envto = bufp; else if (!strncasecmp("Cc:", bufp, 3)) cchdr = bufp; else if (!strncasecmp("Bcc:", bufp, 4)) @@ -430,9 +432,11 @@ struct query *ctl; /* query control record */ /* is this a multidrop box? */ if (MULTIDROP(ctl)) { - if (received_for) + if (envto) /* We have the actual envelope addressee */ + find_server_names(envto, ctl, &xmit_names); + else if (received_for) /* - * We have the actual envelope addressee. + * We have the Received for addressee. * It has to be a mailserver address, or we * wouldn't have got here. */ |