[Mimedefang] ClamAV + SaneSecurity signatures
rlaager at wiktel.com
Thu Sep 18 15:33:41 EDT 2014
We use Sanesecurity signatures, as well as everything else from
clamav-unofficial-sigs. The code below is from filter_begin(), after we
We disable these signatures entirely, site-wide (i.e. not just for our
spam scanning boxes), though the spam scanning boxes were not the cause
of the initial complaints:
This doesn't affect the spam scanning boxes in our deployment, but we
have had false positives on these as well, so maybe they should be
excluded on the spam scanning boxes too:
All but the WindowsInstaller-KB893803-v2-x86.exe (which is obviously
some sort of Microsoft patch, which in our case ships as part of another
product's installer) are tools used by our IT guys.
We block Encrypted.Zip in filter_end() subject to an exception based on
the filename of the attachment, which we get in filter(). Specifcally,
we allow them if the filename ends in .csd, because of a customer
complaint about a Windows application named Ultra Tax.
my $local_relay = &is_local_sender($RelayAddr);
if ($local_relay == 0 &&
$local_relay = 1;
is_local_sender() checks the IP against a list it obtained from our
database at slave startup.
$first_recipient = &normalize_address($Recipients);
sub normalize_address($) # address
my $address = $_;
$address =~ s/^<(.*)>$/$1/;
&log_mail_event() is just a wrapper around md_graphdefang_log().
if ($category eq "virus" &&
$VirusName ne "Encrypted.Zip" &&
$VirusName ne "Oversized.Zip" &&
$VirusName ne "Zip.ExceededFileSize")
if (($VirusName =~ /^Sanesecurity\./ &&
$VirusName !~ /^Sanesecurity\.Rogue/) ||
$VirusName =~ /winnow\.spam/ ||
$VirusName =~ /\.Phishing/)
# Heuristics.Phishing.Email.SpoofedDomain is excluded as it
# matches too much legitimate mail.
# Allow local users to send "spam" to the Helpdesk. This way, we
# can ask them to forward us a copy in false positive cases.
# Likewise, we allow them to send mail to certain spam reporting
# destinations. NOTE: We have a copy of this list in filter_end.
unless ($VirusName eq 'Heuristics.Phishing.Email.SpoofedDomain' ||
($local_sender_address == 1 &&
$#Recipients == 0 &&
($first_recipient eq $DaemonAddress ||
$first_recipient =~ /^((email)?(abuse|fraud|phish(ing)?|(report_)?spam|spoof)\@.*|.*\@(abuse\.net|spam\.spamcop\.net)|aollegal\@aol\.com|askvisa(usa)?\@visa\.com|enforcement\@sec\.gov|fraud_help\@usbank\.com|mail-spoof\@cc\.yahoo-inc\.com|phishing-report\@us-cert\.gov|reports\@habeas\.com|stop-spoofing\@amazon\.com|reportphish\@wellsfargo\.com)$/)))
"Spam not allowed. Contact $DaemonAddress for " .
elsif ($VirusName =~ /^(AAPL|Application|PUA|SPR)\./)
# This list came from Arnaud Jacques <webmaster at securiteinfo.com>,
# who responded to an inquiry about false positives for SPR.*
# We just log this for our information.
# Viruses from our users are rejected, so they know their
# message did not go through.
"Virus detected: $VirusName. Contact $DaemonAddress for " .
# Viruses from the Internet are discarded to avoid generating
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 198 bytes
Desc: This is a digitally signed message part
More information about the MIMEDefang