From SME Server
Revision as of 23:21, 3 January 2010 by Knuddi (talk | contribs) (Created page with 'Category:MailCategory:Contrib ==Maintainer== This contrib has been developed by Jesper Knudsen ==Description== I have for a long time used SME's built-…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search


This contrib has been developed by Jesper Knudsen


I have for a long time used SME's built-in SpamAssassin with a few custom additions to get rid of most of my spam. Recently I noticed that the DSPAM project was alive again and have since heard from many sources that it did a great job for them. I did not want to get rid of SpamAssassin but wanted to combine the strength of the two spam engines. One of the "weaknesses" of DSPAM is that it requires a significant amount of training before it provides reliable result - this training I am using SpamAssassin scoring to provide.

I have therefore made this DSPAM plug-in which works in co-operation with SpamAssassin to get rid of even more spam.

This contrib consists for most of two items: - qpsmtpd plugin which handles the training of the DSPAM engines based on SpamAssassin results and the which also, when training is complete, ensures that emails are classified with DSPAM for later scoring. - SpamAssassin plugin which used the DSPAM classification results to provide additional SpamAssassin scoring based on the DSPAM classification.


The package needs a working DSPAM installation and the sme-dspam contrib.

wget http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/swerts-knudsen/SME7/sme-dspam/sme-dspam-1.0.2-2.noarch.rpm
wget http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/swerts-knudsen/SME7/sme-dspam/dspam-3.9.0-RC2.sme7.i386.rpm
wget http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/swerts-knudsen/SME7/sme-dspam/libdspam-3.9.0-RC2.sme7.i386.rpm
wget http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/swerts-knudsen/SME7/sme-dspam/libdspam-mysql-3.9.0-RC2.sme7.i386.rpm
yum  localinstall sme-dspam-1.0.2-2.noarch.rpm dspam-3.9.0-RC2.sme7.i386.rpm libdspam-3.9.0-RC2.sme7.i386.rpm libdspam-mysql-3.9.0-RC2.sme7.i386.rpm


You can simply remove the package again with the usual yum command.

yum remove sme-dspam


The contrib initially does DSPAM training and will continue to do so until DSPAM claims that training is complete. It monitors the output of "dspam_stats -H" to see when training has completed and will then switch to scoring/tagging mode. When training is complete the admin will receive an email notification. Until it received this mode you will not see any DSPAM benefits. When it starts scoring you can see the dspam qpsmtpd plugin in actions by tailing the log.

tail -f /var/log/qpsmtpd/current | tai64nlocal | grep -i dspam

The training of DSPAM is done based on SpamAssassin scores and by default it will train as SPAM if SpamAssassin rejects the email and score is above 9. It will train as ham (DSPAM terminology innocent) when mail is scores lower than 5 by SpamAssassin.

These two values can be configured by the config system

config setprop dspam hamlevel xx (default: 5)
config setprop dspam spamlevel xx (default: 9)


Can I force it to start scoring even though training hasn't completed?

Yes, you can do this by changing config:

config setprop dspam action tag
signal-event email-update

How do I report a problem or a suggestion?

This contrib has not yet been created in the bugtracker so just send an email to mailto:contribs@swerts-knudsen.dk