How to Enable Local SMTP Server (Postfix) on OS-X Leopard
OS-X Leopard comes pre-installed with a Postfix version. No need to install it via darwin ports or other third-party source (actually uninstall it if you have previously manually installed it via ports or something similar). Postfix just needs to be enabled and following sequence of several easy steps explains how to do it:
sudo vi /System/Library/LaunchDaemons/org.postfix.master.plistadd following line before the closing </dict> tag:
<key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/>Start service with
$ sudo launchctl
launchd% start org.postfix.masterYou can also start simply with “sudo postfix start” but the above command will start via launch sequence and test the configuration you edited in the previous step.
Check that SMPT is running:
telnet localhost 25For more information, see: Mac OS X Manual Page For launchd.plist




Comments
thanks that actually worked
Thanks very much! Some other instructions didn't work.
Thank you for posting these
Thank you for posting these instructions, but after I enter this:
launchd% start org.postfix.master
I get the following error:
launchctl start error: No such process
Do you know of some other things I should check?
I also tried the following at the top of the file: <key>Disabled</key> <false/> or <key>Enabled</key> <true/>
It started off as <key>Disabled</key> <true/>
XML Source
David,
it should work. Please make sure your /System/Library/LaunchDaemons/org.postfix.master.plist looks something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.postfix.master</string>
<key>Program</key>
<string>/usr/libexec/postfix/master</string>
<key>ProgramArguments</key>
<array>
<string>master</string>
<string>-e</string>
<string>60</string>
</array>
<key>QueueDirectories</key>
<array>
<string>/var/spool/postfix/maildrop</string>
</array>
<key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/>
</dict>
</plist>
Also try opening the plist file in the Plist Editor, instead of a text editor, to see what OS-X sees, by running:
> sudo open /System/Library/LaunchDaemons/org.postfix.master.plistThank you for the
Thank you for the suggestions. I updated my file to match yours exactly, and confirmed that the referenced directories and files already existed. I also opened it in the Plist editor, and it looked right there - visual list of what was in the xml file.
Unfortunately, I still have the same result: launchctl start error: No such process
I also get that if I try "stop" instead of "start".
I appreciate you taking the time to put these instructions together. I just wish it would work for me. :/ There's probably something I did a long time ago and have completely forgotten about, that is preventing this from working today.
Thanks
It works :-)
shaaaweeet
Thanks for posting this...
Will this always start as a service from now on?
yes
You are welcome.
Yes it should start itself after computer reboot.
Getting it to work?
Hi Irakli,
I've done the command lines etc. in Terminal, all seems to be working fine. But how do I now set it up in Mail to get the SMTP to work?
Hi Irakli, after I enter
Hi Irakli, after I enter this:
$ telnet localhost 25
I get the following error:
Trying ::1... telnet: connect to address ::1: Connection refused Trying fe80::1... telnet: connect to address fe80::1: Connection refused Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. 220 iMac.local ESMTP Postfix
500 5.5.2 Error: bad syntax
500 5.5.2 Error: bad syntax
500 5.5.2 Error: bad syntax 421 4.4.2 iMac.local Error: timeout exceeded Connection closed by foreign host.
___ Thanx!
slight problem, and solution
I had to enter the keys on separate lines in order to get this to be recognized, when I tried using:
sudo open /System/Library/LaunchDaemons/org.postfix.master.plist
the way I figured out the format it would recognize them in is by just adding them through the plist editor, then saving the file there, and looking at it.
Post new comment