Following are port numbers for different services:
- SMTP – 25 (465 with SSL, 587 with TLS)
- POP3 – 110 (995 for SSL)
- IMAP – 143 (993 for SSL)
- ManageSieve – 4190 (Gmail-like mail filtering)
- Amavis – 10025 (spam/antivirus checks)
You can find/verify ports used by postfix and dovecot using following commands:
netstat -tulpn | egrep 'master|dovecot'
Above command assumes you are using postfix (master) and dovecot. You can replace them with your packages or even port number like:
netstat -tulpn | egrep '25|465|587|110|143'
Please note that if you are using non standard ports, you may miss open-ports when running a command-like above.