procmail
[Top] [All Lists]

Re: Problem with duplicate mail filter (msgid.cache)

2001-11-15 12:02:25
FYI ...

A workable solution to the duplicate emails coming 
from mails sent to combined listserv, NIS, & MajorDomo 
aliases.

jjg


Date: Wed, 14 Nov 2001 05:39:55 +0000
To: Cadence_internal_procmail_users
From: Andrew Beckett 
Subject: Re: Problem with duplicate mail filter

Hi All,

I thought I'd let you know that I found a solution to this, which
I've been using for the last week - and it seems to behave well.


# Remove duplicate mails
#
:0 Wh: msgid.lock
| (/bin/sed -e 's/^Message-ID:  /Message-Id: /') | /usr/local/bin/formail \
        -D 8192 $PMDIR/msgid.cache

Rather than just calling formail -D ... directly, I added the sed at the 
beginning
to convert the message ID's from listserv (which have the uppercase ID bit),
to "Id" which is more consistent with sendmail and majordomo.

This modified rule then seems to handle duplicates coming from
listserv and normal internal NIS aliases (probably majordomo as well).

Regards,
Andrew.


At 09:03 AM 9/27/2001 +0100, Andrew Beckett wrote:
Hi All,

I've been using the following recipe for a long time:

#
# Remove duplicate mails
#
:0 Wh: msgid.lock
| /usr/local/bin/formail -D 8192 $PMDIR/msgid.cache

and this has been very successful in removing duplicate mails caused by
mail sent to majordomo aliases - the idea is that it only lets through
one message with a particular message-id, and the rest get junked.

For some reason it doesn't work if the mail is sent to both a LISTSERV
alias and a majordomo or sendmail alias. I can't work out
why, since the message ID seems to be the same in both. In fact if I
look at my msgid.cache for an example recently
I see there is the message id in there twice:

tr '\000' ' ' < msgid.cache | tr '\040' '\012' | sort | uniq -d

gave (at least part of):

<5(_dot_)1(_dot_)0(_dot_)14(_dot_)2(_dot_)20010926133333(_dot_)05794d50(_at_)mailhub>

indicating that this message ID was in the cache twice. The only difference
I can see in the two emails is that the UNIX_USERS one looks like this:

Message-ID:  
<5(_dot_)1(_dot_)0(_dot_)14(_dot_)2(_dot_)20010926133333(_dot_)05794d50(_at_)mailhub>

and the other routed one looks like this:

Message-Id: 
<5(_dot_)1(_dot_)0(_dot_)14(_dot_)2(_dot_)20010926133333(_dot_)05794d50(_at_)mailhub>

In other words there's a slight difference in the case of the Message-ID,
and an extra space.

Anyone got any ideas? Do other people see the same problem using
the duplicate filter?

Regards,
Andrew

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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