[Postfix] – warning: mail_queue_enter: create file maildrop Permission denied

After trying to setup postgrey, I had a lot of warning messages in my mail.log file like this:

[plain]  view plain  copy
 print ?
  1. May  7 12:26:19 gandalf postfix/postdrop[6065]: warning: mail_queue_enter: create file maildrop/713410.6065: Permission denied  
  2. May  7 12:26:29 gandalf postfix/postdrop[6119]: warning: mail_queue_enter: create file maildrop/724102.6119: Permission denied  
  3. May  7 12:26:29 gandalf postfix/postdrop[6065]: warning: mail_queue_enter: create file maildrop/734104.6065: Permission denied  
  4. May  7 12:26:39 gandalf postfix/postdrop[6119]: warning: mail_queue_enter: create file maildrop/744803.6119: Permission denied  
  5. May  7 12:26:39 gandalf postfix/postdrop[6065]: warning: mail_queue_enter: create file maildrop/754805.6065: Permission denied  
  6. May  7 12:26:49 gandalf postfix/postdrop[6119]: warning: mail_queue_enter: create file maildrop/765505.6119: Permission denied  
  7. May  7 12:26:49 gandalf postfix/postdrop[6065]: warning: mail_queue_enter: create file maildrop/775505.6065: Permission denied  
  8. May  7 12:26:59 gandalf postfix/postdrop[6119]: warning: mail_queue_enter: create file maildrop/786207.6119: Permission denied  

To get rid of this messages, I had to do the following:

[plain]  view plain  copy
 print ?
  1. root@gandalf:/var/spool/postfix# postfix check  
  2. postfix/postfix-script: warning: not owned by group postdrop: /var/spool/postfix/public  
  3. postfix/postfix-script: warning: not owned by group postdrop: /var/spool/postfix/maildrop  

SOLUTION:

[plain]  view plain  copy
 print ?
  1. root@gandalf:/var/spool/postfix# /etc/init.d/postfix stop  
  2. root@gandalf:/var/spool/postfix# killall -9 postdrop  
  3. root@gandalf:/var/spool/postfix# chgrp -R postdrop /var/spool/postfix/public  
  4. root@gandalf:/var/spool/postfix# chgrp -R postdrop /var/spool/postfix/maildrop/  
  5. root@gandalf:/var/spool/postfix# postfix check  
  6. root@gandalf:/var/spool/postfix# postfix reload  


How to fix "warning: not set-gid or not owner+group+world executable"?

In my case it appeared in the logs for two files:

[plain]  view plain  copy
 print ?
  1. postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postqueue  
  2. postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postdrop  

fix is quite trivial though:

[plain]  view plain  copy
 print ?
  1. chmod g+s /usr/sbin/postqueue  
  2. chmod g+s /usr/sbin/postdrop  

Refer:

http://inmyplace.info/postfix-warning-mail_queue_enter-create-file-maildrop-permission-denied/

https://kb.gosi.at/content/1/70/en/how-to-fix-warning-not-set_gid-or-not-ownergroupworld-executable.html


转载:http://blog.csdn.net/knowledgeaaa/article/details/72717272

你可能感兴趣的:(系统运维企业案例,linux)