postfix + postgrey + clamsmtp + sanesecurity = easy, clean & light email server

what's wrong with spamassassin? everybody else are using spamassassin for their mail server spam protection.
nothing wrong with it. it just use up too much resources. that's all.

what if we can built lighter system on lower resources system (think vps) with as good spam protection as spamassassin can provide..?

here's my attempt...

first thing first. install all at once.
sudo aptitude install postfix postgrey clamsmtp wget curl rsync gzip

then, configure postfix to use postgrey and clamsmtp.

add this to /etc/postfix/
smtpd_recipient_restrictions = permit_sasl_authenticated,
           check_policy_service inet:

content_filter = scan:[]:10026

add this to /etc/postfix/
# ClamSMTP anti virus scan filter (used by content_filter)
 scan      unix  -       -       n       -       16      smtp
   -o smtp_send_xforward_command=yes
   -o smtp_enforce_tls=no
 # For injecting mail back into postfix from the filter inet  n -       n       -       16      smtpd
   -o content_filter=
   -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
   -o smtpd_helo_restrictions=
   -o smtpd_client_restrictions=
   -o smtpd_sender_restrictions=
   -o smtpd_recipient_restrictions=permit_mynetworks,reject
   -o mynetworks_style=host
   -o smtpd_authorized_xforward_hosts=

restart postfix
sudo /etc/init.d/postfix restart

now, get scam and phishing signature for clamav from sanesecurity, msrbl, securiteinfo, and malwarepatrol.

$ wget
$ tar zxvf scamp.tar.gz
$ vi
# uncomment this:
# SIG_DB="/var/lib/clamav"
# IF your clamav version < 0.94 then uncomment this too:
# NO_LDB=1
# that's it. save. exit.
$ sudo cp /etc/cron.daily/
# run it once, the first time:
sudo /etc/cron.daily/

you now got a lighter email server with great spam and virus protection.
enjoy less spam!


-- tips & tricks on computers and gadgets denny on IT ; let's doIT documenting the brain