• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Change location of mail maildirs & SELINUX

Frank_Boon

New Pleskian
Hi,

I have changed the maildir in Plesk according to http://kb.odin.com/en/6312. Everything works like a charm, however selinux doesn't allow access to the new directory. That means we get a permission denied and no mail is received at the server anymore.

Old location: /var/qmail/mailnames/
New location: /mnt/bigstorage/mailnames/

tail -f /var/log/maillog:
Mar 2 13:38:42 srv2 postfix-local[5983]: postfix-local: from=[email protected], to=[email protected], dirname=/mnt/bigstorage/mailnames/
Mar 2 13:38:42 srv2 postfix-local[5983]: cannot chdir to mailnames dir /mnt/bigstorage/mailnames: Permission denied

If we disable selinux, everything works, however this is not the best practice.

How can I fix this error without disabling selinux?

Regards,
Frank
 
What is your SELinux status now?
By default on Plesk servers it should be

# getenforce
Disabled

Other statuses may lead to unpredictable consequences.
 
Back
Top