Configuring pigeonhole/sieve

Daniel Parthey kabelpada at kabelmail.de
Fri Aug 1 23:06:28 UTC 2014


Timothy Murphy wrote:
> I've been trying for a few days to get pigeonhole/sieve working
> in order to filter email with spamassassin.

> It's clear that I'm overlooking some action I should be taking,
> and I'm sure there must be a document somewhere
> that gives simple and complete instructions
> on setting up pigeonhole/sieve to work with SpamAssassin.
> If anyone knows of such a document I should be eternally grateful.

Postfix delivers your mail to the dovecot mailbox, this is configured
in postfix main.cf/master.cf, not in dovecot.

> I was told at one point that
> "You need to pass your mail through dovecot-lda or lmtp",
> but I have no idea what this means.

It means that you need to configure a LMTP (lightweight message
transfer protocol) transport in postfix, for example as described
in the following documents:

http://wiki2.dovecot.org/HowTo/PostfixDovecotLMTP
http://wiki2.dovecot.org/LMTP

If using INET sockets, an entry in postfix master.cf would look like this:
dovecot-lmtp unix -     -       n       -       -       lmtp

Postfix main.cf might look like this:
virtual_transport = dovecot-lmtp:dovecotserver:24

In this example the dovecot LMTP service is listening on Host "dovecotserver"
on Port 24 TCP.

> I see in /var/log/dovecot when I re-start dovecot
> "Aug 02 00:13:04 master: Info: Dovecot v2.2.10 starting up 
>   for imap, pop3, lmtp, sieve, sieve (core dumps disabled",
> which seems to imply that lmtp is enabled.

Yes, dovecot provides the LMTP service and you should be able to connect
to it using telnet, but you need to route incoming mails from postfix
via LMTP into Dovecot's LMTP service instead of writing the mail
directly to the filesystem. If postfix writes directly to the filesystem
without involving Dovecot/Pigeonhole, it circumvents the SIEVE service
and therefore your SIEVE rules won't apply, even though the service itself
is running.

Regards
Daniel


More information about the dovecot mailing list