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

David F. Skoll dfs at roaringpenguin.com
Fri Oct 29 16:01:27 EDT 2004


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.



More information about the MIMEDefang mailing list