# Postfix has stopped working

**URL:** <https://forums.suse.com/t/postfix-has-stopped-working/22560>\
**Category:** SLED Applications\
**Created:** [April 28, 2012, 12:12am UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560 "2012-04-28T00:12:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![buserror123](https://avatars.discourse-cdn.com/v4/letter/b/13edae/32.png) [@buserror123](https://forums.suse.com/u/buserror123)\
**Post date:** [April 28, 2012, 12:12am UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560/1 "2012-04-28T00:12:01Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![Arnaudk93](https://avatars.discourse-cdn.com/v4/letter/a/919ad9/32.png) [@Arnaudk93](https://forums.suse.com/u/Arnaudk93)\
**Post date:** [April 28, 2012, 8:55am UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560/2 "2012-04-28T08:55:13Z")

</div>

[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.

---

<div class="post-metadata">

**Author:** ![buserror123](https://avatars.discourse-cdn.com/v4/letter/b/13edae/32.png) [@buserror123](https://forums.suse.com/u/buserror123)\
**Post date:** [April 28, 2012, 11:31am UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560/3 "2012-04-28T11:31:50Z")

</div>

> [@Arnaudk93;4275](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![buserror123](https://avatars.discourse-cdn.com/v4/letter/b/13edae/32.png) [@buserror123](https://forums.suse.com/u/buserror123)\
**Post date:** [April 28, 2012, 2:20pm UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560/4 "2012-04-28T14:20:18Z")

</div>

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:

```auto
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.

---

<div class="post-metadata">

**Author:** ![malcolmlewis](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/malcolmlewis/32/11375_2.png) [@malcolmlewis](https://forums.suse.com/u/malcolmlewis)\
**Post date:** [April 28, 2012, 2:30pm UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560/5 "2012-04-28T14:30:51Z")

</div>

> [@buserror123](#):
>
> 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:
> 
> ## Code:
> 
> ## 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

---

<div class="post-metadata">

**Author:** ![buserror123](https://avatars.discourse-cdn.com/v4/letter/b/13edae/32.png) [@buserror123](https://forums.suse.com/u/buserror123)\
**Post date:** [April 28, 2012, 3:23pm UTC](https://forums.suse.com/t/postfix-has-stopped-working/22560/6 "2012-04-28T15:23:08Z")

</div>

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.
