[Solved] Can't connect to dovecot/imap

Hello.
I had (last week) problems with my home network configuration from the DSL ISP and the reverse name of my ip was incorrec.
For that reason my virtualmin server blocked me out of IMAP.
Using another internet connection (like my phones shared wifi) i can connect to the server with the same computer

So the virtualmin server somehow blocks my DSL ip while connecting to my servers IMAP (dovecot)

I have tried shutting down firewalld and fail2ban temporarily and still can’t connect
if i shut down the dovecot also, and use
#nc -l -p 993
to listen on the port, i can connect using telnet to the port from my home computer, so everything should work @ my home.

I also have another server that also uses port 993 for imap and i can connect to that server well.

So how can i dig what is blocking my connection?

i can connect using virtualmin (port 10000) and ssh and ftp, all other works well from my DSL IP but IMAP port 993 not…

Operating system:
CentOS Linux

OS version:
release 8.2.2004 (Core)

Do you get the same result if you try connecting to ports 110 and 143?

yes. The same problem with those ports with email client.

Telnet also shows:
telnet: Unable to connect to remote host: Connection refused
But for example i can connect to tcp port 80 (http) and 443 (https) with telnet, so that’s not a telnet problem neither :wink:

To clarify more:
homelinux # telnet virtualminserverip 110 ; telnet virtualminserverip 993
telnet: Unable to connect to remote host: Connection refused
telnet: Unable to connect to remote host: Connection refused

homelinux # telnet anotherserver 990
Connected to anotherserver.

anotherserver # telnet virtualminserverip 993
Connected to virtualminserverip

With no other software running that accesses mail ports (ClamAV or similar), verify that Dovecot is listening.

lsof -i 4 -a -p $(ps -A | grep dovecot | awk '{ print $1 }')

If there’s no (LISTEN) output for POP3 and IMAP check for mistakes with the listen = and/or protocols = lines in /etc/dovecot.conf.

Since ports 110 and 143 are misbehaving the same as 995 and 993 it’s too early to blame it on SSL.

ah, found it!
i had
listen = [::]
ssl_listen = [::]

i think that means IPv6 only.
i changed it to
listen = *, [::]
ssl_listen = *, [::]

Thanks.

I have IPv4 + IPv6 with my phone connection and only IPv4 with the DSL.
Strange that it worked before using the DSL connection also. I wonder how did the IPv4 drop out of the dovecot configuration…

Cool. I’ve had similar problems and saved that lsof|grep|awk command in my notes for the next occasion. I can’t explain it all but it’s been golden for finding Dovecot or Courier servers that go AWOL.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.