Postfix and Dovecot opened ports

dovecotpostfix

Doing a nmap on my server, I get this:

25/tcp  open  smtp
80/tcp  open  http
110/tcp open  pop3
143/tcp open  imap
465/tcp open  smtps
587/tcp open  submission
993/tcp open  imaps
995/tcp open  pop3s
  1. I would like to use only secure connections, thus only smtps, imaps and pop3s. Could I disable the unsecured protocols, and expect things to work? What if I'm trying to send an e-mail to a server which doesen't have pop3s?
  2. Why is submission there? It belongs to Postfix, but what it's his purpose? Isn't Postfix using only smtp/s?
  3. I'm using Roundcube to read my e-mail, which is hosted on the same server with Postfix and Dovecot. I'm not using any other e-mail clients. How can I disable imap and imaps from the public? I want only Roundcube to use it.

Best Answer

  1. You could choose which protocol should be enable in the dovecot configuration. The SMTP is completely different from the IMAP/POP server, so there is no interaction between them. Use what you want. You can disable unsecured protocol if you don't use them (it is recommanded)
  2. Submission is an other protocol doing the same thing as SMTPS, but on port 587. Some networks allow SMTPS, some others submission. You can configure your weight clients to use one or other.
  3. If you just want Roundcube, you need to keep imap(s) activated ! But you can firewall the ports only to localhost