You are currently viewing Configure Postfix to run on multiple SMTP ports

Configure Postfix to run on multiple SMTP ports

It is possible to run Postfix on multiple SMTP ports. This comes in very handy for example, when your ISP blocks port 25, then you can simply configure an alternate port to accept emails.

For example, add an alternate SMTP port 25252 in addition to default SMTP port 25.

Step 1: Connect to your Linux server via SSH

Step 2: Create a back of your master.cf config file

cp /etc/postfix/master.cf /etc/postfix/master.cf.backup

Step 3: Edit the master.cf file using your preferred file editor.

vi /etc/postfix/master.cf

Step 4: Add a line with a new SMTP port. I’m using port 25252

Step 5: Save and close the file

Step 6: Restart the Postfix service by running the command below.

service postfix restart

Step 7: To check if the Postfix service is now listening on port 25252, issue the command below:

netstat -plutn | grep 25252