Dec 12

I have fix some problem with my mail server when mail detected with spam in anti-spam gateway, I don’t need to scan again and don’t want to set that ip to RELAYCLIENT in tcp.smtp

With tcp.smtp
x.x.x.x is ip can relay with your mail server and not scan with spamassassin
x.x.x.x:allow,RELAYCLIENT=""

Other case if you want scan with spamassassin you can set with
x.x.x.x:allow,RELAYCLIENT="",QS_SPAMASSASSIN="yes"

But in this case I use
x.x.x.x:allow,BYPASS_SPAMASSASSIN=”on”

And insert this code in /var/qmail/bin/qmail-scanner-queue.pl
if (defined($ENV{'BYPASS_SPAMASSASSIN'})) {
&debug("spamassassin: don't scan as BYPASS_SPAMASSASSIN");
&minidebug("SA: don't scan as BYPASS_SPAMASSASSIN") if (!$scanned);
return;
}

at line 3349 in spamassassin function
and line 3450 in spamassassin_alt function

Don’t forget to rebuid tcp.smtp and make backup with qmail-scanner-queue.pl

written by Mr-San \\ tags: , , ,