Using Spamassassin with Qmail

I've been using Qmail for some time now and like it quite a bit. I recently configured a new Qmail server and wanted to set it up to use Spamassassin on a per user basis. I used to use ifspamh to do this but for some reason it would not work properly on my new server. While I was looking for a fix I came across a better way.

Here's the way I use Spamassassin 3.x from a .qmail file:

# use spamassassin to tag spam e-mails (slow)
|spamassassin /usr/local/bin/maildir ./<path to>/Maildir/

NOTE: replace "./<path to>/Maildir/" with the path to your maildir.

If you want to use spamc for faster tagging do this:

# use spamc to tag spam e-mails (fast)
|spamc -e /usr/local/bin/maildir ./<path to>/Maildir/

To do this you will need the maildir program which is part of the safecat package. I used safecat 1.12, found here. I've also mirrored it here for archival purposes.