Re: [courier-users] Spamassasin

This is a discussion on Re: [courier-users] Spamassasin within the Courier-Imap forums, part of the Mail Servers and Related category; Pupeno said: > I've decided to give spamassasin a chance, but, I can't find any > documentation on ...


Go Back   Usenet Forums > Mail Servers and Related > Courier-Imap

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-02-2005
Jay Lee
 
Posts: n/a
Default Re: [courier-users] Spamassasin


Pupeno said:
> I've decided to give spamassasin a chance, but, I can't find any
> documentation on how to do it. I've read this:
> http://perlstalker.amigo.net/courier/SpamAssassin.phtml but that doesn't
> explain in any moment how do I make the mails pipe thru spamassassin. What
> I'd like to achieve is to be able to decide on a per-account basis to
> either *) mark spam with a header and leave it on inbox (for those using
> pop3). *) mark spam with a header and move it to Spam (for those using
> imap), and in this case, I'd set up a cron job to train the filter. Is that
> possible ? Thank you.


Yep, first make sure you're delivering with maildrop. Edit
/etc/courier/courierd so that:

DEFAULTDELIVERY="/path/to/maildrop"

and restart Courier. Now edit /etc/courier/maildroprc which is the global
maildrop filter script. Use something like:

xfilter "/usr/bin/spamc"

make sure the spamd daemon is running of course. spamc will do the
message tagging and modifications as you configure it to (I'd recommend
modifying the subject on spam messages). For users who actually wish to
have spam moved to a spam folder try creating a .mailfilter in their $HOME
directory that looks like this:

if (/^X-Spam-Status: *Yes/:h)
{
#Create SPAM IMAP folder if they don't have one
`test -d $MAILDIR/.Spam`
if( $RETURNCODE == 1 )
{
`/usr/lib/courier/bin/maildirmake -f Spam $MAILDIR`
`echo INBOX.-Spam- >> $MAILDIR/courierimapsubscribed`
}
exception {
to "$MAILDIR/.Spam/"
}
}

that should do the trick. You should of course, look into customizing the
spamassassin settings and deciding things like whether you want a global
bayesian database or per user, SQL based prefs, autowhitelisting, etc.
Have fun.

Jay
--
Jay Lee
Network / Systems Administrator
Information Technology Dept.
Philadelphia Biblical University
--


-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
courier-users mailing list
courier-users@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/.../courier-users
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 06:34 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0