Author Topic: SELinux is preventing Dovecot to write on /var/vmail/domain...  (Read 3559 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
SELinux is preventing Dovecot to write on /var/vmail/domain...
« on: December 03, 2019, 04:36:14 PM »
After last update, seems that Dovecot failed to initialize mail storage if SELINUX=enforcing & SELINUXTYPE=targeted

Code: [Select]
lda(email@domain.tld): Error: User initialization failed: Initializing mail storage from mail_location setting failed: mkdir(/var/vmail/domain.tld/email) failed: Permission denied (euid=101(vmail) egid=12(mail) missing +w perm: /var/vmail, UNIX perms appear ok (ACL/MAC wrong?))
lda: Fatal: Invalid user settings. Refer to server log for more information.

If we put the SElinux on permissive mode, all work right, but to disable the SElinux it's not recommended.

The command "semanage permissive -a dovecot_t" it puts dovecot into a permissive mode and we can connect to mail server.
But that is not the right way to resolve the problem, it's just a temporary solution.

We need some custom rules for SELINUX to work with Dovecot.

Cheers