imthenachoman / How-To-Secure-A-Linux-Server

An evolving how-to guide for securing a Linux server.
Creative Commons Attribution Share Alike 4.0 International
17.34k stars 1.11k forks source link

Gmail SMTP: You can no longer use the account's password #106

Closed ghost closed 1 year ago

ghost commented 1 year ago

It seems that to use Gmail and Exim4 you can no longer use the account's password for SMTP authentication, even if you have 2FA disabled. If you try to, the output of tail /var/log/exim4/mainlog will be similar to this:

plain authenticator failed H=smtp.gmail.com Username and Password not accepted. Learn more at https://support.google.com/mail/?p=BadCredentials - gsmtp
login authenticator failed H=smtp.gmail.com Username and Password not accepted. Learn more at https://support.google.com/mail/?p=BadCredentials - gsmtp

The solution is to enable 2FA on the account, create an App Password and use it without any spaces.

It would be nice to have that updated in the Gmail and Exim4 As MTA With Implicit TLS section.

imthenachoman commented 1 year ago

Good idea. I will add. A bit busy this week but will get to it.

imthenachoman commented 1 year ago

Fixed. Thanks!