I am trying to switch from amazon to google for cloud services. I want to use mutt with imap, accessing a gmail account. This works perfectly fine on an ubuntu shell in amazon aws. Now I want to get it to work in Google Cloud Platform, which I think is in a lot of ways like amazon aws. GCP runs debian instead of ubuntu, but apt-get works fine. I installed postfix with SASL, just as I did in amazon aws.
Here is the rub. From the amazon aws command line I can run
echo "message body test 11" | mail -s "subject test 11" "me@me.com"
and it dutifully sends me a message to
me@me.com. The same command does not work on GCP and the mail.log output is:
Code:
Sep 15 21:12:37 mustutu postfix/pickup[17704]: 5CBD340104: uid=1000 from=<ypticon>
Sep 15 21:12:37 mustutu postfix/cleanup[18184]: 5CBD340104: message-id=<20150915211237.5CBD340104@mustutu.c.solalag.internal>
Sep 15 21:12:37 mustutu postfix/qmgr[17705]: 5CBD340104: from=<ypticon@mustutu.c.solalag.internal>, size=490, nrcpt=1 (queue active)
Sep 15 21:12:37 mustutu postfix/smtp[18185]: 5CBD340104: SASL authentication failed; server smtp.gmail.com[173.194.196.108] said: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbuRR?534-5.7.14 YbtQzp4231JwZWOyQ1NL4vtc6T09a7K2M7ROWgLpba__7OKn-jgVQn3Bl1vUVxRoxf_mTD?534-5.7.14 xwSDS2J_EnG26uOEH5OuMA1kUrCHrcW_uI95hvOhFjM7KoFiAH6wby2lOqd0u_WU4iB8QS?534-5.7.14 JgrsjZVuAI1JQMJ1zncqc5Jp-tUdSLDI-ZwjxAh38S7lt_e2Y_JD2l09EoF9PlAxWNpNXa?534-5.7.14 ouYj4TgsE3W7ZBj6m0p7r0GxBUVU> Please log in via your web browser and?534-5.7.14 then try again.?534-5.7.14 Learn more at?534 5.7.14 https://support.google.com/mail/answer/78754 g13sm6393344ioj.2 - gsmtp
Sep 15 21:12:37 mustutu postfix/smtp[18185]: 5CBD340104: to=<me@me.com>, relay=smtp.gmail.com[173.194.196.109]:587, delay=0.33, delays=0.01/0/0.33/0, dsn=4.7.14, status=deferred (SASL authentication failed; server smtp.gmail.com[173.194.196.109] said: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbvRi?534-5.7.14 AsXn8E_EXjJfqm7dnImWsrfH5_IXkrmXc7hzOwdgpEz2ufUNlGdkVydXuuap64GqcAL3zr?534-5.7.14 PEwhrmtYkmbfatNP9UJGkhhR1Mq9G1Kn2n1licod6HpLR4MH5f67bn_zSGoGqChatFoN6g?534-5.7.14 NGWbJ0IRLrFNID4fkAPz8EVcUIcBLkBGgw55yzh8aaHnjEv1U13MB36Tzzvh5FaVKLfs-5?534-5.7.14 2olyWhOSWZU-cuNJIwfr8X11gBJ8> Please log in via your web browser and?534-5.7.14 then try again.?534-5.7.14 Learn more at?534 5.7.14 https://support.google.com/mail/answer/78754 qq7sm440786igb.13 - gsmtp)
When I start mutt, something similar happens. Gmail won't let me log in ("login failed"), and it shows me the same google accounts web page. When I go to
https://accounts.google.com/ContinueSignIn etc. in a web browser I can log in, but the problem on the terminal persists and doesn't go away. I have Allow less secure apps: ON in gmail. I was trying to copy SASL settings in GCP as closely as I could compared to Amazon AWS where everything works.