fetchmail-5.0.8 ():
* Todd Sabin's patch to accept spaces in CRAM-MD5 names.
* Fix to endianness patch, by Dan Root via Lawrence Rogers.
+* Suppress duplicates by message ID in multidrop mode.
fetchmail-5.0.7 (Sat Aug 21 04:26:13 EDT 1999):
* RPA support works again.
/* we see an ordinary (non-header, non-message-delimiter line */
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
unsigned int uid; /* UID of user to deliver to */
struct idlist *skipped; /* messages skipped on the mail server */
struct idlist *oldsaved, *newsaved;
+ char *lastid; /* last Message-ID seen on this connection */
/* internal use -- per-message state */
int mimemsg; /* bitmask indicating MIME body-type */
that defaults to [571, 550, 501, 554] but can be set with the `antispam'
option. This is one of the
.I only
-two circumstance under which fetchmail ever discards mail (the others
-are the 552 and 553 errors described below).
+three circumstance under which fetchmail ever discards mail (the others
+are the 552 and 553 errors described below, and the suppression of
+multidropped messages with a message-ID already seen).
.PP
If
.I fetchmail
Use the multiple-local-recipients feature with caution -- it can bite.
Also note that all multidrop features are ineffective in ETRN mode.
+Also, note that in multidrop mode duplicate mails are suppressed.
+A piece of mail is considered duplicate if it has the same message-ID
+as the message immediately preceding. Such runs of messages may
+be generated when copies of a message addressed to multiple
+users are delivered to a multidrop box.
+
.SS Header vs. Envelope addresses
The fundamental problem is that by having your mailserver toss several
peoples' mail in a single maildrop box, you may have thrown away