Created
May 7, 2019 09:22
-
-
Save Saransh-Sharma/2fc7097100fc3c13ac2710b9747d713c to your computer and use it in GitHub Desktop.
Revisions
-
Saransh-Sharma created this gist
May 7, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,35 @@ 1.) Create a file to store our credentials: sudo nano /etc/postfix/sasl_passwd 2.) Add something like this: smtp.gmail.com:587 [email protected]:password 3.) Now run: sudo postmap /etc/postfix/sasl_passwd 4.) Prepare the postfix main config file: sudo vim /etc/postfix/main.cf 5.) Add/update these lines 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 smtp_sasl_security_options = noanonymous smtp_always_send_ehlo = yes smtp_sasl_mechanism_filter = plain 6.) Stop/Start the service sudo postfix stop && sudo postfix start 7.) Check the queue for any errors mailq