I installed DSPAM 3.0 at my ISP
I installed DSPAM 3.0 at my ISP. It was pretty easy. I followed the instructions at http://dspam.nuclearelephant.com/text/README-3.6.7.txt and http://splodge.fluff.org/docs/single-user-dspam. Unfortunately, the later is for DSPAM 2 and needed some changes. Here's what I did.
First, I installed Berkeley DB 4.2 via
$ cd src
$ nice make -f db4.mak
This installed the files in ~/bin, ~/lib, and ~/include. If you want to use MySQL exclusively, you can skip the above step.
Next, I installed DSPAM via
$ DB_PASSWORD=mypassword nice -n 19 make -f dspam.mak
This installed dspam in ~/bin. The "dspam home" directory is ~/dspam. If you want to use Berkeley DB instead of MySQL, you will need to edit dspam.mak and remove the --with-storage-driver=mysql_drv option. Next, I trained dspam with my current inbox and other non-spam folders:
$ cd mail
$ nice dspam_corpus $USER inbox
$ nice dspam_corpus $USER nonspam
Next, I stripped out any spamassassin headers from my ever growing list of spam:
$ nice formail -s spamassassin -d <spam >spam_no_sa
and trained dspam on the result:
$ nice dspam_corpus --addspam $USER spam_no_sa
$ rm spam_no_sa
Next, I created a ~/.forward file:
$ echo "|/usr/bin/procmail" >~/.forward
And finally, I created a ~/.procmailrc file:
$ echo 'LOGFILE=$HOME/.proclog
# Begin spam treatment.
|/$HOME/bin/dspam --user $LOGNAME --stdout --mode=teft --deliver=innocent,spam --feature=chained,bnr,whitelist
* ^X-DSPAM-Result: spam
# End spam treatment.
Of course, you will almost certainly need to change the MAILDIR and DEFAULT parameters for your system. But this should be a good start.