how to modify the subject line

From: Luis Miguel (
Date: Thu 02 Sep 2004 - 18:34:05 GMT

  • Next message: Bob George: "Re: how to modify the subject line"

    Hi all, I have modified sanitizer.procmail to add a string to the subject line.

    # This will add an "X-Found-Virus: Yes" header, if the Sanitizer finds
    # an infection. Add more recipies like this to add more headers! :-)
    * ? grep 'Enforced policy: save' $SANLOG

            VAR=`formail -x"Subject:"`

            :0 f
            |formail -I"Subject: [VIRUS]$VAR" -I"X-Found-Virus: Yes"

    Original subject: "hello"
    Modified subject if a file is virus infected: "[VIRUS] hello"

    This modificaion works, but I get an "procmail: Extraneous filter-flag ignored" warning,
    so please, some procmail expert can check it and tell me whats wrong.


    hosted by