cyrus+sendmail+spamassasin HOWTO
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 jsnell@networkninja.com
This is the first draft of this doc, please let me know of successes or failures.
Directions:
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
- Go to root source directory of sendmail
cd libmilter
sh Build
make install
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
mkdir /var/run/miltrass
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:
INPUT_MAIL_FILTER(`filter1', `S=local:/var/run/miltrass/f1.sock')
Install your sendmail.mc:sh ./Build install-cf from sendmail/cf/cf/
Run your new sendmail setup
Notes:
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.