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.09k stars 1.08k forks source link

exim4 Gmail - TLS connection errors / "Authentication Required" #107

Closed xarvex closed 8 months ago

xarvex commented 8 months ago

Yes, I have already seen #42, although I seem to be having some sort of other troubles.

This repository has given me a lot of information and I thouroughly appreciate it. I was able to setup exim4 with Gmail on my test VM, but today when attempting to configure it again after wiping the VM clean, I keep getting an "Authentication Required" error. However, I am not sure if the TLS errors also shown is a result or cause of that.

Relevant /var/log/exim4/mainlog:

2023-11-02 20:55:00 1qyjOm-0000Jc-1Z <= debian@localhost U=debian P=local S=442
2023-11-02 20:55:10 1qyjOm-0000Jc-1Z H=smtp.gmail.com [2607:f8b0:4004:c08::6c] Network is unreachable
2023-11-02 20:55:11 1qyjOm-0000Jc-1Z H=smtp.gmail.com [172.253.63.109] TLS error on connection (recv): The TLS connection was non-properly terminated.
2023-11-02 20:55:11 1qyjOm-0000Jc-1Z ** myemailhere R=smarthost T=remote_smtp_smarthost H=smtp.gmail.com [172.253.63.109] X=TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256 CV=yes DN="CN=smtp.gmail.com": SMTP error from remote mail server after pipelined end of data: 530-5.7.0 Authentication Required. Learn more at\n530 5.7.0  https://support.google.com/mail/?p=WantAuthError m13-20020a05620a220d00b0076ceb5eb309sm281788qkh.74 - gsmtp

The help link given is quite honestly entirely useless. So far, though, I have:

xarvex commented 8 months ago

It seems now that I get a "Username and Password not accepted," after not really doing anything differently. I am once again confused as from my understanding this error is only recieved when using the old method of using the account password.


2023-11-02 21:36:37 1qyk33-0000nY-0C <= debian@localhost U=debian P=local S=446
2023-11-02 21:36:49 1qyk33-0000nY-0C plain authenticator failed H=smtp.gmail.com [172.253.115.108] 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8  https://support.google.com/mail/?p=BadCredentials z10-20020a0cfeca000000b0066d11743b3esm312543qvs.34 - gsmtp
2023-11-02 21:36:50 1qyk33-0000nY-0C login authenticator failed H=smtp.gmail.com [172.253.115.108] 535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8  https://support.google.com/mail/?p=BadCredentials z10-20020a0cfeca000000b0066d11743b3esm312543qvs.34 - gsmtp
2023-11-02 21:36:51 1qyk33-0000nY-0C H=smtp.gmail.com [172.253.115.108] TLS error on connection (recv): The TLS connection was non-properly terminated.
2023-11-02 21:36:51 1qyk33-0000nY-0C ** myemailhere R=smarthost T=remote_smtp_smarthost H=smtp.gmail.com [172.253.115.108] X=TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256 CV=yes DN="CN=smtp.gmail.com": SMTP error from remote mail server after pipelined end of data: 530-5.7.0 Authentication Required. Learn more at\n530 5.7.0  https://support.google.com/mail/?p=WantAuthError z10-20020a0cfeca000000b0066d11743b3esm312543qvs.34 - gsmtp
``
xarvex commented 8 months ago

I have no way to explain this, but right after that previous comment, after recreating yet another app password and regenerating another cert, the exact same commands are working perfectly fine. I have tried going back to see what might have been the root issue but I haven't found anything. Gmail being Gmail?

imthenachoman commented 8 months ago

Ha. When I see things like this I usually chalk it up to the computer throwing a temper tantrum. Glad it worked out though.