Applicable to:
- Plesk for Linux
Symptoms
-
Incoming mail is not received after the manual migration of IMAP folders on a Plesk server;
-
On accessing a mailbox the following error message can be found in
/var/log/maillog
:CONFIG_TEXT: cp postfix-local[18509]: postfix-local: from=johdoe@example.tld, to=janedoe@example.com, dirname=/var/qmail/mailnames
cp postfix-local[18509]: System error .qmail: Permission denied
cp postfix-local[18509]: Wrong permissions for .qmail -
In case Dovecot is installed the error in the
/var/log/maillog
file might look as follow:CONFIG_TEXT: dovecot: service=lda, user=johndoe@example.com, ip=[]. msgid=cec371129278c2a4bda8b4a7c748ee5b@example.com: save failed to INBOX: Mailbox INBOX: open(/var/qmail/mailnames/example.com/plesktest/Maildir/tmp/1540412707.M610145P50915.example.com) failed: Permission denied \
-
The following warnings are shown in
/var/log/audit/audit.log
:CONFIG_TEXT: type=AVC msg=audit(1491845234.234:481226): avc: denied { getattr } for pid=2200 comm="postfix-local" path="/var/qmail/mailnames/example.com/joe/.qmail" dev="dm-0" ino=1912673223 scontext=system_u:system_r:postfix_pipe_t:s0 tcontext=unconfined_u:object_r:var_t:s0 tclass=file
-
Deferred messages can be viewed in postfix mail queue:
# postqueue -p
-
Mail is delivered if
SELinux
is switched to permissive mode;
Cause
Files in the IMAP directory have incorrect SELinux
context.
Resolution
-
Connect to the server via SSH.
-
Restore the default
SELinux
context for the/var/qmail/mailnames
directory by executing the commands below one by one:# restorecon -R -v /var/qmail/mailnames/
# restorecon /usr/libexec/postfix/plesk_saslauthd
# restorecon -R /usr/lib64/plesk-9.0/
# restorecon -R /var/lib/plesk/mail
# restorecon -R /var/spool/postfix -
In case the issue persists, reinstall
psa-selinux
package using the command below:# yum reinstall psa-selinux
Comments
0 comments
Please sign in to leave a comment.