Mac OS X 10.10 Yosemite Postfix SASL authentication failed

守給你的承諾、 提交于 2019-11-28 16:23:10

I had the same problem. A Google search turned up this link: http://hkitago.com/2014/09/yosemiteのpostfix設定/

It turned out I was missing the following line in /etc/postfix/main.cf:

smtp_sasl_mechanism_filter = plain
esod

I added both snippets as suggested, but still no luck. Then I found this article:

http://www.developerfiles.com/how-to-send-smtp-mails-with-postfix-mac-os-x-10-8/

and ran the following steps from it:

Step 2. Create the sasl_passwd file We need to create the sasl_passwd file with the SMTP credentials

sudo vi /etc/postfix/sasl_passwd

Write the following content exactly (don't put in your user address and password) and save:

smtp.gmail.com:587 your_address@gmail.com:password

Create the Postfix lookup table from the sasl_passwd file.

sudo postmap /etc/postfix/sasl_passwd

This will create the file sasl_passwd.db

Step 3. Restart Postfix To apply all new changes we have to restart Postfix:

sudo postfix reload

And still no luck. But then I noticed that relayhost in /etc/postfix/main.cf

was commented out with brackets like so:

relayhost = [smtp.gmail.com]:587

I changed this line to:

relayhost = smtp.gmail.com:587

reloaded postfix with:

sudo postfix reload

and postfix started sending email. Hooray!

It turned out I needed another piece to get this to work.

sudo vi /System/Library/LaunchDaemons/org.postfix.master.plist

and right after this:

<dict>

add this:

<key>RunAtLoad</key>
<true/>

I can now send emails with Postfix on Yosemite!

Answer by @Josh is working just fine (can lot leave comments on the answer), but using login as a filter would also work just fine. Not sure what the difference is, though.

As stated by the documentation page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!