Webhosting Blog

Creating additional SMTP port in Plesk

Normally SMTP port in plesk uses port 25 for mail access.

If required you can switch the SMTP port to an alternative port . For this you can use the following steps.

1) Login to the server as root.

2) Open the file /etc/services to find out an unused port.

Considering port 126 is unused & smtp2 is the service,  you can make following changes in the file.

smtp2 126/udp mail

smtp2 126/tcp mail

Save the file.

3) Now copy the file /etc/xinetd.d/smtp_psa to /etc/xinetd.d/smtp2_psa.

4) Open the new file and do the following changes in the file.

Replace the first line “service smtp” with “service smtp2“. The file will look as follows:

service smtp2
socket_type   = stream
protocol        = tcp
wait                 = no
disable           = no
user                 = root
instances       = UNLIMITED
env                   =  SMTPAUTH=1  POPLOCK_TIME=20
server             = /var/qmail/bin/tcp-env
server_args  = -Rt0 /var/qmail/bin/relaylock /var/qmail/bin/qmail-smtpd /var/qmail/bin/smtp_auth /var/qmail/bin/true /var/qmail/bin/cmd5checkpw /var/qmail/bin/true

5) Now restart xinetd service.

[root@server~]#/etc/init.d/xinetd restart

6) In order to check if the new port is listening you can issue the following command.

[root@server~]# netstat -tlpn|grep :126

tcp 0 0* LISTEN 1245/xinetd

7) Also you can check functionality of port 126 by issuing following command.

# telnet XX.X.XX.XX 126


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s