aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1996-11-27 16:01:17 +0000
committerEric S. Raymond <esr@thyrsus.com>1996-11-27 16:01:17 +0000
commitd3567f9aa9a3e8c050eed0f2a56f636a108ceba4 (patch)
tree8c6aee8850f1170399acd83c9b5bb01826800da1 /driver.c
parentf9103441391f9a083d718ca0ef2724640e67d5c3 (diff)
downloadfetchmail-d3567f9aa9a3e8c050eed0f2a56f636a108ceba4.tar.gz
fetchmail-d3567f9aa9a3e8c050eed0f2a56f636a108ceba4.tar.bz2
fetchmail-d3567f9aa9a3e8c050eed0f2a56f636a108ceba4.zip
Cope with X-Envelope-To.
svn path=/trunk/; revision=572
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/driver.c b/driver.c
index af14372e..cd09c1e1 100644
--- a/driver.c
+++ b/driver.c
@@ -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.
*/