This also worked for me, except I ended up rebooting afterwards because no combination of restarting postfix and cronie seemed to pick up the changes.
The running postdrop processes don't seem to notice the permission changes, like they're caching the details somewhere. I had to:
killall postdrop
to kill several hundred of them that refused to work even after the permission corrections and service restart. It does seem like some recent update has caused this though. Do you use postgrey?
]]>I did the following to fix postfix:
# postfix check
postfix/postfix-script: warning: not owned by group postdrop: /usr/bin/postqueue
postfix/postfix-script: warning: not owned by group postdrop: /usr/bin/postdrop
postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/bin/postqueue
postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/bin/postdrop# systemctl stop postfix
# chgrp postdrop /usr/bin/postqueue
# chgrp postdrop /usr/bin/postdrop
# chmod g+s /usr/bin/postqueue
# chmod g+s /usr/bin/postdrop
# systemctl start postfix
This also worked for me, except I ended up rebooting afterwards because no combination of restarting postfix and cronie seemed to pick up the changes.
Scott
]]># postfix check
postfix/postfix-script: warning: not owned by group postdrop: /usr/bin/postqueue
postfix/postfix-script: warning: not owned by group postdrop: /usr/bin/postdrop
postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/bin/postqueue
postfix/postfix-script: warning: not set-gid or not owner+group+world executable: /usr/bin/postdrop# systemctl stop postfix
# chgrp postdrop /usr/bin/postqueue
# chgrp postdrop /usr/bin/postdrop
# chmod g+s /usr/bin/postqueue
# chmod g+s /usr/bin/postdrop
# systemctl start postfix
usermod -s /bin/bash postfix
Don't forget to change it back afterwards (set it back to /sbin/nologin)
]]>Can you su to postfix and touch a file in that path?
systemctl postfix stop
su - postfix
touch /var/spool/postfix/maildrop/test
[root@avalon postfix]# ls -lah
total 64K
drwxr-xr-x 16 root root 4.0K Jun 4 23:37 .
drwxr-xr-x 6 root root 4.0K Apr 24 21:57 ..
drwx------ 2 postfix root 4.0K Jun 4 23:43 active
drwx------ 2 postfix root 4.0K May 30 16:20 bounce
drwx------ 2 postfix root 4.0K May 30 16:20 corrupt
drwx------ 18 postfix root 4.0K May 24 03:55 defer
drwx------ 18 postfix root 4.0K May 24 03:55 deferred
drwx------ 2 postfix root 4.0K Apr 25 03:34 flush
drwx------ 2 postfix root 4.0K May 30 16:20 hold
drwx------ 2 postfix root 4.0K Jun 4 23:39 incoming
drwx-wx--- 2 postfix postdrop 4.0K Jun 4 23:39 maildrop
drwxr-xr-x 2 root root 4.0K May 8 14:38 pid
drwx------ 2 postfix root 4.0K Jun 4 23:38 private
drwx--x--- 2 postfix postdrop 4.0K Jun 4 23:38 public
drwx------ 2 postfix root 4.0K May 30 16:20 saved
drwx------ 2 postfix root 4.0K May 30 16:20 trace
drwx--x---. 2 postfix postdrop 4.0K May 17 05:13 public
Jun 4 23:44:04 avalon postfix/postdrop[11994]: warning: mail_queue_enter: create file maildrop/971884.11994: Permission denied
Jun 4 23:44:11 avalon postfix/postdrop[12000]: warning: mail_queue_enter: create file maildrop/675926.12000: Permission denied
Jun 4 23:44:14 avalon postfix/postdrop[11994]: warning: mail_queue_enter: create file maildrop/972066.11994: Permission denied
Jun 4 23:44:21 avalon postfix/postdrop[12000]: warning: mail_queue_enter: create file maildrop/676112.12000: Permission denied
Jun 4 23:44:24 avalon postfix/postdrop[11994]: warning: mail_queue_enter: create file maildrop/972254.11994: Permission denied
Jun 4 23:44:31 avalon postfix/postdrop[12000]: warning: mail_queue_enter: create file maildrop/676298.12000: Permission denied
Jun 4 23:44:34 avalon postfix/postdrop[11994]: warning: mail_queue_enter: create file maildrop/972442.11994: Permission denied
Jun 4 23:44:41 avalon postfix/postdrop[12000]: warning: mail_queue_enter: create file maildrop/676487.12000: Permission denied
Jun 4 23:44:44 avalon postfix/postdrop[11994]: warning: mail_queue_enter: create file maildrop/972628.11994: Permission denied
Jun 4 23:44:51 avalon postfix/postdrop[12000]: warning: mail_queue_enter: create file maildrop/676671.12000: Permission denied
Jun 4 23:44:54 avalon postfix/postdrop[11994]: warning: mail_queue_enter: create file maildrop/972815.11994: Permission denied
Jun 4 23:45:01 avalon postfix/postdrop[12000]: warning: mail_queue_enter: create file maildrop/676852.12000: Permission denied
Mails sent by php-fpm seem to get delivered, but I don't really know if I could be missing something due to this.
These are the permissions of my `postdrop' directory:
drwx-wx--- 2 postfix postdrop 4.0K Jun 4 23:39 maildrop
`postfix check' shows no error messages.
]]>