Skip to topic | Skip to bottom
Home
Socialtools
login



Socialtools.StandardSpamassassinr1.1 - 03 Jul 2005 - 00:05 - TWikiGuesttopic end

Start of topic | Skip to actions

Spamassassin spam filter

Spamassassin version

Tested with Spamassassin 3.0.4.

Introduction

These instructions are adapted from this article. The result is that all mail will be filtered through Spamassassin, which adds a header like this to any messages it thinks are probably spam:

X-Spam-Flag: YES

Other programs can then treat those messages specially; see StandardSympa.

This requires Postfix set up as in StandardPostfix, and StandardPerlModules.

Installing Spamassassin

Install /usr/local/configure-wrappers/configure-spamassassin (make it world-executable).

Download the latest Spamassassin tarball. Compile and install:

tar zxf Mail-SpamAssassin-x.y.tar.gz
cd Mail-SpamAssassin-x.y
/usr/local/configure-wrappers/configure-spamassassin
make
sudo make install

In /etc/profile:

  • Add /usr/local/spamassassin/bin to LOCAL_PATH.
  • Add /usr/local/spamassassin/man to LOCAL_MANPATH.
  • Add /usr/local/spamassassin//share/perl/5.8.4 to PERL5LIB.

Install:

Make startup links to the init script:

sudo update-rc.d spamassassin defaults

Postfix filtering

Create a mail-filter user:

sudo adduser --system --group --home /var/spool/filter filter

Install:

Set the ownership and permissions of filter.sh:

sudo chown root:filter /usr/local/bin/filter.sh
sudo chmod 755 /usr/local/bin/filter.sh

Tell Postfix to reload its configuration:

sudo postfix reload

Note that the filter user will have its own Spamassassin configuration file in /var/spool/filter/.spamassassin/user_prefs. You can edit site-wide preferences in this file, or in /usr/local/spamassassin/etc/mail/spamassassin/local.cf. See the Spamassassin documentation for details of what you can put in these files.

Start Spamassassin

sudo /etc/init.d/spamassassin start

Procmail filtering

If you use Procmail to filter your email, put this in your ~/.procmailrc:

:0:
* ^X-Spam-Flag: YES
$HOME/Maildir/.Spam/

Upgrading

tar zxf Mail-SpamAssassin-x.y.tar.gz
cd Mail-SpamAssassin-x.y
/usr/local/configure-wrappers/configure-spamassassin
make
sudo /etc/init.d/spamassassin stop
sudo make install
sudo /etc/init.d/spamassassin start

to top

I Attachment sort Action Size Date Who Comment
spamassassin manage 1.0 K 02 Jul 2005 - 21:27 BenjaminGeer /etc/init.d/spamassassin
filter.sh manage 0.7 K 03 Jul 2005 - 00:05 BenjaminGeer /usr/local/bin/filter.sh
master.cf manage 5.2 K 03 Jul 2005 - 00:05 BenjaminGeer /etc/postfix/master.cf
local.cf manage 0.3 K 28 Jun 2003 - 02:17 BenjaminGeer ... spamassassin/etc/mail/spamassassin/local.cf
configure-spamassassin manage 0.1 K 03 May 2003 - 21:20 BenjaminGeer ... configure-wrappers/configure-spamassassin

You are here: Socialtools > ServerConfigStandard > StandardSpamassassin

to top

Copyright © 1999-2010 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Open-org? Send feedback