Hi,
I am using procmail for quite a while now to presort my mail, because
I am subscribed to many, many mailing lists (L1, L2, ..., Ln).
Basically my procmailrc file is configured so as to find out from the
To: or Cc: line which list a given mail M came from and then to write
the mail M in the special folder for that list (F1, F2, ..., Fn). In
addition, every mail that is explicitly addressed to me personally P
goes back into my system mailbox Fp. This works quite well. Except ...
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.
I imagine that in order to sort the crossposted mail correctly one
would have to do two things:
(1) after one match was found, the matching To/Cc address ought to be
removed from the To/Cc line and then procmail would have to try for
another match.
(2) procmail would have to presort incoming mail to remove duplicates
of a messages with the same sender-assigned Message-id.
Thus the process would be:
remove duplicates: M1, M2, M3, M4 --> M'
build a recipient list: R := (L1, L3, L5, P)
find a match for each WHILE ! empty(R)
list item: consider first(R) and try to match
...
R := rest(R)
END
I wonder if procmail can do that, and how other people deal with
similar problems. Any ideas?
thank you
-Gunther
Gunther Schadow ----------------------------------- http://aurora.rg.iupui.edu
Regenstrief Institute for Health Care
1001 W 10th Street RG5, Indianapolis IN 46202, Phone: (317) 630 7960
schadow(_at_)aurora(_dot_)rg(_dot_)iupui(_dot_)edu ----------------------
#include <usual/disclaimer>