[Mimedefang] Easy way to scan for List-Id's

Kenneth Porter shiva at sewingwitch.com
Fri Oct 29 16:08:15 EDT 2004


--On Friday, October 29, 2004 2:15 PM -0500 Ben Kamen 
<bkamen at benjammin.net> wrote:

> Since I'm on a couple of lists and wish they'd put [list] in the subject
> line (and don't) is there an easy way to do this via MimeDefang? (this
> way, every place I look at my mail doesn't have to have duplicate mail
> filter setups.. it would just be done on the server..)
>
> Most of the lists use the header "List-Id:"

Seems like that would be a job for procmail. Moreover, you can use procmail 
to centralize your filtering.

I didn't want to have to reload filters every time I changed mail clients 
or every time I looked at mail from a new location. So I set up IMAP 
(Dovecot on Fedora, originally UW-IMAP on Red Hat), and set up procmail 
filters to do all the filtering that I used to run on all my mail clients.

Here's a typical procmail "recipe":

:0 :
* ^List-Id:.*MIMEDefang
mail/Lists/Mail/MIMEDefang

The first line is a rule-start marker and a set of rule flags, in this case 
meaning lock the destination mailbox. The second line is the filter 
expression. The third is the destination for messages matching the 
expression, relative to the home directory.

Whenever I join a new list I just copy this sequence and edit to match the 
new list.



More information about the MIMEDefang mailing list