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

2004-10-29 Thread Aleksandar Milivojevic
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 [EMAIL PROTECTED]Pollard Banknote Limited
Systems Administrator   1499 Buffalo Place
Tel: (204) 474-2323 ext 276 Winnipeg, MB  R3T 1L7
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


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

2004-10-29 Thread David F. Skoll
On Fri, 29 Oct 2004, Aleksandar Milivojevic wrote:

  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  ;-)

Well, MIMEDefang can fix that! :-)

my $new_subj = $Subject;
$new_subj =~ s/^\[.*\]\s+//;
action_change_header(Subject, $new_subj) if $new_subj ne $Subject;

For Ben's case, you want to pull out the List-ID: header and call
action_change_header(Subject, [$listname] $Subject);

--
David.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


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

2004-10-29 Thread Kenneth Porter
--On Friday, October 29, 2004 2:48 PM -0500 Aleksandar Milivojevic 
[EMAIL PROTECTED] wrote:

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  ;-)
Same here, but one of my list users wants it because he reads mail from a 
dumb web client. And, alas, mailman lacks the option to make the 
subject_prefix a per-subscriber customization.
___
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang