Business and Technology with Common Sense

How To Configure your Mac to Send Mail Regardless of Where you Are

When I went fulltime with b5media, one of the requirements I had for my system was that it had to be a Mac. Having never used a Mac before, the response was with a bit of skepticism. First, they are quite expensive and I haven’t even got the software I need yet. Secondly, why use a Mac when you can use a PC.

My argument was that as a Unix guy, I need the power of Unix at my fingertips. Windows makes things difficult when it comes to shell integration, etc. I discovered difficulty setting up my b5media email because of the configuration we use for sending mail. In addition, as I travel a bit now, I’ve already encountered the fact that many hotels and even some wifi hotspots like to make people use their own SMTP server to send mail too and that’s a pain.

Because OS X is built on top of Unix, I discovered it was quite easy to setup my own mail server on the Mac to send my mail through. It was more simple than I thought it was.

First you need to download postfix. Extract it to the Desktop.

Run the following commands from the terminal.

cd /System/Library/Startup Items
sudo mv ~/Desktop/Postfix .
sudo chown -R 0:0 Postfix
sudo chmod +rx Postfix/Postfix

Once you have done this, you need to open

/etc/hostconfig

in your favorite text editor. I like vi. Newbies might prefer pico instead.

sudo vi /etc/hostconfig

Look for the line that begins MAILSERVER. Change the value to -NO-. If you don’t see it, go to the end of the file and add the line:

MAILSERVER=-YES-

Now you can set your SMTP server in your mail client to 127.0.0.1 with no authentication or special settings required. I use Entourage and have successfully gotten things working from this end.

Hat Tip David Reitter for the guidance in this. And of course, if you like this, please Digg it. :)

Update: Front page of Digg this morning. Thanks folks. Let’s keep this bad boy from creaking to a halt. :)

Digg commenters have noted that sometimes you can’t send over port 25 because it is blocked. Also, if potfix is not configured right, it may be flagged as spam. Other issues are cropping up too. I’ll follow up with another article at some point.

Popularity: 15% [?]

About Aaron
I am the Lead Editor of Technosailor.com, the Author of the WordPress Bible, a WordPress project core contributor, public speaker and an all around badass. If you're interested in having me speak at your event, contact me.

Comments

  1. Zach says:

    Entourage does support StartTLS and it does support outgoing on port 587. However, it doesn’t support both at the same time, which is fairly stupid. I was not aware of this until I did a quick google search to confirm.What you have to do for Entourage is use port 465 and SSL. I don’t know how widely it’s supported, however I’d assume that it’s supported by all mail providers that support 587 with StartTLS, considering the problem also affects Outlook, which most users use.I found a page on yale.edu that does a good job of showing how to configure this.http://www.yale.edu/its/email/howdoi/authentica...I still stand by statement that running postfix on your local machine is a stupid idea. There are too many problems associated with sending directly from wherever you happen to be for this to be considered anything but a last-ditch solution.If you run Postfix on your own mail server, you can easily enable port 465 (aka smtps) in /etc/postfix/master.cf. Set the args to “-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes” and you’ve effectively duplicated the setup for port 587.

  2. Zach says:

    Entourage does support StartTLS and it does support outgoing on port 587. However, it doesn’t support both at the same time, which is fairly stupid. I was not aware of this until I did a quick google search to confirm.What you have to do for Entourage is use port 465 and SSL. I don’t know how widely it’s supported, however I’d assume that it’s supported by all mail providers that support 587 with StartTLS, considering the problem also affects Outlook, which most users use.I found a page on yale.edu that does a good job of showing how to configure this.http://www.yale.edu/its/email/howdoi/authentica...I still stand by statement that running postfix on your local machine is a stupid idea. There are too many problems associated with sending directly from wherever you happen to be for this to be considered anything but a last-ditch solution.If you run Postfix on your own mail server, you can easily enable port 465 (aka smtps) in /etc/postfix/master.cf. Set the args to “-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes” and you’ve effectively duplicated the setup for port 587.

  3. Zach says:

    Entourage does support StartTLS and it does support outgoing on port 587. However, it doesn’t support both at the same time, which is fairly stupid. I was not aware of this until I did a quick google search to confirm.What you have to do for Entourage is use port 465 and SSL. I don’t know how widely it’s supported, however I’d assume that it’s supported by all mail providers that support 587 with StartTLS, considering the problem also affects Outlook, which most users use.I found a page on yale.edu that does a good job of showing how to configure this.http://www.yale.edu/its/email/howdoi/authentica...I still stand by statement that running postfix on your local machine is a stupid idea. There are too many problems associated with sending directly from wherever you happen to be for this to be considered anything but a last-ditch solution.If you run Postfix on your own mail server, you can easily enable port 465 (aka smtps) in /etc/postfix/master.cf. Set the args to “-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes” and you’ve effectively duplicated the setup for port 587.

  4. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  5. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  6. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  7. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  8. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  9. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  10. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  11. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  12. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  13. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  14. Yeah Zach… tries that. Doesn’t seem to work. We’re moving to a new server cluster and I’m thinking when that is done, I need to make some other options available for mail.

  15. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  16. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  17. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  18. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  19. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  20. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  21. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  22. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  23. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  24. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:http://longtailend.com/index.php/2006/08/31/smt...

  25. Sean says:

    If you are just looking to be able to send email from any internet connection with your regular Mac email client, here is an approach I posted about that works well for me:
    http://longtailend.com/index.php/2006/08/31/smtp-makes-the-koalas-cry/

  26. David Lopan says:

    Try this instead.
    http://cutedgesystems.com/software/PostfixEnabler/
    it’s cheap and it works.

  27. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  28. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  29. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  30. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  31. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  32. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  33. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  34. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  35. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.

  36. David Lopan says:

    Try this instead.http://cutedgesystems.com/software/PostfixEnabler/it’s cheap and it works.