Postfix which was installed and configured to send out emails won't work anymore, and you might notice error messages in the /var/log/mail.log file. Something like -
SASL authentication failed; server smtp.gmail.com said: Application-specific password required.
The solution below should fix this issue:
First, you would need visit the Authorizing applications & sites page (pictured below) under your Google Account settings.
On this page page enter the name of the application to be authorized (Postfix) and click on Generate Password button. Write down the password generated by this page.
Then, the following changes need to be made to Postfix configuration:
- As root user (or using sudo), modify the SASL password file:
# to contain the password generated instead of your Google account password used before.
- Hash the password file
- Make sure SASL password files can be read by root user only
sudo chmod 600 /etc/postfix/sasl_passwd.db
- Restart Postfix
That is it. Postfix should be able to send emails the same way it did before, using the 2-step verification feature from Google.
Thanks! totally helped me troubleshoot my homework assignment and get my relay working!ReplyDelete
Thanks a ton. Now my GoFlex Home running Arch can send me status updates!!ReplyDelete
Great!!! only your tutorial worked! thanks a lotReplyDelete
Quick and concise. It's amazing this still works after 3 years since original post with the way Google changes things around. Thanks for the help!ReplyDelete
You are very welcome - I am really glad it helped.Delete