[Dovecot] global sieve script

Jorge Salamero Sanz bencer at cauterized.net
Mon Oct 8 01:07:04 EEST 2007


hi all,

i'm moving from a maildrop+courier setup to lda(sieve)+dovecot setup.

with maildrop i had a global filter for all the users, so i could filter and 
archive into the spam folder spam tagged emails for users without custom 
filters, including them if they exist:

LOGNAME=tolower($LOGNAME)

`test -e $LOGNAME`
if ( $RETURNCODE != 0 )
{
   `maildirmake $LOGNAME`
   `maildirmake $LOGNAME/._spam`
}

`test -f $LOGNAME/mailfilter`
if ( $RETURNCODE == 0 )
{
        include "$LOGNAME/mailfilter"
}

if ( /^X-Spam-Status: YES */)
{
                to "$LOGNAME/._spam"
}
else
{
        to "$LOGNAME/"
}

how could i get this behaviour with dovecot lda and sieve ?

thanks !


More information about the dovecot mailing list