Removing the report as spam link on whitelisted emails

Questions and answers about how to do stuff
Post Reply
steve
Posts: 1
Joined: 05 Nov 2014 12:56

Removing the report as spam link on whitelisted emails

Post by steve »

I have modified the
/usr/lib/MailScanner/MailScanner/CustomFunctions/CustomAction.pm

file to avoid adding the mark as spam footer links if the address is whitelisted - thought I would share in case anyone else wanted to use it...

Starting at line 251
change
my($entity, $scannerheader, $clientip);
to
my($entity, $scannerheader, $clientip ,$spamwhitelisted);

Then starting at line 261... I have added the lines in bold.

# EFA
# Change Signing Behavior do not sign messages from localhost
$clientip = $message->{clientip};
if ($clientip =~ /^127/) { return $message; }

$spamwhitelisted = $message->{spamwhitelisted};
if ($spamwhitelisted eq "1") { return $message; }
Post Reply