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; From: Malcolm Weir [mailto:malc@gelt.org] > > From: Pupeno > > > What I'd like to achieve ...


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
Bowie Bailey
 
Posts: n/a
Default RE: [courier-users] Spamassasin

From: Malcolm Weir [mailto:malc@gelt.org]
>
> From: Pupeno
>
> > 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"
> }
> }


Or do with .mailfilter files for the imap users.

in maildroprc:

xfilter "/usr/bin/spamc"

..mailfilter for the imap users:

if (/^X-Spam-Status: Yes,/)
{
to "./Maildir/.Spam/"
}

Everything will be scanned for spam and marked. If there is a .mailfilter
file, it will be run and spam will be delivered to the Spam box. All other
mail (regardless of the user) will be delivered to the inbox. This avoids
having to spawn a directory existence check for every email.

Bowie


-------------------------------------------------------
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 03:49 PM.


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