I have confirmed that the id/pass is ok, and allow less secure app is also turned on, i can use the same id from other devices fine, only sendmail not sending. what could be the cause?
Great tutorial.
On my Ubuntu after created I cannot change the permissions in mkdir -m 700 /etc/mail/authinfo/.
My Ubuntu use a SSH certificate and has not the root password (I cannot do su, only sudo).
Maybe is better to setup a 777 and at the end of configuration change to 700.
The option to enable “less secure apps” is no longer available with Gmail. There is a workaround with 2-Step verification enabled. After enabling 2-Step verification, the option App Passwords becomes available for the Google Account. You can generate a new application password to replace the password in the “gmail-auth” file, which allows Sendmail to work without verification.
After stepping through the process above (and using the app password for Gmail account due to recent changes in Gmail ‘less secure apps’ access), still unable to send from Linux Unbuntu install. Following error message returned after simple echo message to mail command:
msmtp: no recipients found
mail: Sending data to /usr/bin/msmtp failed: Process exited with a non-zero status
mail: cannot send message: Process exited with a non-zero status