diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-11-07 22:31:08 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-11-07 22:31:08 +0000 |
commit | bd423399569f8eba381739fa3aaa497b805eded9 (patch) | |
tree | 547aac1831291485d8eb5a8edbf8273a5e6670b6 /driver.c | |
parent | 1c363ccf0cd2d0422acdd4f9dc69265998b368a6 (diff) | |
download | fetchmail-bd423399569f8eba381739fa3aaa497b805eded9.tar.gz fetchmail-bd423399569f8eba381739fa3aaa497b805eded9.tar.bz2 fetchmail-bd423399569f8eba381739fa3aaa497b805eded9.zip |
Improved duplicate-uppression logic.
svn path=/trunk/; revision=2651
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -241,7 +241,7 @@ static void find_server_names(const char *hdr, * are not uncommon. So now we just check that the following token is * not itself an email address. */ -#define VALID_ADDRESS(a) !strchr(rbuf, '@') +#define VALID_ADDRESS(a) !strchr(a, '@') static char *parse_received(struct query *ctl, char *bufp) /* try to extract real address from the Received line */ @@ -542,16 +542,20 @@ static int readheaders(int sock, /* * When mail delivered to a multidrop mailbox on the server is - * addressed to multiple people, there will be one copy left - * in the box for each recipient. Thus, if the mail is addressed - * to N people, each recipient would get N copies. + * addressed to multiple people on the client machine, there + * will be one copy left in the box for each recipient. Thus, + * if the mail is addressed to N people, each recipient will + * get N copies. * * Foil this by suppressing all but one copy of a message with * a given Message-ID. Note: This implementation only catches * runs of successive identical messages, but that should be - * good enough. + * good enough. + * + * The accept_count test ensures that multiple pieces of identical + * email, each with a *single* addressee, won't be suppressed. */ - if (MULTIDROP(ctl) && !strncasecmp(line, "Message-ID:", 11)) + if (MULTIDROP(ctl) && accept_count > 1 && !strncasecmp(line, "Message-ID:", 11)) { if (ctl->lastid && !strcasecmp(ctl->lastid, line)) return(PS_REFUSED); |