Ok, few interworx users liked to have spamassassin installed in interworx.
Faded up receiving spam and virus and waiting for a next interworx realease I decid to install spamassassin and clam (spamassassin, clam, razor, dcc, maildrop, qmail-scanner)
To do that I followed up the tutorial attache in this post
but I don’t know how interworx works and I’d like to know how to do this last step. Say to qmail to use qmail-scanner queue…
Next, make sure that your qmail-smtpd script allocates sufficient resources to support the needs of Qmail-Scanner + Antivirus + SpamAssassin
vi /var/qmail/supervise/qmail-smtpd/run
Change the softlimit from 2000000 to something a fair bit larger. We use 15000000.
Now define what mail is to be sent through the Qmail-Scanner.
At our site, we have configured Qmail-Scanner to virusscan all messages (ie inbound and outbound mail). We did this by setting up our our /var/qmail/supervise/qmail-smtpd/run file like this :
#!/bin/sh
when QMAILQUEUE is set, all mail will be sent to the nominated script
softlimit needs to be set at something large such as 15000000
to allow virusscanning software to run successfully
exec /usr/local/bin/softlimit -m 15000000
/usr/local/bin/tcpserver -v -x /etc/tcp.smtp.cdb -c 30 -R
-u “$QMAILDUID” -g “$NOFILESGID” 0 smtp
… and the rest of the file snipped …
However, if you don’t want to virusscan all mail, you can selectively nominate which IP ranges should or shouldn’t be checked by setting the QMAILQUEUE variable via your /etc/tcp.smtp file rather than inside the supervise/qmail-smtpd/run file. Refer to the Qmail-Scanner home page for setup examples.
Regarding the first quoted section:
/var/qmail/supervise/qmail-smtpd/run
On an InterWorx Server, the above line would be:
/service/smtp/run
Regarding the second quoted section, which appears to be someone’s qmail start up script, I’d recommend editing /etc/rc.d/init.d/smtp and adding the following two lines:
export PATH=“/usr/bin:/var/qmail/bin:/var/vpopmail/bin:$PATH”
export QMAILQUEUE=“/var/qmail/bin/qmail-scanner-queue.pl”
above the line:
$svc -u $dir
You may want to start up spamd in the start up script as well, in which case you’d put it after the two lines that start with export above.
In fact how to tell to qmail to use the qmail-scanner queue ?
This is done by setting the QMAILQUEUE variable, which is done in the examples you posted by the lines that start with: export QMAILQUEUE
1/ Update /etc/tcprules.d/tcp.smtp
to add
allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
and do
tcprules /etc/tcprules.d/tcp.smtp.cdb /etc/tcprules.d/tcp.smtp.tmp < /etc/tcprules.d/tcp.smtp
2/ Update /service/smtpd/run
Add
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
and change the softlimit to 10000000
ok, will try yours (I was really not sure what I done was fine)
Just to understand
/etc/rc.d/init.d/smtp
and
/service/smtp/run
are not doing the same thinks ? if yes which one I have to update ?
for the spamd, you right. I have added it in /etc/rc.d/init.d/spamd .So will add
/etc/rc.d/init.d/spamd start
after the 2 exports.
and do the same for the antivirus clam ( /etc/rc.d/init.d/clamd start )
and after I’m going to bed (06:33 french time : a full night to setup everything :o )
Roughly following these instructions I have successfully installed spamassassin as well. My only question is whether there is an easy way to have it filter only on known good addresses? Right now it filters every bit of mail even though 90% of it is destined for non-existent addresses.