Sieve filters with docker mailserver

I've been playing around with the tvial/docker-mailserver container to host multiple email domains with a lot and I mean a lot of aliases. I use an alias for every service or site. I find this useful if the service is hacked or the address is sold and spam keeps slipppin' through the filters you can simply ditch the alias for a while without interfering with legit mail.

I also used sieve for server side filtering in my old setup, which was not container based. There is support for sieve in this container but I keep forgetting how it works so I thought I write a small post as a small reminder of how it all fits together and usually when I write things down I tend not to forget them...

The documentation has all the pointers you need to get started. I quick summary:

To manual define a sieve filter for a particular user place:

.dovecot.sieve -> /var/mail/domain.com/user1/.dovecot.sieve

To 'seed' a .dovecot.sieve file at the moment of creation of the user place a especially named file in the config directory of the container :

${DOCKER}/config/user1@domain.com.dovecot.sieve -> .dovecot.sieve

Subscribe to Pascal's Hideout

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe