How do I configure my mail service to run on a different port and avoid a conflict with another active port?
I'm looking to run my mail service on a different port than the default setting. However, I'm not sure which new port number to use. How can I avoid a conflict with another active port?
1 Reply
You can start by viewing which ports are currently open and listening on your server. Some commands that you can use to verify this are listed below:
netstat -plantu
ss -plant
nmap -Pn localhost
Once this is verified, you can change the configuration file of your mail service to use a port number that's not listed in the results. For example, I use port number 32 for my mail service. Once you make the changes, please ensure that you restart your mail service.
You can also view the "/etc/services" file to see a listing of the default ports that most services listen on.
less /etc/services | more