How do I configure my mail service to run on a different port and avoid a conflict with another active port?

Linode Staff

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

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct