====== qmail-scanner ======
Razor
Pyzor
perl -MCPAN -e 'install Net::DNS'
echo 'Digest::SHA1
Digest::MD5
Digest::HMAC
Digest::Nilsimsa
Test::Simple
Time::HiRes
URI::Escape' | xargs -n1 -i perl -MCPAN -e 'install {}'
/usr/sbin/useradd -u 106 -d /var/qmail/control/spamassassin -c "SpamAssassin" -m -k /dev/null spamd
perl -MCPAN -e 'install Mail::SpamAssassin'
required_hits 5.0
#skip_rbl_checks 1
rewrite_header Subject *****SPAM*****
#use_terse_report 1
report_safe 1
dns_available yes
add_header all DCC _DCCB_: _DCCR_
add_header all Pyzor _PYZOR_
add_header all Report _REPORT_
ok_languages en
#clear_report_template
#report Redifine report text
#report according to man page _SUMMARY_
lock_method flock
bayes_learn_to_journal 1
pyzor_path /usr/bin/pyzor
dcc_path /usr/local/bin/dccproc
rbl_timeout 8
razor_timeout 4
pyzor_timeout 4
dcc_timeout 4
OPTIONS="-d -x -u spamd"
* su - spamd -c "pyzor discover"
* su - spamd -c "razor-admin -create"
* su - spamd -c "razor-admin -register" (I had to run this a couple times until it was successful)
I was doing some spamassassin reporting by procmail inside /var/qmail/alias, so I also needed to do:
* su - alias -c "pyzor discover"
* su - alias -c "razor-admin -create"
* su - alias -c "razor-admin -register"
/usr/sbin/groupadd -g 105 clamav
/usr/sbin/useradd -u 105 -g clamav -d /usr/local/share/clamav -m -k /dev/null -c "Clam Antivirus" clamav
./configure && make && make install
cd ..
clamscan -r -l scan.txt clamav-0.[tab key]
( should find ClamAV-Test-Signature in test/test1 )
echo "Starting FreshClam ClamAV daemon"
touch /var/log/clam-update.log
chown clamav /var/log/clam-update.log
su - clamav -c "/usr/local/bin/freshclam -d -c 2 -l /var/log/clam-update.log"
/usr/sbin/groupadd -g 107 qscand
/usr/sbin/useradd -u 107 -c "Qmail-Scanner Account" -g qscand -s /bin/false qscand
./configure --admin ian --domain MrZesty.net --scanners clamscan,verbose_spamassassin --notify "sender,recips,admin" --debug no --install
If RBLSMTPD is present and has a "-comment" - the comment will be echoed back as a 553 bounce message failure.
QMAILQUEUE should point to the queue handler to use for connections from those IP's (if not set in /service/qmail-smtpd/run above)
# No Qmail-Scanner or RBL check at all for mail from 127.0.0.1
127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""
# Use Qmail-Scanner without SpamAssassin, no RBL check on any mail from the local network
# [it ignores SpamAssassin via the presence of the RELAYCLIENT var]
10.:allow,RELAYCLIENT="",RBLSMTPD="",QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
# Use Qmail-Scanner with SpamAssassin on any mail from the rest of the world
:allow,QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl"
make -C /var/qmail/control
As well as one to remove quarantined messages before they fill up /var/spool
0 0 * * * find /var/spool/qmailscan/quarantine/new -mtime +10 | xargs -r rm
====== GreyListing ======