8 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] How to get extra info...
FromSent OnAttachments
Dan HorneSep 28, 2005 2:28 pm 
Jay LeeSep 28, 2005 2:47 pm 
Jay LeeSep 28, 2005 2:49 pm 
Dan HorneSep 29, 2005 6:44 am 
Dan HorneSep 29, 2005 6:45 am 
Jay LeeSep 29, 2005 7:10 am 
Dan HorneSep 29, 2005 7:14 am 
Jay LeeSep 29, 2005 7:17 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] How to get extra info from MySQL db into filtersActions...
From:Jay Lee (jl@pbu.edu)
Date:Sep 29, 2005 7:17:48 am
List:net.sourceforge.lists.courier-maildrop

Dan Horne wrote:

Jay Lee <mailto:jl@pbu.edu> wrote on Wednesday, September 28, 2005 5:48 PM:

Dan Horne wrote:

if ( $SIZE < 26144 ) { exception { xfilter "/usr/bin/spamassassin --prefspath=$HOME/$DEFAULT/.spamassassin/user_prefs " } }

You also really, really want to be using spamc here and have the spamd daemon running. It makes a *huge* difference in performance. If you call the spamassassin binary each time, the first 100 emails in 10 minutes will bring your shiny new mail server to it's knees...

**NOTE: Resending this to list as original went to Jay Lee's address instead of the list. **

I can call spamc from maildrop? That shows you how much I have been able to glean from the maildrop doco. I don't necessarily need to have spamassassin called from maildrop (we're also using amavisd-new for virus scanning), but we host multiple domains and want each user to have its own spam settings and bayes and autowhitelist db's. Calling spamassassin from maildrop was the best way I could figure to do that. How would I call spamc? Running spamd is not a problem, I already have that set up I just have to set it to startup automatically.

Is there a better way to do this that would allow me 1)per-user settings and 2)the ability to turn spam filtering on and off per address or domain from the db?

Spamc operates pretty much the same as spamassassin, except that instead of loading the beast that is perl itself and all the SA libs, it will just pipe the message over to the spamd daemon that already has perl and SA libs loaded. In most cases, simply switching your command from /usr/bin/spamassassin to /usr/bin/spamc and making sure that spamd is started automatically is all you need to do for a major performance increase. If you're calling Amavisd earlier, users are still having their mail filtered... I'm not a big fan of Amavisd with Courier, I have clamcour (http://sourceforge.net/projects/clamcour/) setup as a courierfilter for virus blocking, previously I used clamassassin (http://drivel.com/clamassassin/) from maildrop but since ClamAV has never returned a false positive for me yet, I decided to have it block viruses outright instead of silently discarding them later. I do not make the AV filter an option to users. Then I call SpamAssassin for all users. If users want to "turn off" spam filtering, they can set their sa_score to 100 which prevents messages from being flagged. But you could also use the mysql code I showed you before if you want to prevent SA from running at all on those who opt-out of spam filtering.