[Dovecot] Filtering spam in an offlineimap + dovecot setup
Tom Hendrikx
tom at whyscream.net
Wed Feb 12 22:13:51 UTC 2014
On 12-02-14 14:03, Alan Schmitt wrote:
> Hello,
>
> To easily access my mail both offline on my computer and on my
> phone, I am synchronizing a local copy on my computer using
> offlineimap. As the spam filtering options provided on the server
> are not sufficient, I am now looking into client-side spam
> filtering.
>
> My current setup is as follows. Mail is synchronized using
> offlineimap, and delivered to a local dovecot server:
>
> --8<---------------cut here---------------start------------->8---
> [Repository LocalIMAP] type = IMAP preauthtunnel =
> /usr/local/Cellar/dovecot/2.2.10/libexec/dovecot/imap -c
> ~/.dovecotzimbra.rc --8<---------------cut
> here---------------end--------------->8---
>
> The configuration of the local server is simply:
>
> --8<---------------cut here---------------start------------->8---
> protocols = imap mail_location =
> maildir:~/.Maildir/zimbra:INBOX=~/.Maildir/zimbra/.INBOX
> --8<---------------cut here---------------end--------------->8---
>
> I then read my mail using gnus, and index it using notmuch.
>
> A suggestion I've been considering is use the pigeonhole sieve
> extprograms plugin
> (http://wiki2.dovecot.org/Pigeonhole/Sieve/Plugins/Extprograms) to
> call the spam filter (I've been looking at dspam at the moment).
> However, I could not find how to configure the use of sieves in the
> context of offlineimap. Hence my questions:
>
> Is it possible to use dovecot sieves in such a setting? Is there a
> howto that explains how to do it?
You could simply enable sieve in the dovecot environment. The
offlineimap + dovecot setup you have running already can be left
mostly intact: it has nothing to do with offlineimap.
You could just setup sieve per the dovecot wiki guidelines, and then
create a sieve script that uses the ext_programs plugin to call dspam
(or any other filter that adds headers and is able to print the
message including those added headers to stdout).
I'm not sure if it's necessary to do the delivery to dovecot using
Dovecot's deliver LDA, or that you can keep using the
'...libexec/dovecot/imap' binary for that in order to have sieve
support. Maybe someone else can fill that in.
Regards,
Tom
More information about the dovecot
mailing list