Support our site SIGNUP FOR HOSTMONSTER.COM
Support our SiteOffice365 Home Premium 1YR Subscription
An alternative to Exchange SMTP Servers to Send Mail
Some of us have had some issues with their Exchange SMTP servers (refusing to send e-mail for alternate addresses or simply refusing to send any mail at all). MacOS X 10.3 and 10.4 now has Postfix pre-installed which can turn your Mac into an SMTP server.
If the port 25 is open on your network (which is often the case), you can turn your own Mac into your SMTP server very easily in MacOS X 10.3 (it is far more complex in 10.2.8 which uses Sendmail by default instead of Postfix - though you can install Postfix if you really really want to but this won't be covered here).
You have two options to enable Postfix. You can use a shareware like "Postfix enabler" (which at this time is not yet available for Tiger), or you can do it yourself (not that hard but Postfix Enabler sets up a few more options for you... and it has a GUI).
If you decide to do it manually, you can use your favorite MacOS X text editor or do it directly in the Terminal through pico, vi, vimm...... I'd suggest that you backup the files before you decide to do anything nasty:
sudo cp /etc/hostconfig /etc/hostconfig.old
sudo cp /etc/postfix/master.cf /etc/postfix/master.cf.old
I recommend using TextWrangler by BareBones Software (free) which offers a very nice user interface and properly deals with Permissions (which is critical here since all the following modifications have to e done in Administrator privileges - the application will ask you for your administrator password every time it is required).
For MacOS X 10.3.x (Panther)
Open the hidden file /etc/hostconfig with TextWrangler (Menu "File:Open Hidden…") and replace MAILSERVER=-AUTOMATIC- with MAILSERVER=-YES-
Open the hidden file /etc/postfix/master.cf at line 77, you need to de-comment "smtp". Replace: # smtp with smtp
in the Terminal, then enter:
sudo postfix start
Authenticate AND THAT'S IT !!!!! You're done. The address of your own personal SMTP is now "localhost" (without the quotes of course).
For MacOS X 10.4 (Tiger)
Tiger has a whole different way to deal with processes that launch at startup. The hostconfig file and the
rc command re now obsolete and the system uses a new scheme called
launchd to manage such processes (you can type
man launchd in the Terminal to learn more about it). In order to reduce startup time and useless use of resources,
launchd makes sure it only runs some specific background processes only when needed (and it shows!!! Look at how fast the startup is in Tiger).
In Tiger, Postfix has all the options it needs to be active by default, but it will only run in specific circumstances defined for
launchd in /System/Library/LaunchDaemons/org.postfix.master.plist. You can manually launch Postfix using the command
sudo postfix start in the Terminal, but the process won't be running next time you reboot. To have the process run every time you reboot, you'll need to tell
launchd that you want postfix to run all the time (and not only when triggered by the System). I'm not sure this is an ideal situation, but it's the best I found so far. The org.postfix.master.plist file is a well-structured XML document and you can add a "key" in the file to make sure
launchd knows the process has to run continuously.
Open /System/Library/LaunchDaemons/org.postfix.master.plist in TextWrangler and, on line 8, add the key:
A copy of the org.postfix.master.plist is available here if you just want to copy and paste in the original file (avoid replacing the original to make sure you don't end-up with corrupted permission settings) to make sure you don't make any mistake setting it up.
Save the File and reboot. Postfix should now be running all the time, allowing you to use 127.0.0.1 or "localhost" to send e-mails from your Mail client (e.g.: Entourage).
Extra configuration can be perform editing the /etc/postfix/main.cf This file is fairly straightforward. The default settings are rather safe: They even disable any relaying from other machines..... You shouldn't turn your Mac into a relay for spammers.
After a modification in the configuration file, simply enter in the Terminal:
sudo postfixt restart
This saved my life (well my e-mails) here since our Exchange server won't send e-mails unless the From address corresponds to its user list, preventing me to send anything from my numerous alternate addresses...
PS: I should add "use at your own risk" I can just tell you than I've been using Postfix for a while now and it has been smoother than ever. No problem on my Mac whatsoever.
Contributed by Corentin Cras-Méneur, Mac:MVP