This is a discussion on RE: [courier-users] Spamassasin within the Courier-Imap forums, part of the Mail Servers and Related category; > -----Original Message----- > From: Pupeno > Sent: Sunday, May 01, 2005 9:20 PM > What I'd like ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
> -----Original Message-----
> From: Pupeno > Sent: Sunday, May 01, 2005 9:20 PM > 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 ? Not really, as written, because one of the neat things of the Courier system is that (from the system standpoint) at delivery there is no knowledge of the user agent. BUT... You could easily use logic along the lines of "if-and-only-if there is a subdirectory called '.Spam' move the offending item to it", and just ensure that your IMAP users (and NOT the POP3 ones) get a ".Spam" subdirectory. This could then be used in a global (/etc/courier/maildroprc) recipe like: INBOX="Maildir/" DEFAULT="$INBOX" SPAMFLD="$INBOX.Spam/" # filter message xfilter "/usr/bin/spamc" if ( /^X-Spam-Status: Yes,/) { # Check for .Spam folder... `test -d "$SPAMFLD"` if( $RETURNCODE == 1 ) { DEFAULT="$SPAMFLD" } } Malc. ------------------------------------------------------- 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 |
![]() |
| Thread Tools | |
| Display Modes | |
|
|