Implement basic sieve support using Dovecot.

The dovecot-sieve plugin is installed and configured to apply sieve
as soon as a .dovecot.sieve file is encountered in the virtual user's
home directory (that is /var/mail/${domain}/${username}/.dovecot.sieve).

Transport has been changed in the postfix configuration to use
Dovecot LDA (see http://wiki.dovecot.org/LDA/Postfix) to actually
enable sieve filtering.

Tests have been added.
This commit is contained in:
André Stein 2016-04-28 08:57:50 +02:00
parent 1a77cb77cc
commit 2f9f6b1002
8 changed files with 49 additions and 4 deletions

View file

@ -61,6 +61,8 @@ virtual_mailbox_maps = hash:/etc/postfix/vmailbox
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
# Enable Dovecot Sieve
virtual_transport = dovecot
# Additional option for filtering
content_filter = smtp-amavis:[127.0.0.1]:10024

View file

@ -63,9 +63,15 @@ mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
#
# Dovecot LDA configuration
#
dovecot unix - n n - - pipe
flags=DRhu user=docker argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop} -m ${extension}
#
# Amavis configuraiton
# Amavis configuration
#
smtp-amavis unix - - - - 2 smtp