qmail-scanner using clamav works fine, until the hourly vpopmail.clearopensmtp cronjob somehow destroys the /etc/tcp.smtp.cdb file, which as a result prevents the environment variable QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" from being set. Therefore, the QMAILQUEUE patch doesn't get activated, and none of the recognized virusscanners, such as clamav, gets properly invoked. It's a really annoying bug, because qmail-scanner seems to work fine, and when you check half an hour later, you see that the clamav "received:" headers are again not showing up in the emails received (so it didn't get invoked). Absolutely annoying and insidious bug.
# qpkg -I -v | grep mail
Steps to Reproduce:
qmail-scanner works for around 30 minutes, and then fails.
the hourly cronjob shouldn't botch /etc/tcp.smtp.cdb
I now have to run my own cron job that clears opensmtp, but also rebuilds
tcp.smtp.cdb, because clearopensmtp leaves that file corrupted:
/usr/bin/tcprules tcp.smtp.cdb tcp.smtp.tmp < tcp.smtp
the offical response is this:
vpopmail's relaying tcp.smtp stuff is considered obsolete.
use net-mail/relay-ctrl instead.
it's still enabled in vpopmail-5.2.* for those that use it, but it's forced to off in the new 5.4* series (which will be in stable in the next week or so).
on the non-official side, I've never seen the cronjob destroy the CDB file, after many years of using qmail+vpopmail+qmail-scanner together. if you'd like to debug into what the corrupt is, i'd be quite interested in the results.
There is a patch out for this issue. I believe it's the fact that vpopmail doesn't read QMAILQUEUE before re-writing the tcp.smtp.cdb file.
There are many people complaining about this in mailing lists. It is a vpopmail issue. hope this helps.
clearing up my bug tracking
closing old bugs now.
as I said before, go and use relay-ctrl for SMTP-after-POP/IMAP.