32 messages in net.sourceforge.lists.courier-usersRe: [courier-users] SpamAssassin inte...
FromSent OnAttachments
Gabriel AmbuehlMay 19, 2003 3:58 am 
Gordon MessmerMay 19, 2003 12:10 pm 
Greg JohnstoneMay 19, 2003 7:45 pm 
Anand BuddhdevMay 20, 2003 7:31 am 
ecu...@encontacto.netMay 20, 2003 8:12 am 
Eric LivingstonMay 20, 2003 8:31 am 
Mitch (WebCob)May 20, 2003 9:37 am 
Gordon MessmerMay 20, 2003 10:20 am 
Rodrigo SeveroMay 20, 2003 11:17 am 
Courier UserMay 20, 2003 1:46 pm 
Courier UserMay 20, 2003 2:06 pm 
Greg JohnstoneMay 20, 2003 5:44 pm 
Tim HunterMay 20, 2003 7:11 pm 
Mirko ZeibigMay 21, 2003 12:23 am 
ecu...@encontacto.netMay 21, 2003 7:40 am 
Gabriel AmbuehlMay 21, 2003 9:26 am 
Gabriel AmbuehlMay 21, 2003 9:27 am 
Gabriel AmbuehlMay 21, 2003 9:53 am 
Gabriel AmbuehlMay 21, 2003 5:49 pm 
Greg JohnstoneMay 21, 2003 5:53 pm 
Greg JohnstoneMay 21, 2003 6:55 pm 
ecu...@encontacto.netMay 21, 2003 6:58 pm 
ecu...@encontacto.netMay 21, 2003 7:16 pm 
Greg JohnstoneMay 21, 2003 10:00 pm 
Alexei Batyr'May 22, 2003 2:36 am 
rodr...@fabricadeideias.comMay 22, 2003 3:49 am 
Gabriel AmbuehlMay 22, 2003 3:56 am 
Bowie BaileyMay 22, 2003 8:56 am 
Gordon MessmerMay 22, 2003 11:12 am 
Gordon MessmerMay 22, 2003 11:20 am 
pdon...@angrynerds.comMay 22, 2003 2:47 pm 
Greg JohnstoneMay 25, 2003 9:13 pm 
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: [courier-users] SpamAssassin integrationActions...
From:Mirko Zeibig (mirk@zeibig.net)
Date:May 21, 2003 12:23:39 am
List:net.sourceforge.lists.courier-users

On Tue, May 20, 2003 at 04:46:57PM -0400, Courier User wrote:

On Mon, May 19, 2003 at 11:58:15AM -0700, Gordon Messmer wrote:

Gabriel Ambuehl wrote:

1) Site wide SpamAssassin checking: Basically, whatever comes in through esmtpd should be piped into SpamAssassin before it makes it to the queue. Is there a hook to do that?

I'm not aware of a filter that will do so, but it seems like it would be trivial to extend perlfilter to use Mail::SpamAssassin, and return success/fail based on the score the message receives.

I believe that perlfilter would not be the best place to integrate SpamAssassin. The programs that are used at that stage of filtering don't do standard Unix pipe-based filtering; rather, they read information from a control file, and from that they get the message to be examined. At this point, it's not trivial to pass that message on to another filter (in this case, SpamAssassin) and to examine its output.

But I use SpamAssassin with Courier for global filtering, using a different procedure: I simply put the following rule into COURIERHOME/etc/maildroprc:

xfilter "/usr/local/bin/spamc"

if ( /^X-Spam-Status: *Yes/ ) { to "$HOME/.spamassassin/caughtspam" }

This would just be a me too, but I have the following in

/etc/courier/maildroprc: --- snip --- import SENDER import RECIPIENT import HOME PATH=/bin:/usr/bin:/usr/local/bin:/usr/lib/courier/bin/ INBOX="Maildir/" DEFAULT="$INBOX" SPAMFLD="$INBOX.Trash/" SHELL=/bin/ash

# create needed directory `test -d "$SPAMFLD"` if( $RETURNCODE == 1 ) { `maildirmake "$SPAMFLD"` }

# filter message xfilter "/usr/bin/spamc" if ( /^X-Spam-Status: Yes,/) { DEFAULT="$SPAMFLD" } --- snap --- KMail and Mozilla use Trash as trash folder, so I am able to issue an "Empty Trash" command instead of "mark, delete and purge".

I import SENDER, RECIPIENT and HOME because I have only virtual domains and use a different SHELL which is more lightweigt then "bash" to minimize resource usage.

Regards Mirko