[[dspam]]
 

Using DSpam with procmail and mutt

Add the following to your .procmailrc:

# dspam spam filtering:
:0fw
| /usr/local/dspam/bin/dspam --stdout --deliver-spam
 
:0:
* ^X-DSPAM-Result: spam
dspam
 
# End spam treatment.
 
 

Add the following to your .muttrc:

# DSpam key bindings.
# S will tag an email as spam and move it to the Mail/dspam mail folder.
# N will tag a non-spam as ham and nothing else.

macro pager i "|/usr/local/dspam/bin/dspam --addspam"\n
macro pager S "isMail/dspam"\n
macro pager I "|/usr/local/dspam/bin/dspam --falsepositive"\n
macro pager N "I"
macro index i "|/usr/local/dspam/bin/dspam --addspam"\n
macro index S "isMail/dspam"\n
macro index I "|/usr/local/dspam/bin/dspam --falsepositive"\n
macro index N "I"

These key bindings don’t display anything when they run. DSpam needs a little training, so when spam comes into your normal mailbox, press S on it. If non-spam goes to your dpsam folder, press N on it. This’ll train dspam what is and isn’t spam.

You can train DSpam using your existing spam folder that spamassassin has been storing its spam in. Run “formail -s spamassassin -d < spam > cleanspam” where “spam” is your existing spamassassin spam mail folder. Then run “/usr/local/dspam/bin/dspam_corpus username cleanspam –addspam” where username is your username, don’t put “username”, put “bloggs”.

Then, do the same for ham emails, so your normal mailbox clear of all spam. “/usr/local/dspam/bin/dspam_corpus username mailbox”

You really need to feed dspam about 10,000 messages - a mix of good and bad, so throw everything you’ve got at it. It should then accurately mark spam.

References

 
dspam.txt · Last modified: 2006/10/02 12:33 by gavin
 
Recent changes RSS feed Valid XHTML 1.0 Valid CSS Driven by DokuWiki