]> Pileus Git - ~andy/fetchmail/commitdiff
Improved duplicate-uppression logic.
authorEric S. Raymond <esr@thyrsus.com>
Sun, 7 Nov 1999 22:31:08 +0000 (22:31 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Sun, 7 Nov 1999 22:31:08 +0000 (22:31 -0000)
svn path=/trunk/; revision=2651

NEWS
driver.c

diff --git a/NEWS b/NEWS
index f55a4fb477a898fa23cce790b58203f117c4da86..854e8d2d5d914b1fe0ced4c8abe75813ba5a4990 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,7 @@ a Certifying Authority we recognize?).
 * Mike Pearce's patch to fix a compile-time error recently introduced into
   the socket code when HAVE_INET_ATON is off.
 * Added warning to fetchmailconf autoprobe about a flaky Netscape IMAP server.
+* Disable duplicate suppression when there is only one recognized recipient.
 
 fetchmail-5.1.3 (Sun Oct 31 12:19:52 EST 1999), 18290 lines:
 * Grant Edwards's patch to correct NTLM behavior.
index 9335a9405052eb1d0562e19bc64979fc67e78013..b1cb68436d8b1eab6b6abbfc076a8260b5a0cf13 100644 (file)
--- a/driver.c
+++ b/driver.c
@@ -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);