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/listinfo/courier-users