[Mimedefang] action_change_header w/ multiple Subjects

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Thu Oct 20 13:10:34 EDT 2005

I'd like to be able to change the subject for emails detected as spam.

I've been using
	action_change_header("Subject", "[SPAM] $Subject");
which has worked well until recently.

Alas, recently there have been spams that put in multiple Subject headers.  action_change_header tags the first Subject:, but the MUA displays the second!

I'm tempted to do something like
	action_add_header("Subject", "[SPAM] $Subject");

but I have some questions...

1) Will this work?  Or will action_delete_all_headers("Subject") repopulate the $Subject variable?  If so, no problem, I can shadow the variable before I call the action_delete_all_headers.

2) Is there a way to detect how many of a given header there are, short of slurping ./HEADERS?

3) Is there a way to make an action_change_all_headers()?

Matthew.van.Eerde (at) hbinc.com               805.964.4554 x902
Hispanic Business Inc./HireDiversity.com       Software Engineer

More information about the MIMEDefang mailing list