There are a few situations in which you might need to change the default port for a known service such as SMTP. For example, you might run antivirus software that requires a server to listen for SMTP traffic on a port other than 25.
If you need to change your SMTP port or another service port, follow these steps:
smtp 25/tcp mail
smtp 2500/tcp mail
The system will now use the port you specified in the Services file for SMTP. While our example changes SMTP to port 2500, the port you use depends on the requirements of your software vendor, which should provide you with the required port number for its application.