Port problem setting up e-mail server

May 1, 2016 1.5k views
Firewall Email Ubuntu 16.04

Hello,

I've set up my e-mail server using this tutorial: www.digitalocean.com/... (without using SSL)
Everything seems to be working, all the services are started.
I've opened the correct ports using UFW:

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
Apache Full                ALLOW       Anywhere
Dovecot IMAP               ALLOW       Anywhere
Dovecot POP3               ALLOW       Anywhere
Postfix                    ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
Apache Full (v6)           ALLOW       Anywhere (v6)
Dovecot IMAP (v6)          ALLOW       Anywhere (v6)
Dovecot POP3 (v6)          ALLOW       Anywhere (v6)
Postfix (v6)               ALLOW       Anywhere (v6)

When I do a port scan this is the result:

PORT    STATE  SERVICE
22/tcp  open   ssh
25/tcp  open   smtp
80/tcp  open   http
110/tcp closed pop3
143/tcp closed imap
443/tcp closed https

How is it that the IMAP and POP3 ports are closed? I cannot connect to it from any client.

1 Answer

A closed port means that there's nothing listening on it. Check that dovecot is actually running and listening on ports 110 and 143 with "sudo netstat -plunt".

Have another answer? Share your knowledge.