Symptoms
-
Cannot send an email from Webmail:
SMTP Error (451): Failed to add recipient "[email protected]" (4.3.0 <[email protected]>: Temporary lookup failure)
-
SELinux is enabled:
# getenforce
Enforcing -
The following error can be found in
:
/var/log/maillogserver postfix/trivial-rewrite[20662]: warning: hash:/var/spool/postfix/plesk/virtual_domains is unavailable. open database /var/spool/postfix/p
lesk/virtual_domains.db: Permission denied
server postfix/smtpd[5590]: NOQUEUE: reject: RCPT from unknown[192.0.2.2]: 451 4.3.0Â [email protected]: Temporary lookup failure;
[email protected]Â [email protected] proto=ESMTP helo=<[192.0.2.3]> -
Check of SELinux context shows the following:
# ls -Z /var/spool/postfix/plesk/virtual_domains.db
-rw-r–r–. root root unconfined_u:object_r:user_tmp_t:s0 /var/spool/postfix/plesk/virtual_domains.db
Cause
Invalid SELinux context.
Resolution
- Connect to the server via SSH
- Restore SELinux context for the Postfix files:
# restorecon -R /var/spool/postfix
Note: In case the issue remains, check that SELinux is configured properly following the resolution from the article below:Â Unable to send and email: Unable to open file /var/lib/plesk/mail/srs/secret: Permission denied