IMAP connection error

Issues related to configuring your network
Post Reply
wp.rauchholz
Posts: 133
Joined: 2016/11/20 11:58:45

IMAP connection error

Post by wp.rauchholz » 2018/03/16 09:50:59

I assume it has to do with my firewall, but I can't figure it out what I am doing wrong.
As my server is modem/router it has two NICs; internal and external (ppp0). The mail server is up and running and I can send/receive emails using thunderbird, using IMAP port 993.

The port on the external interface ppp0 is open. That is what iptables -S shows.
-A INPUT -i ppp0 -p tcp -m state --state NEW -m tcp --dport 993 -j ACCEPT
My LAMP and media server are up and running without and accessible on www w/o problem.

netstat -tulpn | grep 993, shows
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 2938/dovecot

netstat -tulpn | grep dovecot, shows
tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN 2938/dovecot
tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN 2938/dovecot
tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN 2938/dovecot
tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN 2938/dovecot

Packets through the firewall are also allowed in case of existing connection
-A INPUT -i ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i ppp0 -m state --state RELATED,ESTABLISHED -j ACCEPT


IMAP Error: Login failed for wp.rauchholz@<mydomain> from 165.225.76.124(X-Forwarded-For: 83.58.81.163). Could not connect to <mydomain>:993: Connection timed out in /var/www/<mydomain>/html/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 196 (POST /webmail/?_task=login&_action=login)


Thanks for your help.

wp.rauchholz
Posts: 133
Joined: 2016/11/20 11:58:45

Re: IMAP connection error

Post by wp.rauchholz » 2018/03/16 16:39:13

I made another test and sent/received emails from outside my private network.
It work withou any problem.

But roundcube does not want to work....
IMAP Error: Login failed for wp.rauchholz@<mydomain> from 165.225.76.124(X-Forwarded-For: 83.58.81.163). Could not connect to <mydomain>:993: Connection timed out in /var/www/<mydomain>/html/roundcubemail/program/lib/Roundcube/rcube_imap.php on line 196 (POST /webmail/?_task=login&_action=login)


SMTP Connection Failed: Failed to connect socket: Connection timed out

telnet with localhost and <mysomain> works fine too

Wolfgang

User avatar
TrevorH
Site Admin
Posts: 33215
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: IMAP connection error

Post by TrevorH » 2018/03/16 17:53:27

Is selinux enabled and if it is, what booleans have you amended?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

wp.rauchholz
Posts: 133
Joined: 2016/11/20 11:58:45

Re: IMAP connection error

Post by wp.rauchholz » 2018/03/16 21:57:12

Selinux is disabled.
I am doubting now that it is a firewall problem as I am able to access on port 993 with my iPhone and laptop from outside the local network.
No glue what is wrong. Google does not help either.
:(

wp.rauchholz
Posts: 133
Joined: 2016/11/20 11:58:45

Re: IMAP connection error

Post by wp.rauchholz » 2018/03/21 20:21:35

Just as an fyi, I migrated back form iptables to firewalld and it works fine now.

Not sure why though.

Post Reply