pascal
07-09-2004, 07:40 PM
Hello there
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
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
# 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.
or that
#!/bin/bash
start() {
echo -n "Démarrage de Qmail"
export PATH="/usr/local/bin:/var/qmail/bin:/var/vpopmail/bin:/usr/local/bin/ezmlm:$PATH"
export QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
/usr/bin/spamd -L -x -u spamc > /dev/null &
/var/qmail/rc > /dev/null &
/usr/local/bin/tcpserver -v -H -R -x /etc/tcp.smtp.cdb -c20 -u1033 -g103 0 smtp /usr/local/bin/recordio /var/qmail/bin/qmail-smtpd 2>&1 >/dev/null &
/usr/local/bin/tcpserver -v -H -R 0 pop3 /usr/local/bin/recordio /var/qmail/bin/qmail-popup exploz.com /var/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir > /dev/null &
echo " [ OK ]"
echo
}
stop() {
echo -n "Arrêt de Qmail"
killall spamd
killall qmail-send
echo " [ OK ]"
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: qmail {start|stop|restart}"
RETVAL=1
esac
# chmod a+x /etc/init.d/qmail
# ln -sf /etc/init.d/qmail /etc/rc0.d/K30qmail
# ln -sf /etc/init.d/qmail /etc/rc1.d/K30qmail
# ln -sf /etc/init.d/qmail /etc/rc2.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc3.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc4.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc5.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc6.d/K30qmail
In fact how to tell to qmail to use the qmail-scanner queue ?
thanks you
@+++
squalito
--------------------------------
A very enjoyed interworx user
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
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
# 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.
or that
#!/bin/bash
start() {
echo -n "Démarrage de Qmail"
export PATH="/usr/local/bin:/var/qmail/bin:/var/vpopmail/bin:/usr/local/bin/ezmlm:$PATH"
export QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
/usr/bin/spamd -L -x -u spamc > /dev/null &
/var/qmail/rc > /dev/null &
/usr/local/bin/tcpserver -v -H -R -x /etc/tcp.smtp.cdb -c20 -u1033 -g103 0 smtp /usr/local/bin/recordio /var/qmail/bin/qmail-smtpd 2>&1 >/dev/null &
/usr/local/bin/tcpserver -v -H -R 0 pop3 /usr/local/bin/recordio /var/qmail/bin/qmail-popup exploz.com /var/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir > /dev/null &
echo " [ OK ]"
echo
}
stop() {
echo -n "Arrêt de Qmail"
killall spamd
killall qmail-send
echo " [ OK ]"
echo
}
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
*)
echo "Usage: qmail {start|stop|restart}"
RETVAL=1
esac
# chmod a+x /etc/init.d/qmail
# ln -sf /etc/init.d/qmail /etc/rc0.d/K30qmail
# ln -sf /etc/init.d/qmail /etc/rc1.d/K30qmail
# ln -sf /etc/init.d/qmail /etc/rc2.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc3.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc4.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc5.d/S30qmail
# ln -sf /etc/init.d/qmail /etc/rc6.d/K30qmail
In fact how to tell to qmail to use the qmail-scanner queue ?
thanks you
@+++
squalito
--------------------------------
A very enjoyed interworx user