sieve for dovecot

Mark Hattam mark at dxradio.demon.co.uk
Fri Dec 19 15:57:27 PST 2008


On 19 Dec 2008, at 23:37, Raj Shekhar wrote:

> On Fri, Dec 19, 2008 at 2:23 PM, Mark Hattam  
> <mark at dxradio.demon.co.uk> wrote:
>
>> maildrop is available via Macports
>> http://www.courier-mta.org/maildrop/
>
> Thanks for the tip!
>
> Would you mind sharing your dovecot.conf lines where you made dovecot
> use maildrop instead of whatever it uses as the default?
>
> I am not able to find anything good when I search for dovecot 
> +maildrop :-/
>
> Thanks!
>
> -- 
> Raj Shekhar


You probably wouldn't. Dovecot does what it's told ... it serves the  
mail you've already sorted.

I call maildrop from getmail ... getmail connects to my ISP(s),  
downloads mail, deletes it from the ISP(s), then calls maildrop to  
process the mail.

In my  ~/.getmail/getmailrc  configuration, this tells it what to do  
with mail it receives

[destination]
type = MDA_external
path = /opt/local/bin/maildrop
unixfrom = True
user = <yourusername>

and Maildrop obeys the filters I've set up in   ~/.mailfilter

and the first thing in the .mailfilter that is done is to send off any/ 
all mail to DSpam


DEFAULT = "$HOME/Maildir"
xfilter "/opt/local/bin/dspam --user <yourusername> --process --stdout  
--deliver=innocent,spam"
if (/^X-DSPAM-Result: Spam.*$/)
{
     to "$DEFAULT/.Junk/"
}


So anything that doesn't come back flagged as Spam, then gets filtered  
into the desired places which is what you then see in Dovecot.


Mark


More information about the macports-users mailing list