Spamassassin with Postfix and Procmail
If you read the docs that SuSE puts in /usr/share/doc/packages/spamassassin, I think you'll find that they have you doing some weird things. I've been beating on this all afternoon, and I think I have a better way of dealing with this. The SuSE-recommended method has postfix calling procmail as an argument to smtpd. I don't really understand the handoff here, and I can't find any reference to how these are constructed. It may be a better way, but here's the problem *I* have with it. Once handed off to procmail, procmail reads the system-wide rc file (/etc/procmailrc). An example one is given in the SuSE docs. That example has it pass the mail through spamassassin, and then deliver via a hard sendmail command. The net net of this procedure is that you have a spamassassin-tagged email in your user mailbox. Period. There can be no futher user-defined procmail or spamassassin filtering. I tried commenting out the procmailrc stuff about sendmail, but this wouldn't deliver mail. So I had to do something else. What I did is go back to the "old" way, the default way that spamassassin would have you do it. I added "mailbox_command = /usr/bin/procmail" to /etc/postfix/main.cf. This hands off processing to procmail like before, but it does it differently enough such that I can comment out the other half of the procmailrc file. After tagging, system-wide, by spamassassin, it gets subjected to normal user mangling through ~/.procmailrc files. The other thing is that -- I guess, because I haven't tried -- but from what I read... If you were to use spamc instead of spamassassin in the system-wide procmailrc file, you would allow users to invoke their own ~/.spamassassin files as well. I'm just a fan of procmail, because local users could pass their local procmail handling off to spamassassin again in their local procmailrc files. Have I type "procmail" enough times yet? Hope this helps someone else. Regards, dk -- David "Dunkirk" Krider, http://www.davidkrider.com Acts 17:28, "For in Him we live, and move, and have our being." Linux: Will you use the power for good... or for AWESOME?
On Fri, 2 May 2003, David Krider wrote:
If you read the docs that SuSE puts in /usr/share/doc/packages/spamassassin, I think you'll find that they have you doing some weird things. I've been beating on this all afternoon, and I think I have a better way of dealing with this.
The SuSE-recommended method has postfix calling procmail as an argument to smtpd. I don't really understand the handoff here, and I can't find any reference to how these are constructed. [ ... ] dk
-- David "Dunkirk" Krider, http://www.davidkrider.com
All you linux experts are using spamassassin rather than the Mozilla-mail spam control. I tried to use the latter. But without fully knowing its usage, I tend to disable it several times because I found out some important emails are marked as spams quite often. Can someone tell me why you are using spamassassin rather than mozilla spam-control? Also, how can I properly teach mozilla not to mark nonspams? In fact, what I want the most is actually very simple. I just wish to mark all emails with either *.gif or *.jpeg or *.jpg in the content (not in the attached file) as spams. Thanks a lot. G. Hugh Song
On Fri, 2003-05-02 at 16:31, ghugh Song wrote:
All you linux experts are using spamassassin rather than the Mozilla-mail spam control. I tried to use the latter. But without fully knowing its usage, I tend to disable it several times because I found out some important emails are marked as spams quite often.
Can someone tell me why you are using spamassassin rather than mozilla spam-control?
I think the beauty of the system is that after having spamassassin mark the message the way you want, you can have Mozilla take actions on those (very clear) markings. I don't know how good the Mozilla Bayesian system is (if it's even Bayesian), but spamassassin has only had one false positive for me in the couple years I've been using it. (I err on the side of caution just a little, and get a few missed spams in my inbox.)
In fact, what I want the most is actually very simple. I just wish to mark all emails with either *.gif or *.jpeg or *.jpg in the content (not in the attached file) as spams.
I don't know about this part. The only thing I can think of is that you could mark some of the rules in spamassassin as giving a HUGE weight to anything with those named attachments. Also, I see that the version of spamassassin that SuSE is including has that fancy "mime defang" feature, which I thought I'd have to add another piece of software for. This feature can make things a lot "safer." Regards, dk -- David "Dunkirk" Krider, http://www.davidkrider.com Acts 17:28, "For in Him we live, and move, and have our being." Linux: Will you use the power for good... or for AWESOME?
participants (2)
-
David Krider
-
ghugh Song