Use Maildir with Postfix and Dovecot AND SELinux!

Okay, we have a classic setup where we use Postfix and Dovecot together to handle your mail.

For storing your mail you use Maildir, which basically puts all the mail related business in a home directory under Maildir/

Now, you want to be secure and use SELinux. But wait… There are no booleans for postfix_use_homedir or dovecot_use_homedir! Well, hopefully I can help you a bit in the way and give you a working solution:

First we make a security policy module for postfix:


Now you have a few files. The .pp is the binary representation of the .te you can use to add to the SELinux policy modules.

Now we do somekind the same for dovecot:


Now dovecot and postfix are allowed to use the homedir with Maildir. Hopes this helps… If you have any questions please drop a comment! Thanx!



About Esmé