How to enable SpamAssassin on your server.

To enable Spamassassin on your server, you need to first need to install it. Once installed a few minor changes are needed in your /etc/exim.conf file.

1) Install spamd and spamc:

cd /usr/local/directadmin/scripts
./spam.sh

2) Start the spamd:

/usr/bin/spamd -d -c -m 15

3) In order to get exim to use the spamd program, you'll need to make some changes in your /etc/exim.conf. Change:

# Spam Assassin
#spamcheck_director:
#  driver = accept
#  condition = "${if and { \
#      {!def:h_X-Spam-Flag:} \
#      {!eq {$received_protocol}{spam-scanned}} \
#      {!eq {$received_protocol}{local}} \
#      {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
#      {<{$message_size}{100k}} \
#    } {1}{0}}"
#  retry_use_local_part
#  transport = spamcheck
#  no_verify

to

# Spam Assassin
spamcheck_director:
  driver = accept
  condition = "${if and { \
      {!def:h_X-Spam-Flag:} \
      {!eq {$received_protocol}{spam-scanned}} \
      {!eq {$received_protocol}{local}} \
      {exists{/home/${lookup{$domain}lsearch{/etc/virtual/domainowners}{$value}}/.spamassassin/user_prefs}} \
      {<{$message_size}{100k}} \
    } {1}{0}}"
  retry_use_local_part
  transport = spamcheck
  no_verify

4) Restart exim: Redhat:

/sbin/service exim restart

FreeBSD:

/usr/local/etc/rc.d/exim restart

The global spamassassin config file is in /etc/mail/spamassassin/local.cf

If you run debian and are missing perl or some pm files, type:

apt-get install perl-base perl-modules
 
exim/spamas.txt · Last modified: 2010/02/20 03:03 by muscardin
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Please visit Automatic Backlinks to start earning free backlinks Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki