With all the knowledge I gathered about authentication for sendmail and SMTP, I could not explain why the authentication mechanism was always empty (see the second line below). This always preceded the “authinfo failed” message and resulted in messages of “Service unavailable.”
<span class="s1">AUTH=client, relay=smtp.gmail.com [184.108.40.206], <strong>authinfo failed</strong></span>
<span class="s1">AUTH=client, relay=smtp.gmail.com</span><span class="s2">, <strong>mech=</strong></span><span class="s1"><strong>,</strong> bits=0</span>
It turns out that a copy/paste that even persisted through my own efforts for filling out the authentication information file had double quotes that looked like double quotes at first glance, but were actually smart quotes, and not ASCII 34 (double quote). This became apparent to me when I used a Vi sequence to change words to the next found character (“) and it replaced much more than I expected. I typed
cf" to change the content in the
U: parameter and it replaced all the way to the double quote that directly precedes
My issue was caused by copy/paste of the lines, but I typed in the auth methods by hand, with quotes. The incorrect line read as follows:
<span class="s1">AuthInfo:smtp.gmail.com:587 “U:root” “I:email@example.com” “P:MyP@s$w0Rd” "M:LOGIN PLAIN"</span>
Substituting the smart quotes for double quotes, as show below, solved the problem.
<span class="s1">AuthInfo:smtp.gmail.com:587 "U:root" "I:firstname.lastname@example.org" "P:MyP@s$w0Rd" "M:LOGIN PLAIN"</span>
To prevent against similar situations in the future, I have changed my font on my Terminal (on OSX) to Source Code Pro, 14pt.