Postfix has stopped working

I’ve been running postfix as a personal mail server for several years but today I rebooted my machine to move to latest kernel and postfix will no longer start. In /var/log/mail, I see the following error:

Apr 27 21:52:28 server postfix/postfix-script[5556]: starting the Postfix mail system
Apr 27 21:52:28 server postfix/master[5557]: fatal: open lock file pid/master.pid: unable to set exclusive lock: Resource temporarily unavailable

I have spent a couple of hours searching Google and have tried reverting to the previous kernel, rolling back to the previous version of postfix and running with the default config (master.cf and main.cf) files but I am still having the same problem.

I’m currently running SLED 11 SP2 with kernel 3.0.26-0.7-default and postfix-2.5.13-0.17.4.

Any help will be much appreciated!

[QUOTE=buserror123;4271]I’ve been running postfix as a personal mail server for several years but today I rebooted my machine to move to latest kernel and postfix will no longer start. In /var/log/mail, I see the following error:

Apr 27 21:52:28 server postfix/postfix-script[5556]: starting the Postfix mail system
Apr 27 21:52:28 server postfix/master[5557]: fatal: open lock file pid/master.pid: unable to set exclusive lock: Resource temporarily unavailable

I have spent a couple of hours searching Google and have tried reverting to the previous kernel, rolling back to the previous version of postfix and running with the default config (master.cf and main.cf) files but I am still having the same problem.

I’m currently running SLED 11 SP2 with kernel 3.0.26-0.7-default and postfix-2.5.13-0.17.4.

Any help will be much appreciated![/QUOTE]

It seems to be a common problem for OSX. I don’t know postfix very well, but it seems another process is running.

Yes, I saw lots of examples of OSX issues when searching the net. Most seemed to show that OSX was using two different methods of starting postfix at boot time that were causing the conflict. On SLED, I can only think that postfix would be started directly by the rc scripts at boot or by xinet. I’ve checked /etc/xinet.d and cannot see anything relevant there:

bruce@server:/etc/xinetd.d> ls chargen cvs discard echo-udp pure-ftpd servers swat time-udp vnc.rpmnew chargen-udp daytime discard-udp fam rsync services systat vnc cups-lpd daytime-udp echo netstat sane-port svnserve time vnc~

I have also run lsof on /var/spool/postfix/pid/master.pid and it doesn’t show any other process.

Finally, using netstat -ta doesn’t show anything listening for SMTP, which would be a clue if something else was trying to replace postfix.

All very confusing.

Thinking a filesystem problem may be the root cause of this, I changed my main.cf to move the spool directory from /var/spool/postfix to /var/spool/postfix_2. On doing this, the startup error changed to:

Apr 28 11:54:34 server postfix/master[14032]: fatal: open lock file pid/master.pid: cannot create file exclusively: Permission denied

After checking permissions on this new folder, I did a bit more Googling and discovered that this is an AppArmour problem. I’ve now disabled AppArmour and postfix is working normally again.

Problem solved.

Hi
Running the command postfix set-permissions should fix that second
error you saw.


Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.1 (x86_64) Kernel 3.1.10-1.9-desktop
up 7:43, 4 users, load average: 0.00, 0.01, 0.05
CPU Intel i5 CPU M520@2.40GHz | Intel Arrandale GPU

Thanks for the feedback.

I did as you suggested but it didn’t alter the permissions of the /var/spool/postfix/pid directory or resolve the problem. Disabling AppArmour was the key.