4 messages in net.sourceforge.lists.courier-usersRE: [courier-users] maildroprc filter...
FromSent OnAttachments
Bowie BaileyApr 27, 2005 8:44 am 
PollywogApr 27, 2005 8:54 am 
Gordon MessmerApr 27, 2005 9:29 am 
Bowie BaileyApr 27, 2005 12:31 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] maildroprc filtering with spamassassin questi onActions...
From:Bowie Bailey (Bowi@BUC.com)
Date:Apr 27, 2005 8:44:20 am
List:net.sourceforge.lists.courier-users

From: Stephen Reese [mailto:rsre@gmail.com]

Currently if spam is flagged as yes the it's thrown into the users trash folder for false positive dection. Well some of the spam scores are obviously spam say 5 to 15 keep them in the trash and any higher I would like them to either bounce or just drop off. I'm not sure if i'm posting in the right place for this question but here's my maildroprc.

# Jason's first attempt at a maildroprc file... if ( $SIZE < 204800 ) { exception { xfilter "/usr/bin/spamassassin" } } if (/^X-Spam-Flag: *YES/) { exception { to "$HOME/Maildir/.Trash/" } } #else #{ # exception { # to "$HOME/Maildir/" # } #}

Once you get to maildrop, you don't want to bounce it. Your best bet is to just drop it. Also, I would suggest using spamc/spamd if at all possible. This is what I would do:

if ( $SIZE < 204800 ) { exception { xfilter "/usr/bin/spamc" } }

if ((/^X-Spam-Flag: YES/)) { if ((/^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/)) { echo "***** Dropping 15+ Spam *****" EXITCODE = 0 exit } else { to "$HOME/Maildir/.Trash/" } } to "$HOME/Maildir/"

You can get rid of the echo if you don't want an entry in the log when it drops an email.

Bowie