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

Aleksandar Milivojevic amilivojevic at pbl.ca
Fri Oct 29 15:48:27 EDT 2004


Ben Kamen 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:"

Funny thing is, I'd wish none of the lists put [list] in Subject.  I'm 
sorting lists in separate IMAP folders on the server, so it is kind of 
reduntant and just wastes the space on the Subject line  ;-)

Anyhow, if you are using IMAP, it might be easier to just use procmail 
or sieve (depending on IMAP server you use) to sort mailing lists into 
separate folders.  That way, from wherever you look your mail, you get 
same view of it, and you manage filtering at single spot (the mail 
server itself).

If you still want to add tags to Subject, you can do it in MIMEDefang. 
You can change Subject line in filter_end.  Use 
$entity->head->get("List-Id") to check for headers, and if found rewrite 
Subject line to contain appropriate tag.  You might want to remove tag 
from emails that you send out in other not to pollute mailing lists that 
I'm subscribe to ;-).  And you'll need to handle 'Re: ' and similar 
prefixes, and make sure you don't add tag if it is already there.

BTW, wanted to send to you directly instead of mailing list (original 
reply didn't had MIMEDefang part), but you completely blocked off my ISP 
(GT).  Actually, after that guy from US who blocked entire ".ca" domain 
because of spam, you are the first one who bounced my mail back, eh ;-)

-- 
Aleksandar Milivojevic <amilivojevic at pbl.ca>    Pollard Banknote Limited
Systems Administrator                           1499 Buffalo Place
Tel: (204) 474-2323 ext 276                     Winnipeg, MB  R3T 1L7



More information about the MIMEDefang mailing list