aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS5
-rw-r--r--driver.c4
-rw-r--r--fetchmail.c9
-rw-r--r--fetchmail.h3
-rw-r--r--fetchmail.man14
-rw-r--r--rcfile_l.l1
-rw-r--r--rcfile_y.y5
-rw-r--r--sample.rcfile3
8 files changed, 24 insertions, 20 deletions
diff --git a/NEWS b/NEWS
index 9646ad8c..1f255104 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,11 @@ features --
* New Makefile production to generate an RPM.
+* The `no received' option of 3.4 is gone. Instead, say `no envelope'.
+ This suppresses all attempts to extract an envelope address and route
+ based on it. If you set `no envelope' in the defaults entry it is possible
+ to undo that in individual entries by using `envelope <string>'.
+
bugs --
* Yet another fix to the password-shrouding logic.
diff --git a/driver.c b/driver.c
index 8ae41e13..3960429f 100644
--- a/driver.c
+++ b/driver.c
@@ -507,7 +507,7 @@ char *realname; /* real name of host */
else if (!strncasecmp("To:", line, 3))
to_offs = (line - headers);
- else if (ctl->server.received && env_offs == -1
+ else if (ctl->server.envelope != STRING_DISABLED && env_offs == -1
&& !strncasecmp(ctl->server.envelope,
line,
strlen(ctl->server.envelope)))
@@ -523,7 +523,7 @@ char *realname; /* real name of host */
ctt_offs = (line - headers);
#ifdef HAVE_RES_SEARCH
- else if (ctl->server.received && MULTIDROP(ctl) && !received_for && !strncasecmp("Received:", line, 9))
+ else if (ctl->server.envelope != STRING_DISABLED && MULTIDROP(ctl) && !received_for && !strncasecmp("Received:", line, 9))
received_for = parse_received(ctl, line);
#endif /* HAVE_RES_SEARCH */
}
diff --git a/fetchmail.c b/fetchmail.c
index 2522bbf9..417f0424 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -652,7 +652,6 @@ static int load_params(int argc, char **argv, int optind)
DEFAULT(ctl->rewrite, TRUE);
DEFAULT(ctl->stripcr, (ctl->mda != (char *)NULL));
DEFAULT(ctl->server.dns, TRUE);
- DEFAULT(ctl->server.received, TRUE);
#undef DEFAULT
/* plug in the semi-standard way of indicating a mail address */
@@ -906,12 +905,12 @@ void dump_params (struct query *ctl)
printf(" DNS lookup for multidrop addresses is %sabled.\n",
ctl->server.dns ? "en" : "dis",
ctl->server.dns ? "off" : "on");
- printf(" Received-line parsing for envelope addresses is %sabled.\n",
- ctl->server.received ? "en" : "dis",
- ctl->server.received ? "off" : "on");
if (count > 1)
- printf(" Envelope header is assumed to be: %s\n", ctl->server.envelope);
+ if (ctl->server.envelope == STRING_DISABLED)
+ printf(" Envelope-address routing is disabled\n");
+ else
+ printf(" Envelope header is assumed to be: %s\n", ctl->server.envelope);
}
#ifdef linux
if (ctl->server.interface)
diff --git a/fetchmail.h b/fetchmail.h
index 2cc6da0a..eed7b1ea 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -75,7 +75,6 @@ struct hostdata /* shared among all user connections to given server */
char *envelope;
int skip;
int dns;
- int received;
#ifdef linux
char *interface;
@@ -246,3 +245,5 @@ int yylex(void);
#define FALSE 0
#define TRUE 1
+
+#define STRING_DISABLED (char *)-1
diff --git a/fetchmail.man b/fetchmail.man
index 13e94071..fcd5c350 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -607,14 +607,13 @@ Legal user options are
rewrite
stripcr
dns
- received
no keep
no flush
no fetchall
no rewrite
no stripcr
no dns
- no received
+ no envelope
limit
batchlimit
fetchlimit
@@ -623,7 +622,7 @@ Legal user options are
All options correspond to the obvious command-line arguments except
the following: `aka', `is', `to', `dns'/`no dns', `password',
\&`preconnect', `localdomains', `stripcr'/`no stripcr' and
-\&`received/no received'.
+\&`no received'.
.PP
The `is' or `to' keywords associate the following local (client)
name(s) (or server-name to client-name mappings separated by =) with
@@ -670,9 +669,12 @@ name matches a declared local doman, that address is passed through
to the listener or MDA unaltered (local-name mappings are \fInot\fR
applied).
.PP
-If you are using `localdomains', you may also need to specify
-\&`no received', which disables \fIfetchmail\fR's normal attempt
-to deduce an envelope address from the Received line.
+If you are using `localdomains', you may also need to specify \&`no
+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>'.
.PP
The \fBpassword\fR option requires a string argument, which is the password
to be used with the entry's server.
diff --git a/rcfile_l.l b/rcfile_l.l
index 4b1d9603..ef280e1a 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -61,7 +61,6 @@ fetchall { return FETCHALL; }
rewrite { return REWRITE; }
stripcr { return STRIPCR; }
dns { return DNS; }
-received { return RECEIVED; }
limit { return LIMIT; }
diff --git a/rcfile_y.y b/rcfile_y.y
index fdc295d5..06f3cd23 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -48,7 +48,7 @@ static void user_reset();
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
-%token NO KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT RECEIVED
+%token NO KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT
%%
@@ -123,9 +123,8 @@ serv_option : AKA alias_list
#endif /* linux */
}
| DNS {current.server.dns = FLAG_TRUE;}
- | RECEIVED {current.server.received = FLAG_TRUE;}
| NO DNS {current.server.dns = FLAG_FALSE;}
- | NO RECEIVED {current.server.received = FLAG_FALSE;}
+ | NO ENVELOPE {current.server.envelope = STRING_DISABLED;}
;
/*
diff --git a/sample.rcfile b/sample.rcfile
index 45f4170e..ded965c8 100644
--- a/sample.rcfile
+++ b/sample.rcfile
@@ -45,14 +45,13 @@
# rewrite
# stripcr
# dns
-# received
# no keep
# no flush
# no fetchall
# no rewrite
# no stripcr
# no dns
-# no received
+# no envelope
# limit -- must be followed by numeric size limit
# fetchlimit -- must be followed by numeric msg fetch limit
# batchlimit -- must be followed by numeric SMTP batch limit