aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS6
-rw-r--r--driver.c38
-rw-r--r--fetchmail-FAQ.html18
3 files changed, 30 insertions, 32 deletions
diff --git a/NEWS b/NEWS
index c8e8c44e..dcf647e0 100644
--- a/NEWS
+++ b/NEWS
@@ -4,9 +4,6 @@
form "foo"@bar.com are not parsed correctly, even though they are
technically RFC822 legal. The general problem is mentioned on the man page.
-* If a message has more than two destination headers of the same kind (such
- as To, or Cc), only the last one will be checked for multidrop addresses.
-
Features To Consider
* Generate bounce messages when delivery is refused. See RFC1891, RFC1894.
@@ -18,6 +15,9 @@
Release Notes:
------------------------------------------------------------------------------
+pl 3.9.9 ():
+* We can now process multiple To headers a la Microsoft Exchange Server.
+
pl 3.9.8 (Sat Jun 14 14:19:32 EDT 1997):
* Fetchmail is now normally built with optimization.
* POP2 support is no longer compiled by default, but you can configure
diff --git a/driver.c b/driver.c
index d5bb5650..908ad4fd 100644
--- a/driver.c
+++ b/driver.c
@@ -439,7 +439,7 @@ struct query *ctl; /* query control record */
char *realname; /* real name of host */
{
char buf[MSGBUFSIZE+1], return_path[MSGBUFSIZE+1];
- int from_offs, to_offs, cc_offs, bcc_offs, ctt_offs, env_offs;
+ int from_offs, ctt_offs, env_offs, addressoffs[128], next_address;
char *headers, *received_for;
int n, linelen, oldlen, ch, remaining;
char *cp;
@@ -450,14 +450,14 @@ char *realname; /* real name of host */
#endif /* HAVE_RES_SEARCH */
int olderrs;
- sizeticker = 0;
+ next_address = sizeticker = 0;
has_nuls = FALSE;
return_path[0] = '\0';
olderrs = ctl->errcount;
/* read message headers */
headers = received_for = NULL;
- from_offs = to_offs = cc_offs = bcc_offs = ctt_offs = env_offs = -1;
+ from_offs = ctt_offs = env_offs = -1;
oldlen = 0;
for (remaining = len; remaining > 0; remaining -= linelen)
{
@@ -592,20 +592,32 @@ char *realname; /* real name of host */
else if (from_offs == -1 && !strncasecmp("Apparently-From:", line, 16))
from_offs = (line - headers);
- else if (!strncasecmp("To:", line, 3))
- to_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]))
+ error(PS_UNDEFINED, errno, "too many destination headers");
+ addressoffs[next_address++] = (line - headers);
+ }
+
else if (!strncasecmp("Cc:", line, 3))
- cc_offs = (line - headers);
+ {
+ if (next_address >= sizeof(addressoffs)/sizeof(addressoffs[0]))
+ error(PS_UNDEFINED, errno, "too many destination headers");
+ addressoffs[next_address++] = (line - headers);
+ }
else if (!strncasecmp("Bcc:", line, 4))
- bcc_offs = (line - headers);
+ {
+ if (next_address >= sizeof(addressoffs)/sizeof(addressoffs[0]))
+ error(PS_UNDEFINED, errno, "too many destination headers");
+ addressoffs[next_address++] = (line - headers);
+ }
else if (!strncasecmp("Content-Transfer-Encoding:", line, 26))
ctt_offs = (line - headers);
@@ -656,16 +668,14 @@ char *realname; /* real name of host */
map_name(received_for, ctl, &xmit_names);
else
{
+ int i;
+
/*
* We haven't extracted the envelope address.
* So check all the header addresses.
*/
- if (to_offs > -1)
- find_server_names(headers + to_offs, ctl, &xmit_names);
- if (cc_offs > -1)
- find_server_names(headers + cc_offs, ctl, &xmit_names);
- if (bcc_offs > -1)
- find_server_names(headers + bcc_offs, ctl, &xmit_names);
+ for (i = 0; i < next_address; i++)
+ find_server_names(headers + addressoffs[i], ctl, &xmit_names);
}
if (!accept_count)
{
diff --git a/fetchmail-FAQ.html b/fetchmail-FAQ.html
index 4666593b..0bfe71da 100644
--- a/fetchmail-FAQ.html
+++ b/fetchmail-FAQ.html
@@ -9,8 +9,7 @@
<BODY>
<H1>Frequently Asked Questions About Fetchmail</H1>
-The current version of fetchmail is 3.9.8. New in the FAQ: <a
-href="#T5">T5</a>; Using fetchmail with the Microsoft Exchange Server.<p>
+The current version of fetchmail is 3.9.8.<P>
Before reporting any bug, please read <a href="#G3">G3</a> for advice
on how to include diagnostic information that will get your bug fixed
@@ -20,7 +19,7 @@ If you have a question or answer you think ought to be added to this FAQ list,
mail it to fetchmail's maintainer, Eric S. Raymond, at
<A HREF="mailto:esr@thyrsus.com">esr@snark.thyrsus.com</A>.<p>
-<a href="mailto:funk@osu.edu">Rob Funk</a> is fetchmail's designated
+<a href="mailto:funk+@osu.edu">Rob Funk</a> is fetchmail's designated
backup maintainer. Other backup maintainers may be added in the
future, in order to ensure continued support should Eric S. Raymond
and/or Rob Funk drop permanently off the net for any reason.<P>
@@ -66,7 +65,6 @@ when I may have multiple login sessions going?</a><br>
<a href="#T2">T2. How can I use fetchmail with exim?</a><br>
<a href="#T3">T3. How can I use fetchmail with smail?</a><br>
<a href="#T4">T4. How can I use fetchmail with Lotus Notes?</a><br>
-<a href="#T5">T5. How can I use fetchmail with Microsoft Exchange Server?</a><br>
<h1>Runtime fatal errors:</h1>
@@ -700,16 +698,6 @@ The Lotus Notes SMTP gateway tries to deduce when it should convert \n
to \r\n, but its rules are not intuitive. Use `forcecr'.<P>
<hr>
-<h2><a name="T5">T5. How can I use fetchmail with Microsoft Exchange Server?</a></h2><p>
-
-Only single-drop mode is reliable; multi-drop is likely to give you
-problems with mailing-list mail.<P>
-
-The problem is that Microsoft Exchange Server seems to like to break
-up long To lists into multiple headers, and the multi-drop code only
-sees the last one.<P>
-
-<hr>
<h2><a name="R1">R1. I think I've set up fetchmail correctly, but I'm not getting any mail.</a></h2>
Maybe you have a .forward or alias set up that you've forgotten about. You
@@ -1014,7 +1002,7 @@ without hacking potentially fragile startup scripts. To get around
it, just touch(1) the logfile before you run fetchmail (this will have
no effect on the contents of the logfile if it already exists).<P>
-$Id: fetchmail-FAQ.html,v 1.33 1997/06/14 19:00:28 esr Exp $<p>
+$Id: fetchmail-FAQ.html,v 1.34 1997/06/16 14:35:09 esr Exp $<p>
<HR>
<ADDRESS>Eric S. Raymond <A HREF="mailto:esr@thyrsus.com">&lt;esr@snark.thyrsus.com&gt;</A></ADDRESS>