This document will give you directions on how to set up SpamAssasin using a milter. This is necessary for users of Cyrus IMAPd when mail users do not have /etc/passwd accounts on the local machine as required for Procmail.
You are free to distribute or modify this in any way you like.
Send corrections or changes to Jon Snell at firstname.lastname@example.org
This is the first draft of this doc, please let me know of successes or failures.
Compile sendmail and setup usual, hold off on installing your sendmail.mc file
Compile and install libmilter
Compile and install SpamAssassin
Configure spamd of SpamAssassin to run at boot
Download and un-tgz check_local (get it from here)
Move the entire miltrassassin directory from check_local to sendmail-x.x.x/miltrassassin
cd into this directory
For Linux, edit the Makefile so -lpthread is the only line on LIBS and also edit the target directory to go to a directory that exists, /usr/bin
Create a new user for miltrassassin to run as, miltrass
- Go to root source directory of sendmail
chown miltrass.miltrass /var/run/miltrass
Run miltrassassin as its user (from root):
su -c miltrass miltrassassin -p /var/run/miltrass/f1.sock
Configure it to load at boot
Add this to your sendmail.mc before the define(`confLOCAL_MAILER... line:
Install your sendmail.mc:
sh ./Build install-cf from sendmail/cf/cf/
Run your new sendmail setup
If your system gets bogged down the filter may fail to respond quick enough. With this setup sendmail will just pass the mail along as if it had passed the tests.