ifile-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Ifile-discuss] Mailing List Filtering


From: jack
Subject: Re: [Ifile-discuss] Mailing List Filtering
Date: Wed, 5 Mar 2003 18:48:29 +0000
User-agent: Mutt/1.4i

* clemens fischer <address@hidden> [030305 18:37]:
> Jack Bertram <address@hidden>:
> 
> > I don't know of anything standard, but it's very easy using procmail to
> > filter a message to a folder depending on the content of a header:  for
> > example, just write a little Perl script which takes as input an email
> > message, greps for List-ID: and returns a folder name based on the value
> > of the header, then uses formail to insert this into your own custom
> > X-My-Mbox-Header.  Then use a procmail recipe to put any successfully
> > matching messages into the results of $MATCH.
> 
> this has one drawback:  your procmail/perl prefilter has to know the
> folder names you are going to use, as does the MUA.  theres a spot
> that can get out of sync:  each time you make or change folder names,
> two places have to get updated.  it was better to use intermediate
> names to get an abstraction layer, or, much simpler, use the mailing
> list posting address in the standardized header, then have the MUA
> just filter on this one header.

Well, it depends.  I do more or less this with ifile, and I don't ever
have to update any places at all - every time I add a new folder, ifile
begins to learn it and then procmail starts to filter into it.  With
this solution, if you were happy using the list mailing address as your
folder name (and why not?) then you wouldn't need to update anything
either, as procmail would create a new folder for each new list email
you got, stored in the folder whose name was extracted from the email[1].
Alternatively, your Perl script could use a little data file which
mapped your header onto the folder names you were using, and then you'd
have a portable solution.

jack

[1]  You'd have to be careful that you didn't allow procmail to write to
/etc/passwd, of course.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]