Title: postfix spamassassin anomy sanitizer setup 2 Subject: setup spamassassin anomy sanitizer on Mandrake How to for Anomy Sanitizer antivirus and SA and anti-virus: http://advosys.ca/papers/postfix-filtering.html #Get SpamAssassin ( http://spamassassin.org/ ) #Get Anomy Sanitizer ( http://mailtools.anomy.net/ ) #Create a Unix group on the server named "filter" groupadd -g 418 filter #Create a user account named "filter" useradd -u 418 -g 418 -s /bin/false -d /usr/local/anomy filter #Disable logins for the user passwd -l filter #Install perl modules ##perl -MCPAN -e 'install "MIME::Base64"' ##perl -MCPAN -e 'install "MIME::QuotedPrint"' ##perl -MCPAN -e 'install "Mail::Audit"' perl -MCPAN -e shell o conf prerequisites_policy ask install MIME::Base64 install MIME::QuotedPrint install Mail::Audit quit #Install Anomy Sanitizer by unpacking in mailserver accessable directory pushd /usr/local/ tar -zxvpf anomy-sanitizer-1.56.tar.gz /usr/local/ cd anomy/ # read sanitizer.html in the unpacked file #lynx sanitizer.html # create a file named anomy.conf with your rules # Read "The "real world configuration" # I downloaded their anomy.conf and coppied it into place cp /root/SpamAssassin/anomy.conf . chown -R root:filter /usr/local/anomy chmod 0750 /usr/local/anomy #Install SpamAssassin perl -MCPAN -e shell o conf prerequisites_policy ask install Mail::SpamAssassin quit #Make one change to local.cf right away: whitelist #Add "whitelist_from" settings to /etc/mail/spamassassin/local.cf whitelist_from director_8345@hotmail.com # whitelist one specific sender whitelist_from @advosys.ca # whitelist an entire domain whitelist_from @securityfocus.com whitelist_from @mydomain.com #Configuring filtering in Postfix # calling a shell script inside master.cf chmod 750 /usr/local/anomy/filter.sh chown root:filter /usr/local/anomy/filter.sh vi /usr/local/anomy/filter.sh fix this path==>> SPAMASSASSIN=/usr/bin/spamassassin #Create a temporary directory for processing files # and update filter.sh variable INSPECT_DIR= mkdir /var/spool/filter chown root:filter /var/spool/filter chmod 0770 /var/spool/filter #Add single line to bottom of /etc/postfix/master.cf filter unix - n n - - pipe user=filter argv=/usr/local/anomy/filter.sh -f ${sender} -- ${recipient} #change smtp line in master.cf smtp inet n - n - - smtpd -o content_filter=filter: postfix reload