Hey guys, I'm doing a lot of test emailing for a PHP based application. I find that sometimes my emails become 'stuck'.

I did find a solution, in the terminal I type (as root) postfix start, and I can flush queues and other stuff. It appears the postfix application is only run when needed. I however want the application to run all the time.

Any ideas?

link|improve this question

feedback

4 Answers

up vote 3 down vote accepted

You'll need at least postfix running:

sudo launchctl load -w /System/Library/LaunchDaemonsorg.postfix.master.plist

The -w means that it will load at startup. Otherwise it'll only run until it's stopped.

Similarly, you can undo by using launchctl unload -w.

Edit: This addresses the "only runs when needed" problem Gordon indicates I missed. Place it inside the body of the plist.

<key>RunAtLoad</key>

<true>

<key>OnDemand</key>

<false>

link|improve this answer
This won't help on a Mac OS X client, as the postfix launchd item already loaded by default, and is set to only activate if there's something in /var/spool/postfix/maildrop (which is the current problem). – Gordon Davisson Nov 16 '09 at 20:18
feedback

Minor correction to @Nerdling's post above, the path is missing a slash:

/System/Library/LaunchDaemons/org.postfix.master.plist

link|improve this answer
feedback

you have to look at launchd. See for example here.

link|improve this answer
feedback

Thanks for this; I had to change "<true>" and "<false>" to "<true/>" and "<false/>" respectively to get it to work.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.