Friday, 29 November 2013

mail_queue_enter: create file maildrop/xxxxxx.xxxx: Permission denied

Yesterday i tried to delete postfix queue mail but i can't delete that. I got below error

[root@server]# postsuper -d ALL

postsuper: fatal: remove file defer/1/13A7B62058F: Permission denied

After i checked following things,

[root@server]# tail /var/log/maillog

Nov 28 18:59:14 server postfix/postdrop[7269]: warning: mail_queue_enter: create file maildrop/913395.7269: Permission denied
Nov 28 18:59:17 server postfix/postdrop[7785]: warning: mail_queue_enter: create file maildrop/960660.7785: Permission denied
Nov 28 18:59:24 server postfix/postdrop[7269]: warning: mail_queue_enter: create file maildrop/913567.7269: Permission denied
Nov 28 18:59:27 server postfix/postdrop[7785]: warning: mail_queue_enter: create file maildrop/960808.7785: Permission denied



[root@server ]# postfix check

postfix/postfix-script: warning: group or other writable: /var/spool/postfix
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/4
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/F
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/5
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/6
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/C
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/0
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/9
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/3
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/7
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/B
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/8
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/E
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/D
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/1
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/1/13A7B62058F
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/A
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/2
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/defer/2/2F356620591
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/4
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/F
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/5
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/6
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/C
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/0
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/9
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/3
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/7
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/B
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/8
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/E
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/D
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/1
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/1/13A7B62058F
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/A
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/2
postfix/postfix-script: warning: not owned by postfix: /var/spool/postfix/deferred/2/2F356620591
postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postqueue
postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/sbin/postdrop
[root@server ]#



The above error is giving the permission error . So i restored default permission for postfix using below command

[root@server]# postfix set-permissions

After i  run "postfix check" command. It is not showing any error.

Again i tried to clear the queue mail but i can't. So i stopped the postfix service

[root@server]# service postfix stop

Shutting down postfix:                                     [  OK  ]

After I checked postdrop process using below command

[root@server]# pgrep postdrop

7269
7785

I killed all the postdrop process 

[root@server]# killall postdrop
I restarted the posfix service

[root@server]# service postfix restart 

Shutting down postfix:                                     [FAILED]
Starting postfix:                                          [  OK  ]
 

Now i can able to remove my queue mail.....

No comments:

Post a Comment