Thursday, January 10, 2008

Change smtp port on plesk server to 26

Follow below steps to change smtp port on plesk server to 26.

>> cd /etc/xinetd.d
>> ls -l | grep smtp*
>> cat smtp_psa

service smtp
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /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
}

>> pico /etc/services

Add this line
smtp_psa_new 26/tcp mail
smtp_psa_new 26/udp mail

>> cp smtp_psa smtp_psa_new

Change the service line in the new file ’smtp_psa_new” to be this:

service smtp_psa_new
{
socket_type = stream
protocol = tcp
wait = no
disable = no
user = root
instances = UNLIMITED
server = /var/qmail/bin/tcp-env
server_args = /usr/sbin/rblsmtpd -r bl.spamcop.net /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
}

>> /etc/init.d/xinetd restart

And you should see smtp listening on ports 25, and 26:

>> netstat -anp | grep xinetd

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 6989/xinetd
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 6989/xinetd


Regards

Ninad


2 comments:

Unknown said...

Hello, thx for your help but I follow all the steps and it doesn't work; when I check the listening ports it shows the same listening ports before I did the changes.

tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 11738/xinetd

Any suggestion ??

Ninad said...

You must be doing some mistake. Make sure you have added ports in /etc/services

Works fine for me.



View My Stats