Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

3 Answers 3

up vote 3 down vote accepted

You'll need at least postfix running:

sudo launchctl load -w /System/Library/LaunchDaemons/org.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.

Addendum: 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>

share|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

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

share|improve this answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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