Dovecot not allowing logins to check email

A user reported that she was unable to get her email today and was receiving an error in Outlook when she attempted to download her email. I logged into the email server, which runs Dovecot. I tried establishing a telnet connection to the POP3 port on the server. I was able to successfully connect to the well-known port, TCP port 110, used for POP3 connections. I could then enter the user's username with the user command, but I never received a reponse from the server, i.e. from Dovecot. I eventually had to hit ctrl-], i.e., the Ctrl and "]" keys to return to the shell prompt.

$ telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
user nell
^]

telnet> quit
Connection closed.
$

I've encountered the same issue in the past, but haven't been able to track down the cause yet. E.g., see Dovecot not responding. As I've done previously, I checked on entries in today's and yesterday's mail logs for any entries that might be related to the problem and for the number of dovecot processes running. I saw a lot of dovecot process entries; 59 of those entries were pop3-login ones.

# egrep -c -i dovecot.*(error|warning) /var/log/maillog
0
# grep -i dovecot /var/log/maillog
# grep -i dovecot /var/log/maillog.1
# grep -i pop3 /var/log/maillog
# grep -i pop3 /var/log/maillog.1
# ps -aux | grep dovecot | grep -v grep | wc -l
63
# ps -aux | grep pop3-login | grep -v grep | wc -l
59
# grep -c timeout /var/log/maillog
0
# doveadm who
username # proto (pids) (ips)                         
#

The doveadm who command didn't show any current users checking email.

I checked on whether the problem was also affecting users' ability to check email via the Internet Message Access Protocol (IMAP) - see Entering IMAP commands using Telnet - and found that I could access the mailbox of the user having a problem accessing email by POP3 with IMAP.

After checking on whether connectivity via IMAP was working, I checked the number of pop3-login entries in today's mail log file again. I saw the number had jumped from 59 to 73; I suspect now that those entries accumulate as user's attempt to download email via POP3, but are unsuccessful.

# ps -aux | grep pop3-login | grep -c -v grep
73
#

As I've done previously, I restarted the dovecot service at this point, so that users who use POP3 for their email will be able to download their email.

# service dovecot restart
Redirecting to /bin/systemctl restart  dovecot.service
#

As before, once I restarted Dovecot, I could enter both the user's account id and password and enter other POP3 commands.

$ telnet 127.0.0.1 110
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
+OK Dovecot ready.
user nell
+OK
pass ASecretPassword
+OK Logged in.
stat
+OK 234 19888118
quit
+OK Logging out.
Connection closed by foreign host.
$

References:

  1. Dovecot not responding
    Created: February 21, 2017
    MoonPoint Support
  2. Dovecot - client connections are being dropped
    Created: July 4, 2016
    MoonPoint Support