aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--README10
-rw-r--r--driver.c2
-rw-r--r--fetchmail.c4
-rw-r--r--fetchmail.h1
-rw-r--r--fetchmail.man14
-rw-r--r--rcfile_l.l2
-rw-r--r--rcfile_y.y3
-rw-r--r--sample.rcfile2
9 files changed, 34 insertions, 7 deletions
diff --git a/NEWS b/NEWS
index f73bd083..bd7000df 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ features --
* The host that ETRN specifies is now set by the smtphost option.
+* It is now possible to suppress Received line parsing in multidrop mode
+ with a new `no received' per-server option.
+
bugs --
* The counter referred to by the batchlimit option used to count not only
diff --git a/README b/README
index 30d7940a..1520dfcd 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
fetchmail README
-fetchmail is a full-featured, robust, well-documented POP2, POP3,
-APOP, and IMAP batch mail retrieval/forwarding utility intended to be
+fetchmail is a full-featured, robust, well-documented POP2, POP3, RPOP,
+APOP, KPOP, and IMAP batch mail retrieval/forwarding utility intended to be
used over on-demand TCP/IP links (such as SLIP or PPP connections).
It retrieves mail from remote mail servers and forwards it to your
local (client) machine's delivery system, so it can then be be read by
@@ -44,7 +44,7 @@ Since 2.0:
2.0 and earlier versions:
- * **POP2, POP3, **APOP, **RPOP, **IMAP2bis, **IMAP4 support.
+ ** Support POP2, APOP, RPOP, IMAP2, IMAP2bis, IMAP3, IMAP4, IMAP4rev1.
** Support for Kerberos user authentication (either MIT or Cygnus).
@@ -62,6 +62,8 @@ Since 2.0:
** Support for retrieving and forwarding from multi-drop mailboxes
that is guaranteed not to cause mail loops.
+ * Support for POP3.
+
* Easy control via command line or free-format run control file.
* Daemon mode -- fetchmail can be run in background to poll
@@ -86,7 +88,7 @@ Since 2.0:
versions.
* Large user community -- fetchmail has a large user base (the
- author's beta list includes about two hundred people). This
+ author's beta list includes well over two hundred people). This
means feedback is rapid, bugs get found and fixed rapidly.
The fetchmail code appears to be stable and free of bugs affecting
diff --git a/driver.c b/driver.c
index 94711453..6e29d38f 100644
--- a/driver.c
+++ b/driver.c
@@ -519,7 +519,7 @@ char *realname; /* real name of host */
ctt_offs = (line - headers);
#ifdef HAVE_RES_SEARCH
- else if (MULTIDROP(ctl) && !received_for && !strncasecmp("Received:", line, 9))
+ else if (ctl->server.received && 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 702e2a67..2522bbf9 100644
--- a/fetchmail.c
+++ b/fetchmail.c
@@ -652,6 +652,7 @@ 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 */
@@ -905,6 +906,9 @@ 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);
diff --git a/fetchmail.h b/fetchmail.h
index 7ee72a2f..2cc6da0a 100644
--- a/fetchmail.h
+++ b/fetchmail.h
@@ -75,6 +75,7 @@ struct hostdata /* shared among all user connections to given server */
char *envelope;
int skip;
int dns;
+ int received;
#ifdef linux
char *interface;
diff --git a/fetchmail.man b/fetchmail.man
index 549fdfba..e128dc8a 100644
--- a/fetchmail.man
+++ b/fetchmail.man
@@ -605,17 +605,25 @@ Legal user options are
flush
fetchall
rewrite
+ stripcr
+ dns
+ received
no keep
no flush
no fetchall
no rewrite
+ no stripcr
+ no dns
+ no received
limit
+ batchlimit
fetchlimit
syslog
.PP
All options correspond to the obvious command-line arguments except
the following: `aka', `is', `to', `dns'/`no dns', `password',
-`preconnect', `localdomains', and `stripcr'.
+\&`preconnect', `localdomains', `stripcr'/`no stripcr' and
+\&`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
@@ -662,6 +670,10 @@ 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.
+.PP
The \fBpassword\fR option requires a string argument, which is the password
to be used with the entry's server.
.PP
diff --git a/rcfile_l.l b/rcfile_l.l
index 231b5c66..a2fe2cbb 100644
--- a/rcfile_l.l
+++ b/rcfile_l.l
@@ -61,6 +61,7 @@ fetchall { yylval.flag = FLAG_TRUE; return FETCHALL; }
rewrite { yylval.flag = FLAG_TRUE; return REWRITE; }
stripcr { yylval.flag = FLAG_TRUE; return STRIPCR; }
dns { yylval.flag = FLAG_TRUE; return DNS; }
+received { yylval.flag = FLAG_TRUE; return RECEIVED; }
no{WS}keep { yylval.flag = FLAG_FALSE; return KEEP; }
no{WS}flush { yylval.flag = FLAG_FALSE; return FLUSH; }
@@ -68,6 +69,7 @@ no{WS}fetchall { yylval.flag = FLAG_FALSE; return FETCHALL; }
no{WS}rewrite { yylval.flag = FLAG_FALSE; return REWRITE; }
no{WS}stripcr { yylval.flag = FLAG_FALSE; return REWRITE; }
no{WS}dns { yylval.flag = FLAG_FALSE; return DNS; }
+no{WS}received { yylval.flag = FLAG_FALSE; return RECEIVED; }
limit { return LIMIT; }
diff --git a/rcfile_y.y b/rcfile_y.y
index 3a22895b..7face2c3 100644
--- a/rcfile_y.y
+++ b/rcfile_y.y
@@ -49,7 +49,7 @@ static void user_reset();
%token <proto> PROTO
%token <sval> STRING
%token <number> NUMBER
-%token <flag> KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT
+%token <flag> KEEP FLUSH FETCHALL REWRITE STRIPCR DNS PORT RECEIVED
%%
@@ -124,6 +124,7 @@ serv_option : AKA alias_list
#endif /* linux */
}
| DNS {current.server.dns = $1;}
+ | RECEIVED {current.server.received = $1;}
;
/*
diff --git a/sample.rcfile b/sample.rcfile
index 995f4bb5..45f4170e 100644
--- a/sample.rcfile
+++ b/sample.rcfile
@@ -45,12 +45,14 @@
# rewrite
# stripcr
# dns
+# received
# no keep
# no flush
# no fetchall
# no rewrite
# no stripcr
# no dns
+# no received
# 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