[Mimedefang] Remove existing tag from Subject:

David F. Skoll dfs at roaringpenguin.com
Mon Dec 6 13:02:57 EST 2010

On Mon, 6 Dec 2010 12:24:51 -0500
"Jason Bertoch" <jason at electronet.net> wrote:

> Does anyone have filter code they're willing to share that removes
> any existing "*****SPAM*****" tag in the Subject: header?

Completely untested:

sub filter_end {
    # ...
    if ($Subject =~ /\**SPAM\**/) {
        $Subject =~ s/\**SPAM\**\s*//;
        action_change_header('Subject', $Subject);
    # ...

The tag regex may need tweaking depending on the actual tag used by the
offending software.



More information about the MIMEDefang mailing list