procmail
[Top] [All Lists]

Re: Sort into mailing list folders ...

1998-09-25 15:16:23
Gunther,

If you filter according to the SENDER of the mail, then procmail
will filter/sort your mail into proper boxes.  

eg.

:0:
* ^Sender:(_dot_)*owner-earlymednet-l(_at_)info(_dot_)cf(_dot_)ac(_dot_)uk
$LISTDIR/earlymednet-l/earlymednet-l

If the mail is delivered from a list, then it most usually has a 
header field of Sender: owner-listname(_at_)wherever(_dot_)edu

The problem is, some of the lists I subscribed to are closely related.
Because of this, pople often crosspost to many of them.  There might
be, for instance, 4 identical incomming messages M1, M2, M3, M4 with
the same Message-id. All of them have the addresses L1, L3, and L5 in
their To line and one Cc to me personally P. Procmail ends up stuffing
the 4 identical incoming mails all into one folder F1 and copies a
fifth one into my personal folder Fp. This happens because all the
crossposted lists appear in the same To: or Cc: line and procmails
regular expressions are checked sequentially. So the first match is
chosen and the first match for all messages is the same.
<snip>

(2) procmail would have to presort incoming mail to remove duplicates
of a messages with the same sender-assigned Message-id.

I use the following in my .procmailrc

:0 Whc: msgid.lock
| formail -D 8500 msgid.cache

:0 a:
/home/merlin/.trash/duplicates

This keeps roughly an 8K cache of Message-IDs (which are unique
for each mail). Any duplicate mail gets trashed (after a few
checks).  It does not, however, give me much control over how 
duplicates are processed eg. if there is two message's (one for 
a list, and CCed to me, do I accept both, or do I trash the one 
to me personally or to the list).   I haven't really thought about 
fine-tuning this aspect of my .procmailrc.  How do other people do it?

(ps. Thanks to those who answered my question re. Maildir).
-- 
Darren Rees             merlin(_at_)netlink(_dot_)co(_dot_)uk

2000+ Berfau; fformat .zip .htm M$ Access CSV
http://www.netlink.co.uk/users/merlin/berfau/

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