Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.4: Enable postfix without inducing insomnia UNIX
Tiger only hintAlthough postfix seems to be configured to deliver locally generated mail out of the box in Tiger, it takes a few modifications to enable the SMTP daemon, and the required modifications are different from those for Panther.

First, some background... Tiger uses launchd to start and monitor system services. The SystemStarter system used in previous versions of Darwin/OS X, which relied upon scripts living in (/System)/Library/StartupItems, is still in place but seems to be deprecated in favor of launchd. See this hint and this excerpt from John Siracusa's article for more information on launchd.

As mentioned earlier, Postfix is configured to run out of the box in Tiger; however, it is configured to run "on demand" (i.e., when there is mail in /var/spool/postifx/maildrop that needs to be delivered). The first thing we must do is configure Postfix to run unconditionally.

[robg adds: There's another hint this morning that deals with postfix, but in a different manner. I thought I would just post both and let the comments discuss the merits of each version, as they are both somewhat different -- and this one adds a bit to cure PowerBook insomnia as well...]

There are a few ways to do this, but we'll opt to use the new launchd system...
  1. launchd expects to find service configuration files for system services in /System/Library/LaundDaemons, and sure enough there is already an org.postfix.master.plist file in place there. This should be modified to read:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "">
    <plist version="1.0">

    If you'd rather not do this manually, then you may grab the toggle_on_demand script from the Darwin postfix source package found on Apple's Darwin source release site. After downloading the script, run chmod +x toggle_on_demand to make the script executable, and then sudo toggle_on_demand to execute the script.

  2. The above enabled Postfix's SMTP daemon for me; however, my Powerbook would no longer sleep. The cure for this insomnia lies in the /etc/postfix/ file. Replace this line:
    pickup    fifo  n       -       n       60       1       pickup
    with this line:
    pickup    fifo  n       -       n       -       1       pickup
    The critical 60 specifies that the pickup command should be "woken up" every 60 seconds, which prevents idle sleep in Tiger.
I should also note that Tiger includes a new service command/script that can be used to manually start the SMTP daemon with sudo service smtp start and stop it with sudo service smtp stop.
  • Currently 3.00 / 5
  You rated: 2 / 5 (5 votes cast)

10.4: Enable postfix without inducing insomnia | 5 comments | Create New Account
Click here to return to the '10.4: Enable postfix without inducing insomnia' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.4: Enable postfix without inducing insomnia
Authored by: jedik on May 15, '05 10:40:47PM
Thanks for the hint. I upgraded from Panther, and it broke my smtp daemon. I had to creat a StartupItem for it, wich was later improved by another hint found here. But I am glad that now I can remove it and use the launchd.

Two notes:

- I didn't have the "60" in the pickup line of Just modifing the plist manually was enough for me.

- In the next restart, to test if things would start automatically, I found this in the mail.log:

May 15 23:07:51 localhost postfix/master[56]: fatal: file /etc/postfix/ parameter default_privs: unknown user name value: nobody

I have the user nobody in the Netinfo. Don't know how to fix it, although the smtp service works fine, besides the error. Any directions to fix it?


:: Jedi Knight ::
-- Mac Rules! --

[ Reply to This | # ]

10.4: Enable postfix without inducing insomnia
Authored by: npaust on May 16, '05 05:30:13PM

I've had really good luck using the shareware program PostfixEnabler to get postfix working on my laptop.

It lets you get postfix up and working to send and receive mail in about a minute with a decent GUI. Configuring a secure IMAP server only takes a few minutes more. I'm not sure that there's anything more that this hint can do.

Postfix Enabler

[ Reply to This | # ]

10.4: Enable postfix without inducing insomnia
Authored by: t0fukrunch on May 16, '05 07:29:50PM

Good point. For anyone that wants to enable postfix features as painliessly as possible I'd suggest a program like PostfixEnabler.

Some reasons why I prefer doing things by hand in this case is that I'm interested in the BSD/UNIX layer (in fact this was a major factor in my buying a mac), and it's not always easy to figure out what exactly a 3rd party application is doing to your system.

[ Reply to This | # ]

10.4: Enable postfix without inducing insomnia
Authored by: t0fukrunch on May 16, '05 07:22:05PM

That's interesting that you didn't have the "60" in your Perhaps this is because I performed a clean install. I also noticed the error you mentioned in my mail.log, but I'm unable to generate it consistently.

I wanted to add that it's also probably a good idea to add the following parameters to your /etc/postfix/ file.

# 'man 5 postconf' at a terminal for more info

# specifies a delay before a warning message about undelivered
# mail is sent to the sender
delay_warning = [insert a delay specifier here; e.g. 30m, 2h, 5d, ...]

# a list of fallback smtp servers
fallback_relay = [insert a comma-separated list of smtp servers here]

[ Reply to This | # ]
10.4: Enable postfix without inducing insomnia
Authored by: robelkin on Oct 14, '05 02:14:50AM

try running the disk utility and repairing your permissions, this is something like what I found when implementing this hint, and I found it to be because you may have edited the file using your access privilidges and the owner of the file is supposed to be root.

[ Reply to This | # ]