

Smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) # line of that file to be used as the name. # Debian specific: Specifying a file name will cause the first # See /usr/share/postfix/main.cf.dist for a commented, more complete version Here is the complete version of the main.cf: Make sure this address is identical to the one in gmail_passwd relayhost = :587 Please put the GMail SMTP server address here. Relayhost field means the SMTP relay host. Reset them by: smtp_sasl_security_options = Gmail SMTP Server does not support postfix’s security options. Open /etc/postfix/main.cf with whatever editor you like: vim /etc/postfix/main.cfĪdd the following line to map your credentials smtp_sasl_password_maps = hash:/etc/postfix/gmail_passwdĮnable TLS and sasl authiencation for Gmail SMTP Server smtp_use_tls = yes Sudo chmod 0600 /etc/postfix/gmail_passwd /etc/postfix/gmail_passwd.db sudo chown root:root /etc/postfix/gmail_passwd /etc/postfix/gmail_passwd.db sudo postmap /etc/postfix/gmail_passwdįor safely reason, you should allow only the root user can access this 2 files. :587 the following command to generate a postfix database. Once the installation is finished, change your terminal’s current directory to /etc/postfixĬreate a file call gmail_passwd, replace the information with your credentials.
LINUX MAC OS X POSTFIX SEND TEST EMAIL INSTALL
Install Postfix using the following command: sudo apt-get install postfix

There maybe quite a bunch of online resources doing similar thing, but I prefer to write my own as an example and to refresh my forgetful brain.
LINUX MAC OS X POSTFIX SEND TEST EMAIL HOW TO
In this article, you will learn how to setup a free Gmail Relay on your Ubuntu server.

Now, I plan to break it down into a series of article. Okay, the fact is that I put too much content in one article. What if I tell you that this article has already existed for 400 days in my draft list (more than a year)? This probably makes you wonder how ridiculous I am to not finish it earlier.
