1

Topic: How to stop listening Port 587, 143, 993, 995

==== Required information ====
- iRedMail version (check /etc/iredmail-release): v0.92
- Linux/BSD distribution name and version: CentOS 7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):  MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? no
- Related log if you're reporting an issue:
====

I have already modified below configue files and reboot the system, but the processes are still running by checking with command " netstat -ntpul". How can I stop listening Port 587, 143, 993, 995, thanks  alot.

Modify "/etc/dovecot/dovecot.conf" as below:
    ssl=yes
    disable_plaintext_auth=no
Modify "/etc/postfix/main.cf" as below:
    #smtpd_tls_auth_only=yes

[root@webmail ~]#  netstat -ntpul
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:22                  0.0.0.0:*               LISTEN      2752/sshd
tcp        0      0 127.0.0.1:10025         0.0.0.0:*               LISTEN      2047/master
tcp        0      0 0.0.0.0:3306            0.0.0.0:*               LISTEN      1940/mysqld
tcp        0      0 0.0.0.0:587             0.0.0.0:*               LISTEN      2047/master
tcp        0      0 0.0.0.0:110             0.0.0.0:*               LISTEN      1311/dovecot
tcp        0      0 127.0.0.1:10031         0.0.0.0:*               LISTEN      2736/perl
tcp        0      0 0.0.0.0:143             0.0.0.0:*               LISTEN      1311/dovecot
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      1571/nginx: master
tcp        0      0 127.0.0.1:24            0.0.0.0:*               LISTEN      1311/dovecot
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      2047/master
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1571/nginx: master
tcp        0      0 127.0.0.1:4190          0.0.0.0:*               LISTEN      1311/dovecot
tcp        0      0 127.0.0.1:7777          0.0.0.0:*               LISTEN      2955/python
tcp        0      0 0.0.0.0:993             0.0.0.0:*               LISTEN      1311/dovecot
tcp        0      0 0.0.0.0:995             0.0.0.0:*               LISTEN      1311/dovecot
tcp6       0      0 :::110                  :::*                    LISTEN      1311/dovecot
tcp6       0      0 :::143                  :::*                    LISTEN      1311/dovecot
tcp6       0      0 :::993                  :::*                    LISTEN      1311/dovecot
tcp6       0      0 :::995                  :::*                    LISTEN      1311/dovecot

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: How to stop listening Port 587, 143, 993, 995

With default iRedMail configuration, all clients are forced to connect to POP3/IMAP/SMTP/Webmail via secure connections. So the biggest question is: why? why disable all secure connections?

3

Re: How to stop listening Port 587, 143, 993, 995

Thanks for your reply.
Yes, I also know using secure connection is better, but all our existing clients are using POP3/SMTP only, just want to setup a new email server without changing anything on client side.

4

Re: How to stop listening Port 587, 143, 993, 995

OK, that makes sense. But you'd better ask your clients to use secure connection as soon as possible, and don't you think it's a perfect time to ask them to switch while we're setting up a new server?

Note: with below steps you already did, secure connections are optional, they're still running, but your server doesn't force clients to use them, so it's better then completely disable them.

*) To disable POP3/IMAP, set 'ssl = yes' in /etc/dovecot/dovecot.conf.
*) To disable TLS enforcement, comment out 'smtpd_tls_auth_only=yes' in /etc/postfix/main.cf.

This is recommended.