by lunarg on April 23rd 2007, at 23:33
5 pages

Install and configure DSPAM

Step 1 :: installing DSPAM 3.6.x

First, download DSPAM from http://dspam.nuclearelephant.com/ and untar it.
Do a ./configure; however do mind the options as they are quite important:

# env CFLAGS="<your cflags here>" ./configure \ --with-storage-driver=hash_drv \
--with-logdir=/var/dspam \
--with-dspam-home=/var/dspam \
--enable-signature-headers \
--enable-delivery-to-stdout \
--enable-spam-delivery \
--enable-homedir

After that, make && make install ;-)

Step 2 :: setting permissions of DSPAM

Because I'm running a desktop system of my own, it's very easy to tweak the rights of things a bit. But because we're still running Linux, we don't over-exagerate. Therefore I make myself and all users that want to use DSPAM, member of 'mail'.

# gpasswd -a <user> mail

Then we change dspam's binary permissions:

# chmod 2750 /usr/local/bin/dspam

We do this so we can run dspam as 'mail' group (setgid), and it allows us to circumvent the problem of having to add every user to Trusted group in dspam.conf.

Note: if someone has a better solution, please let me know.

Step 3 :: the dspam.conf configuration file

Normally, there's not much to configure, especially since the usual things we need are already set up by default. I'll tell you what I changed (starting from the default, so not everything's in here).

TrainingMode teft
Feature noise

Note that training mode can be changed to TOE if necessary. It doesn't really matter to set it up here, because we can specify this in KMail too. Of course, setting it up here, makes things easier to change the training mode for all rules - but we're getting ahead of ourselves.

Preference "spamAction=tag"
Preference "spamTag=[SPAM]"

I don't quarantine spam using DSPAM itself. I let KMail handle all this by checking the headers. I only tag it here to make things more clearer when browsing mail, and for testing purposes.

Preference "signatureLocation=headers"

Because we're working directly on incoming mail, and because we can retrain directly through DSPAM (local install), we have the luxury of storing the signature in the headers of the mail.

And that's about it.