Ano-Tech Computers
Enter keyword:

qmailscanner/SpamAssassin not scanning all messages
Problem:
When using qmailscanner with SpamAssassin to detect SPAM, some messages do not appear to get scanned properly. Compare the log entries below: Oct 5 04:06:18 hermes qmail-scanner: Clear:SA:1(9.9/5.0): 33.53939 1772 ###@###.com ###@###.com veni vidi vici msg-id.###.com:961 Oct 5 04:05:32 hermes qmail-scanner: Clear: 0.023247 1863 ###@###.com ###@###.com veni vidi vici msg-id.###.com:899
 
Solution:
By default, qmail-scanner does not run SpamAssassin on messages from hosts that are in the list of RELAYCLIENTS. This means that if there is an open relay somewhere in those networks, the spam does not get tagged.

Change this behaviour by editing
"/var/qmail/bin/qmail-scanner-queue.pl"
as follows. Change this:

sub spamassassin {
return if (defined($ENV{'RELAYCLIENT'}));

to this:

sub spamassassin {
# return if (defined($ENV{'RELAYCLIENT'}));

Save the file, and ALL messages get scanned. Note that this means even outgoing messages get scanned, this is not a big problem IMHO...

 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles