Written by Guillermo Garron .
Date: 2012-03-16 21:11:00 -0400
As I’m constantly trying and changing my default email application on my Mac, I’m currently using Thunderbird, the native email application and also Pilot.
So, decided to use my own local SMTP in order to not store my credentials on each application, and for an easy configuration. Also because I like emails to go fast from y outbox. Then it will be Postfix responsibility to deliver the email properly.
The problem is that my laptop is constantly changing its IP, so most of my emails will not get its destinations if I try to deliver them directly from the Macbook.
What I did, was to configure postfix to relay on Gmail to deliver my emails.
There is nothing to install postfix is already installed on my Mac.
First things first, let’s create a file to store our credentials.
sudo vim /etc/postfix/sasl_passwd
Then add inside something like this:
If you are using Google Apps, replace gmail.com for your own domain.
sudo postmap /etc/postfix/sasl_passwd
And finally prepare the postfix main configuration file.
sudo vim /etc/postfix/main.cf
And add these lines, check if they are not already present before you add them to your file.
mydomain_fallback = localhost mail_owner = postfix setgid_group = postdrop relayhost=smtp.gmail.com:587 smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_use_tls=yes smtp_tls_security_level=encrypt tls_random_source=dev:/dev/urandom
Start the Service
sudo postfix start
Configure your Client to Use localhost as SMTP Server
Point your email client to point localhost at port 25, that is it.permalink
If you enjoyed the article, please share it
comments powered by Disqus
My name is Guillermo Garron. I am telecommunications engineer from Bolivia
I like technology a lot, and this site is mainly dedicated to that
Posts via email
If you use the letter icon above and subscribe to my tinyletter newsletter, you will get one to two emails, related to this site, or not. If what you want is to get the posts of this site via email, use the form below