mac postfix smtp relay

02:14 Wednesday, 17 October 2007

It’s often useful to have a local SMTP server one can throw messages at without passwords and authentication. For example, if you’re doing a quick hack or sending messages from a program like Apple’s Mail. It’s even more useful if your local SMTP server can contact your regular SMTP server to send the messages into the greater interweb.

Macs come with postfix installed which can do just that - but without any graphical means of configuration I doubt most people know it even exists. It is a fully functional mail server though and can be used as such. Postfix Enabler will probably work for most people who want graphical configuration. Others will read Postfix’s excellent docs and edit the config files using vi. However, there are a few cases in which Postfix Enabler falls short. Namely if you’re contacting a SMTP server that expects STARTTLS.

To get postfix to use STARTTLS when contacting a SMTP relay you simply add:

smtp_use_tls=yes

to /etc/postfix/main.cf

Newer versions of Postfix recommend a different way of saying the same thing - check which version you have and read the docs. My Mac has 2.1.5 current release is 2.4.

Doing the above after using Postfix Enabler fixed my problems.

Of course, if Apple respected my choice of email client (Thunderbird) rather than forcing me to use Mail everytime I want to mail an event from iCal none of this would matter.

Tags