procmail
[Top] [All Lists]

Re: Recipe problem

2004-08-25 21:54:09
Chuck Campbell wrote:

[...]
:0
* (^TO|^TO_|^Sender:|^X-list:|^FROM_DAEMON|^From:.*)linux-xfs

I seem to recall problems matching the ^TO macro as part of a list. Perhaps a scoring rule like (untested):

:0:
* 1^0 ^TOlinux-xfs
* 1^0 ^TO_linux-xfs
* 1^0 ^Sender: .*linux-xfs.
* 1^0 ^X-list: .*linux-xfs
* 1^0 FROM_DAEMONlinux-xfs
* 1^0 ^From: .*linux-xfs
{
 :0 c:
 list_ham
 :0:
 linux-xfs
}

or some other variation to keep the macros separate from other tested values?

[...]
I'm trying to make a recipe to catch my mailing list emails and filter them
to the correct place, instead of having one recipe for each mailing list
and having to search headers for something unique in each individual list.

So you're after a regexp to match the name of the list, which may be stored in one (or more) of several common header formats? (One rule to ring them all?) $MATCH, together with a clever regexp seems promising. But I'd anticipate problems using something as ubiquitous as ^TO in that case. Perhaps List-Id:, X-List: & kin which can be counted on to uniquely identify mailing lists?

Also, if the scheme is generic enough, then when a list changes their address,
my recipe will still work correctly without changes.

I could see a problem if the matched portion of the list name were to change, as you'd wind up with two mboxen: one for the old name, and one for the new.

- Bob
(Who seems to be experiencing list-lag. Ignore if you've answered this already. :)

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail