postdrop: create file maildrop/xxx: Permission denied

You may see quite a few maildrop warning messages in the postfix logs such as

postdrop: warning: mail_queue_enter: create file maildrop/xxxx.xxxx: Permission denied
postdrop: warning: mail_queue_enter: create file maildrop/yyyy.yyyy: Permission denied

The error occurs when postfix is not able to write under the “maildrop” folder and hence unable to send emails. This is due to incorrect ownership on the ‘maildrop’ folder i.e. the “maildrop” folder is not owned by ‘postfix’.

Check the ownership/permissions of the postfix files:

# /etc/init.d/postfix check
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/public
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/maildrop

Solution:

Stop the postfix service:

# /etc/init.d/postfix stop

Kill the postdrop processes:

# killall -9 postdrop

Correct the ownership of the above directories:

# chown postfix.postdrop /var/spool/postfix/public -R
# chown postfix.postdrop /var/spool/postfix/maildrop -R

Now, start the postfix service:

# /etc/init.d/postfix start

Emails should now be working fine.

转自:

  LinuxHostingSupport.postdrop: create file maildrop/xxx: Permission denied

知识共享许可协议
作品Tim Zhang创作,采用知识共享署名 3.0 中国大陆许可协议进行许可。 。
原文地址:https://www.cnblogs.com/ccdc/p/2531158.html