a tidbit

Postfix on OSX: Fatal: Open Lock File pid/master.pid

You use OSX. You change the Postfix configuration, or maybe you install your own. You get this error throughout your mail.log: "fatal: open lock file pid/master.pid: unable to set exclusive lock: Resource temporarily unavailable"

I know you do, because I've seen you asking about it all over the Internets, and no one ever has an answer. Well, try this, because it worked for me (click through)...

Macintosh OSX 10.4 uses something called "launchd" to control daemons (among other things). This includes the default Postfix master executable.

When mail is received, the running Postfix master wants to handle it. But launchd wants to handle it, too. The result is that they both try to lock the master.pid file at the same time.

Try this command, as root (or use sudo):
#launchctl list

If you see "org.postfix.master" in the list of launchd jobs, then this is probably what is causing the lock errors in your logs.

To fix the problem, edit the org.postfix.master.plist file in /System/Library/LaunchDaemons (as root or using sudo):
#nano -w /System/Library/LaunchDaemons/org.postfix.master.plist

Add the following two tags within the <dict> container:
<key>Disabled</key>
<true/>

Then Restart your Mac. Do not try to restart launchd by iteself, it will most likely put your system into an unusable state (at least, it buggered mine when I tried it).

After restart, try launchctl list again. There should be no org.postfix.master record. Use postfix start to launch the mail system, send yourself a test message, and check the logs. Good luck!

By Chris Snyder on February 19, 2006 at 1:08pm

jump to top