diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1999-09-14 06:35:11 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1999-09-14 06:35:11 +0000 |
commit | 582eb25eccedcdbff029947f777a111a9b7008af (patch) | |
tree | 8fb2a0a2d68e5df5b21ea166c65bed950f1f8bce /driver.c | |
parent | 8f826df8fbadd811f6bcc31344e3d8472bd6f2bb (diff) | |
download | fetchmail-582eb25eccedcdbff029947f777a111a9b7008af.tar.gz fetchmail-582eb25eccedcdbff029947f777a111a9b7008af.tar.bz2 fetchmail-582eb25eccedcdbff029947f777a111a9b7008af.zip |
Duplicate suppression.
svn path=/trunk/; revision=2553
Diffstat (limited to 'driver.c')
-rw-r--r-- | driver.c | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -528,6 +528,29 @@ static int readheaders(int sock, has_nuls = (linelen != strlen(line)); /* + * 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. + * + * 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. + */ + if (MULTIDROP(ctl) && !strncasecmp(line, "Message-ID:", 11)) + { + if (ctl->lastid && !strcasecmp(ctl->lastid, line)) + return(PS_REFUSED); + else + { + if (ctl->lastid) + free(ctl->lastid); + ctl->lastid = strdup(line); + } + } + + /* * The University of Washington IMAP server (the reference * implementation of IMAP4 written by Mark Crispin) relies * on being able to keep base-UID information in a special |