You are not logged in.

#1 2013-06-04 21:49:38

Butcher
Member
Registered: 2009-02-04
Posts: 158

[SOLVED] Postfix error messages

I am getting these error messages in /var/log/mail.log:

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.

Last edited by Butcher (2013-06-05 09:09:11)

Offline

#2 2013-06-04 23:16:52

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,229
Website

Re: [SOLVED] Postfix error messages

'public' also needs to be grp'ed to postdrop and mod'ed g=x

drwx--x---.  2 postfix postdrop 4.0K May 17 05:13 public

Offline

#3 2013-06-04 23:18:18

Butcher
Member
Registered: 2009-02-04
Posts: 158

Re: [SOLVED] Postfix error messages

Thanks fukawi2, but that seems to be the same set of permissions I currently have. Here's the full list:

[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

Offline

#4 2013-06-04 23:25:30

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,229
Website

Re: [SOLVED] Postfix error messages

Hmm, that's strange.... I was only stabbing in the dark since you didn't include the full list in the OP.

Can you su to postfix and touch a file in that path?

systemctl postfix stop
su - postfix
touch /var/spool/postfix/maildrop/test

Offline

#5 2013-06-04 23:29:25

Butcher
Member
Registered: 2009-02-04
Posts: 158

Re: [SOLVED] Postfix error messages

`su - postfix' does not seem to do anything since, after doing it, `whoami' returns root and the file is created by root:root.

Offline

#6 2013-06-04 23:34:13

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,229
Website

Re: [SOLVED] Postfix error messages

You'll need to change the shell for postfix user first:

usermod -s /bin/bash postfix

Don't forget to change it back afterwards (set it back to /sbin/nologin)

Offline

#7 2013-06-05 01:12:00

net147
Member
Registered: 2010-04-16
Posts: 8

Re: [SOLVED] Postfix error messages

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

Offline

#8 2013-06-05 02:06:52

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Postfix error messages

net147 wrote:

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

Offline

#9 2013-06-05 08:25:23

DcUK
Member
Registered: 2009-04-09
Posts: 10

Re: [SOLVED] Postfix error messages

firecat53 wrote:

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?

Offline

#10 2013-06-05 09:08:38

Butcher
Member
Registered: 2009-02-04
Posts: 158

Re: [SOLVED] Postfix error messages

That is true. I did not notice that `postdrop' was not being stopped after stopping postfix. It is run under the `http' user, so I restarted `lighttpd' and `php-fpm' and that seemed to solve it for me.

Offline

#11 2013-06-05 11:57:31

teekay
Member
Registered: 2011-10-26
Posts: 271

Re: [SOLVED] Postfix error messages

Offline

Board footer

Powered by FluxBB