[Mimedefang] mimedefang + spamassassin (how to modify subject header)

Andrew J Caird andrew.caird at fccc.edu
Thu Nov 6 14:01:49 EST 2003


On Thu, 6 Nov 2003, Nathan Vidican wrote:

> what line would I use to add to the subject header; I know how to modify
> a header within mimedefang-filter, just not sure how to include said
> header's previous content. Something like this
>
> Subject: was something else
>
>
> if ($msg_was_determined_to_be_spam_by_spamassassin) {
>      action_change_header("Subject", "[Possible Spam] $old_subject");
> }
>
> In short, how does one retrieve the value of a messages given subject header
> (or any header for that matter)?

$Subject is one of the "special" global variables MD makes available to
you in filters, so

   if ($msg_was_determined_to_be_spam_by_spamassassin) {
        action_change_header("Subject", "[Possible Spam] $Subject");
   }

will do what you want.
Cheers.
--
Andrew



More information about the MIMEDefang mailing list