fetchmail-friends
[Top] [All Lists]

Duplicate supression in 5.5.1

2001-02-10 11:22:10
Yes, its an old version, but its the one I've got. If it is already fixed, count this as another datapoint for the maxim "A few weeks in the lab will usually save many minutes in the library"

I don't know if it is fixed in later versions, as I'm not subscribed to the list - fetchmail does what I want it to (mostly) and does it reliably.

The `bug':
Against all the advice I'm using fetchmail to do multidrop collection.
My ISP inserts X-Envelope-To headers
Mail sent to multiple recipients ends up being stored as multiple messages in my pop box
Such mail is only delivered to the first person on the list.

My fix:
I got fed up of this little niggle, so had a poke with the source.
Where envelope addresses are stored with the message duplicate suppression isn't needed.
I modified driver.c
      /*
       * 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.
+        *
+        * However, if we have found an envelope address, we can assume
+        * this won't be a duplicated message, but multiple copies of the
+        * same message addressed to different users. JCRM, 10/2/2001
       */
      if (MULTIDROP(ctl) && !strncasecmp(line, "Message-ID:", 11))
      {
          if (ctl->lastid && !strcasecmp(ctl->lastid, line))
              return(PS_REFUSED);
+            else if (env_offs==-1)
          {
if (ctl->lastid) free(ctl->lastid);
              ctl->lastid = strdup(line);
          }
      }



<Prev in Thread] Current Thread [Next in Thread>