Unable to connect to mail server via IMAP and roundcube

Posted by mrhatter on Ask Ubuntu See other posts from Ask Ubuntu or by mrhatter
Published on 2014-05-30T22:41:15Z Indexed on 2014/06/02 21:46 UTC
Read the original article Hit count: 292

Filed under:
|
|
|
|

I am having trouble getting the final parts of my mail server up and working. I followed this tutorial to get everything set up on the mail server side. I have installed roundcube for webmail and configured it but it is saying "error connecting, connection refused" when attempting to connect to it using IMAP. This is thorough the "test imap" section of its installer. Also it is giving me an error message about perissions for it's log and temp folders but that's not as important as acutally getting mail to work.

I have also tried connecting to the mail server using thunderbird however it cannot establish a connection either and I know my login information is correct.

I know that the databases are working correctly based on the roundcube installer telling me that they have been "successfully initialized". Here are my firewall rules

-A INPUT -i lo -j ACCEPT
-A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 25 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 443 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 465 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 487 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 993 -j ACCEPT
-A INPUT -j DROP

Which I set up in iptables. I have modified them from what I used in this tutorial

I'm not sure what to try next. Any help would be wonderful!

I am using Ubuntu 14.04 server, apache 2.4.7, roundcube 1.0.1, and the latest versions of dovecot and postfix. The email databases are contained in mysql. I am running this on a VPS server.

UPDATE: I have changed from iptables to using ufw. I have run the following commands to set up a basic firewall with ufw.

ufw default deny
ufw allow ssh
ufw allow http
ufw allow https
ufw allow imap
ufw allow imaps
ufw allow smtp

I then used telnet to check all of the mail ports. But Port 993 isnt working even though ufw says both 993 and 993/tcp are open. What am I missing?

© Ask Ubuntu or respective owner

Related posts about server

Related posts about mysql