Error to send emails: Unable to open file /var/lib/plesk/mail/srs/secret: Permission denied

We were unable to send emails to any email account, below error found in /var/log/maillog: 

type=AVC msg=audit(1524598331.078:35761): avc: denied { read } 
for pid=450 comm="postfix-srs" name="secret" dev=dm-0 ino=136160 
scontext=unconfined_u:system_r:postfix_master_t:s0 tcontext=unconfined_
u:object_r:mail_spool_t:s0 tclass=file

1- Log in to the server via SSH

2- Install audit2allow utility:

# yum install policycoreutils-python

3- Create allows policy for postfix-srs:

# grep postfix-srs /var/log/audit/audit.log | grep denied | 
audit2allow -M postfix-srs
# semodule -i postfix-srs.pp

Leave a Reply