Accessing your gmail account from VPS using Mutt
I spent several frustrating hours trying to figure out what I was doing wrong after installing and configuring Mutt for Gmail.
$ mutt -s "Tester" email@example.com < /tmp/mail.txt msmtp: authentication failed (method PLAIN) msmtp: server message: 534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbu0B msmtp: server message: 534-5.7.14 XGxSM-tObJBIhQ5VPFuixj8fKKomIPSnncNaOTJghPy0TpsfqG0KPA8loEuq5TE0QK-WGK msmtp: server message: 534-5.7.14 C9Sq2rHnhzg_RGnMG4poE3uqs-U52pB_IYVcXSw2QUhPSwfAsaaYkAnPSGDsWmE7iA5HBz msmtp: server message: 534-5.7.14 jyKXEhtr7lqURIk2wxoTty0AFQOL4ZKz19gDWNe0EYAYqrFCr1V0g4hDECdJZDSO8Te5rX msmtp: server message: 534-5.7.14 4E3I7MA> Please log in via your web browser and then try again. msmtp: server message: 534-5.7.14 Learn more at msmtp: server message: 534 5.7.14 https://support.google.com/mail/bin/answer.py?answer=78754 om6sm22285664pbc.43 - gsmtp msmtp: could not send mail (account default from /home/yranadive/.msmtprc) Error sending message, child exited 77 (Insufficient permission.). Could not send the message.
It turns out that Google prevents unauthorized access to your account and it will block mutt even if you have the correct user name and password. The only way to get past this hurdle is to let Google know to expect a login from what it thinks is a suspicious device (your VPS host). You can do that by going to the following link