On Fri, 2022-01-07 at 10:02 +0100, Christian Kivalo wrote:> > > On January 7, 2022 9:51:20 AM GMT+01:00, Ken Wright > <daddywarlock at gmail.com> wrote: > > I reinstalled Dovecot this evening, because I haven't been able to > > receive emails recently.? After configuring and adjusting for the use > > of PostfixAdmin, I get the following error message in Evolution:; > > > > Failed to open folder. > > The reported error was "Failed to authenticate: TLS connection closed > > unexpectedly". > > > > Does anyone recognize this error? > Do you have a connection attempt logged by dovecot? > Is there anything in the logs on the server?Here's the output of tail /var/log/mail.log: kwright at grace:~$ tail /var/log/mail.log Jan 7 12:17:01 grace dovecot: auth-worker(665770): Debug: sql(www-data at mydomain.com): Finished userdb lookup Jan 7 12:17:01 grace dovecot: auth-worker(665770): Debug: conn unix:auth-worker (pid=577330,uid=118): auth-worker<47>: Finished Jan 7 12:17:01 grace dovecot: auth: Debug: sql(www-data at mydomain.com): Finished userdb lookup Jan 7 12:17:01 grace dovecot: auth: Debug: userdb out: FAIL#0116 Jan 7 12:17:01 grace dovecot: lmtp(www-data at mmydomain.com)<666025><8B33CY112GGpKQoAThsuZQ>: Error: auth-master: userdb lookup(www-data at mydomain.com): Auth USER lookup failed Jan 7 12:17:01 grace dovecot: lmtp(666025): Error: lmtp-server: conn unix:pid=666014,uid=117 [4]: rcpt www-data at mydomain.com: Failed to lookup user www-data at mydomain.com: Internal error occurred. Refer to server log for more information. Jan 7 12:17:01 grace postfix/lmtp[666014]: 1ABE5100DB349: to=<www-data at mydomain.com>, orig_to=<www-data>, relay=grace.koalatyworks.com[private/dovecot-lmtp], delay=0.14, delays=0.12/0/0/0.02, dsn=4.3.0, status=deferred (host grace.mydomain.com[private/dovecot-lmtp] said: 451 4.3.0 <www-data at mydomain.com> Temporary internal error (in reply to RCPT TO command)) Jan 7 12:17:01 grace dovecot: lmtp(666025): Disconnect from local: Client has quit the connection (state=READY) Jan 7 12:17:03 grace dovecot: auth: Debug: client in: CONT#0111#011ZWR1Y2F0aW9uQGtvYWxhdHl3b3Jrcy5jb20= (previous base64 data may contain sensitive data) Jan 7 12:17:03 grace dovecot: auth: Debug: client passdb out: CONT#0111#011UGFzc3dvcmQ6 And here's tail /var/log/mail.err: Jan 7 12:20:01 grace dovecot: lmtp(666838): Error: lmtp-server: conn unix:pid=666856,uid=117 [3]: rcpt www-data at mydomain.com: Failed to lookup user www-data at mydomain.com: Internal error occurred. Refer to server log for more information. Jan 7 12:21:01 grace dovecot: auth-worker(665770): Error: sql(www-data at mydomain.com): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM mailbox WHERE username = 'www-data at mydomain.com' AND active='1'' at line 1 Jan 7 12:21:01 grace dovecot: lmtp(www-data at mydomain.com)<666838><oAcjK3122GHWLAoAThsuZQ>: Error: auth-master: userdb lookup(www-data at mydomain.com): Auth USER lookup failed Jan 7 12:21:01 grace dovecot: lmtp(666838): Error: lmtp-server: conn unix:pid=666840,uid=117 [4]: rcpt www-data at mydomain.com: Failed to lookup user www-data at mydomain.com: Internal error occurred. Refer to server log for more information. Jan 7 12:22:01 grace dovecot: auth-worker(665770): Error: sql(www-data at mydomain.com): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM mailbox WHERE username = 'www-data at mydomain.com' AND active='1'' at line 1 Jan 7 12:22:01 grace dovecot: lmtp(www-data at mydomain.com)<666838><uFfTNbl22GHWLAoAThsuZQ>: Error: auth-master: userdb lookup(www-data at mydomain.com): Auth USER lookup failed Jan 7 12:22:01 grace dovecot: lmtp(666838): Error: lmtp-server: conn unix:pid=666840,uid=117 [5]: rcpt www-data at mydomain.com: Failed to lookup user www-data at mydomain.com: Internal error occurred. Refer to server log for more information. Jan 7 12:23:02 grace dovecot: auth-worker(665770): Error: sql(www-data at mydomain.com): User query failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'FROM mailbox WHERE username = 'www-data at mydomain.com' AND active='1'' at line 1 Jan 7 12:23:02 grace dovecot: lmtp(www-data at mydomain.com)<666838><kNcEEfZ22GHWLAoAThsuZQ>: Error: auth-master: userdb lookup(www-data at mydomain.com): Auth USER lookup failed Jan 7 12:23:02 grace dovecot: lmtp(666838): Error: lmtp-server: conn unix:pid=666840,uid=117 [6]: rcpt www-data at mydomain.com: Failed to lookup user www-data at mydomain.com: Internal error occurred. Refer to server log for more information. Hope this helps! Ken
You have to enable ssl logging check the configs!> -----Original Message----- > From: dovecot <dovecot-bounces at dovecot.org> On Behalf Of Ken Wright > Sent: Friday, January 07, 2022 6:32 PM > To: Christian Kivalo <ml+dovecot at valo.at>; dovecot at dovecot.org > Subject: Re: TLS connection closed unexpectedly > > On Fri, 2022-01-07 at 10:02 +0100, Christian Kivalo wrote: > > > > > > On January 7, 2022 9:51:20 AM GMT+01:00, Ken Wright > > <daddywarlock at gmail.com> wrote: > > > I reinstalled Dovecot this evening, because I haven't been able to > > > receive emails recently.? After configuring and adjusting for the use > > > of PostfixAdmin, I get the following error message in Evolution:; > > > > > > Failed to open folder. > > > The reported error was "Failed to authenticate: TLS connection closed > > > unexpectedly". > > > > > > Does anyone recognize this error? > > Do you have a connection attempt logged by dovecot? > > Is there anything in the logs on the server? > > Here's the output of tail /var/log/mail.log: > > kwright at grace:~$ tail /var/log/mail.log > Jan 7 12:17:01 grace dovecot: auth-worker(665770): Debug: > sql(www-data at mydomain.com): Finished userdb lookup > Jan 7 12:17:01 grace dovecot: auth-worker(665770): Debug: conn > unix:auth-worker (pid=577330,uid=118): auth-worker<47>: Finished > Jan 7 12:17:01 grace dovecot: auth: Debug: sql(www-data at mydomain.com): > Finished userdb lookup > Jan 7 12:17:01 grace dovecot: auth: Debug: userdb out: FAIL#0116 > Jan 7 12:17:01 grace dovecot: > lmtp(www- > data at mmydomain.com)<666025><8B33CY112GGpKQoAThsuZQ>: Error: > auth-master: userdb lookup(www-data at mydomain.com): Auth USER > lookup > failed > Jan 7 12:17:01 grace dovecot: lmtp(666025): Error: lmtp-server: conn > unix:pid=666014,uid=117 [4]: rcpt www-data at mydomain.com: Failed to > lookup user www-data at mydomain.com: Internal error occurred. Refer to > server log for more information. > Jan 7 12:17:01 grace postfix/lmtp[666014]: 1ABE5100DB349: > to=<www-data at mydomain.com>, orig_to=<www-data>, > relay=grace.koalatyworks.com[private/dovecot-lmtp], delay=0.14, > delays=0.12/0/0/0.02, dsn=4.3.0, status=deferred (host > grace.mydomain.com[private/dovecot-lmtp] said: 451 4.3.0 > <www-data at mydomain.com> Temporary internal error (in reply to RCPT TO > command)) > Jan 7 12:17:01 grace dovecot: lmtp(666025): Disconnect from local: > Client has quit the connection (state=READY) > Jan 7 12:17:03 grace dovecot: auth: Debug: client in: > CONT#0111#011ZWR1Y2F0aW9uQGtvYWxhdHl3b3Jrcy5jb20= (previous > base64 data > may contain sensitive data) > Jan 7 12:17:03 grace dovecot: auth: Debug: client passdb out: > CONT#0111#011UGFzc3dvcmQ6 > > And here's tail /var/log/mail.err: > > Jan 7 12:20:01 grace dovecot: lmtp(666838): Error: lmtp-server: conn > unix:pid=666856,uid=117 [3]: rcpt www-data at mydomain.com: Failed to > lookup user www-data at mydomain.com: Internal error occurred. Refer to > server log for more information. > Jan 7 12:21:01 grace dovecot: auth-worker(665770): Error: > sql(www-data at mydomain.com): User query failed: You have an error in > your SQL syntax; check the manual that corresponds to your MariaDB > server version for the right syntax to use near 'FROM mailbox WHERE > username = 'www-data at mydomain.com' AND active='1'' at line 1 > Jan 7 12:21:01 grace dovecot: > lmtp(www-data at mydomain.com)<666838><oAcjK3122GHWLAoAThsuZQ>: > Error: > auth-master: userdb lookup(www-data at mydomain.com): Auth USER > lookup > failed > Jan 7 12:21:01 grace dovecot: lmtp(666838): Error: lmtp-server: conn > unix:pid=666840,uid=117 [4]: rcpt www-data at mydomain.com: Failed to > lookup user www-data at mydomain.com: Internal error occurred. Refer to > server log for more information. > Jan 7 12:22:01 grace dovecot: auth-worker(665770): Error: > sql(www-data at mydomain.com): User query failed: You have an error in > your SQL syntax; check the manual that corresponds to your MariaDB > server version for the right syntax to use near 'FROM mailbox WHERE > username = 'www-data at mydomain.com' AND active='1'' at line 1 > Jan 7 12:22:01 grace dovecot: > lmtp(www-data at mydomain.com)<666838><uFfTNbl22GHWLAoAThsuZQ>: > Error: > auth-master: userdb lookup(www-data at mydomain.com): Auth USER > lookup > failed > Jan 7 12:22:01 grace dovecot: lmtp(666838): Error: lmtp-server: conn > unix:pid=666840,uid=117 [5]: rcpt www-data at mydomain.com: Failed to > lookup user www-data at mydomain.com: Internal error occurred. Refer to > server log for more information. > Jan 7 12:23:02 grace dovecot: auth-worker(665770): Error: > sql(www-data at mydomain.com): User query failed: You have an error in > your SQL syntax; check the manual that corresponds to your MariaDB > server version for the right syntax to use near 'FROM mailbox WHERE > username = 'www-data at mydomain.com' AND active='1'' at line 1 > Jan 7 12:23:02 grace dovecot: > lmtp(www-data at mydomain.com)<666838><kNcEEfZ22GHWLAoAThsuZQ>: > Error: > auth-master: userdb lookup(www-data at mydomain.com): Auth USER > lookup > failed > Jan 7 12:23:02 grace dovecot: lmtp(666838): Error: lmtp-server: conn > unix:pid=666840,uid=117 [6]: rcpt www-data at mydomain.com: Failed to > lookup user www-data at mydomain.com: Internal error occurred. Refer to > server log for more information. > > Hope this helps! > > Ken
On 07/01/2022 18:31, Ken Wright wrote:> On Fri, 2022-01-07 at 10:02 +0100, Christian Kivalo wrote: >> >> On January 7, 2022 9:51:20 AM GMT+01:00, Ken Wright >> <daddywarlock at gmail.com> wrote: >>> I reinstalled Dovecot this evening, because I haven't been able to >>> receive emails recently.? After configuring and adjusting for the use >>> of PostfixAdmin, I get the following error message in Evolution:; >>> >>> Failed to open folder. >>> The reported error was "Failed to authenticate: TLS connection closed >>> unexpectedly". >>> >>> Does anyone recognize this error? >> Do you have a connection attempt logged by dovecot? >> Is there anything in the logs on the server? > Here's the output of tail /var/log/mail.log: > > .... > Jan 7 12:23:02 grace dovecot: auth-worker(665770): Error: > sql(www-data at mydomain.com): User query failed: You have an error in > your SQL syntax; check the manual that corresponds to your MariaDB > server version for the right syntax to use near 'FROM mailbox WHERE > username = 'www-data at mydomain.com' AND active='1'' at line 1 > Jan 7 12:23:02 grace dovecot: > lmtp(www-data at mydomain.com)<666838><kNcEEfZ22GHWLAoAThsuZQ>: Error: > auth-master: userdb lookup(www-data at mydomain.com): Auth USER lookup > failed > Jan 7 12:23:02 grace dovecot: lmtp(666838): Error: lmtp-server: conn > unix:pid=666840,uid=117 [6]: rcpt www-data at mydomain.com: Failed to > lookup user www-data at mydomain.com: Internal error occurred. Refer to > server log for more information. > > Hope this helps! > > Ken >Ken it may or may not be related to the tls issue, but I think you will want to investigate that message about the SQL query syntax error. You are not going to be able to login if the query is giving errors. Check the user_query in the dovecot configuration, since the SQL snippet in the log doesn't reveal the cause. John