On Jul 15, 2007, at 10:39 AM, Jeffrey Goldberg wrote:

I running postfix from ports. I would like to block as much spam as possible during the SMTP session. [...]

I see that postfix now does sendmail style milters. Is that the recommended way to go with this? I see that there is a mail/ spamass-milter port. I anyone using that with postfix 2.4.3?

Here is what I have working so far.

Straight from ports


 p5-Mail-SpamAssassin-3.2.1
 spamass-milter-0.3.1_3
 postfix-2.4.3,1

To get postfix to use the milter, I added

 # milters for spam assassin
 milter_default_action = accept
 smtpd_milters = unix:/var/run/spamass-milter.sock

to main.cf

Note that the milter_default_action setting is so that if I mess up the milter, mail still goes through. I may set this to tempfail once I am more confident.

Also to allow postfix to talk to the milter I added

 spamass_milter_socket_group="mail"
 spamass_milter_socket_mode="664"

to /etc/rc.conf (in addition to the _enable variables).

I will submit a PR with an addition to the documentation explaining how to do this with postfix.

What I've been having the most difficulty with is spammassassin itself. It runs correctly as the spamd user (note that this is *not* the spamd which is the BSD tarpit, but is a daemonized spamassassin.) but it still seems to think that is also running as user root and so tries to write things in

   /root/.spamassassin

Now if I change the ownership of that spamd then everything works fine, but I really don't want my bayes and whitelist database on the root filesystem. I can (and have) manually set the paths for the bayes data and the autowhitelist data to a more appropriate location, but the later path setting feature appears undocumented, and I still haven't figured out what path variable to set for the user preferences (so each time mail comes into the server, spamassassin, run as spamd, tries to read /root/.spamassassin/user_pref.

I'm sure that I could probably trace out the separate configuration variable to set that to the right location, but I'm wondering why spamassassin is looking in root's home directory at all instead of the spamd home directory.

-j




--
Jeffrey Goldberg                        http://www.goldmark.org/jeff/

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to