[Mimedefang] action_change_header w/ multiple Subjects

David F. Skoll dfs at roaringpenguin.com
Thu Oct 20 13:24:27 EDT 2005


Matthew.van.Eerde at hbinc.com wrote:

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

> 1) Will this work?

Yes.

> Or will action_delete_all_headers("Subject") repopulate the $Subject
> variable?

No; you're OK on that count.

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

Not really.

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

Sure:

First, you count how many there are.  Then:

for $i (1 .. $num_headers) {
    action_change_header("HeaderName", $header_value, $i);
}

Regards,

David.



More information about the MIMEDefang mailing list