DSPAM for Gentoo qmail Author - $Author: st_lim $ Version - $Id: README.qmail,v 1.1 2004/06/26 16:45:28 st_lim Exp $ These are some steps I took to use dspam with qmail. If you have a better method of using qmail with DSPAM, do send a message to me at to share your ideas. My set up includes: a. qmail b. qmail-scanner c. Mail-SpamAssassin d. f-prot (I'm not using it at the moment, coz mails do get stuck in the queue when I use f-prot) e. dspam (of course) For setting up spamassassin, I think I shall not go into details with it. I think an excellent tutorial can be found at http://cmisip.home.insightbb.com/Qmail.htm. So once you have spamassassin set up, you will want to use dspam without procmail. And since you have .qmail, here is what you do: 1. add your user and qmailq to /etc/mail/dspam/trusted.users $ cat /etc/mail/dspam/trusted.users apache nobody root qmailq alias st_lim spteo 2. type the following into your /home//.qmail file | /usr/bin/dspam --user --deliver=innocent --mode=teft --feature=chained,noise,whitelist [your normal delivery options] 3. When you get spam, you have either of 2 options: a. Run the dspam command on the mail via your email client: ========================================================================================== /usr/bin/dspam --user --mode=teft --class=spam --source=error < [spam-mail] ========================================================================================== b. Or run the dspam command on a set of emails in a directory via a cron job, my suggested script is below: ========================================================================================== #!/bin/sh JUNK_DIR=/home//Maildir/Junk JUNK_MAILS=$JUNK_DIR/cur/[0-9]* QMAIL_SPAMASSASSIN=/var/qmail/.spamassassin sa-learn --spam $JUNK_MAILS for i in $JUNK_MAILS; do cat $i | /usr/bin/dspam --user qmailq --mode=teft --class=spam --source=error done cp $ROOT_SPAMASSASSIN/bayes* $QMAIL_SPAMASSASSIN chown -R qmailq:qmail $QMAIL_SPAMASSASSIN rm -rf $JUNK_MAILS ========================================================================================== If you have any problems with the abovementioned setup, pls share it via bugs.gentoo.org. I'll try to help you resolve the issues. Regards Lim Swee Tat