SMTP: How to run SMTP on a different or additional port in Linux with Plesk
Search:

Home | Computers | Web




SMTP: How to run SMTP on a different or additional port in Linux with Plesk
By: Travis

For one reason or another some people like to run their SMTP service on a port other than the standard TCP port 25. Whether it's to bypass their ISP's firewall, provide a second instance of SMTP, or maybe just to be different.

This article will show you a simple way to do this on a Linux server running the Plesk control panel.

In '/etc/xinetd.d/' there is a file called smtp_psa, you will need to copy this file to another filename (in this example I'll use smtp2_psa).

In this new file, you will want to change the line:
'service smtp' to 'service smtp2'

Once this is complete, you will need to modify your /etc/services file, and add the smtp2 service:
Simply copy/paste the existing smtp line and change the name and port (we'll use port 26 in this example).

smtp2 26/tcp mail
smtp2 26/udp mail

Restart xinetd.
/etc/init.d/xinetd restart

Check to make sure the new port is now listening
# netstat -plunt |grep :26

That should return something similar to
tcp 0 0 0.0.0.0:26 0.0.0.0:* LISTEN 2345/xinetd

You can test this connection from the outside by trying to telnet to port 26 on the server.
From a linux shell or Windows command prompt enter

telnet 123.123.123.123 26

(be sure to replace 123.123.123.123 with your server's real IP address)
If it's successful it should return something similar to
Trying 123.123.123.123...
Connected to hostname.domain (123.123.123.123).
Escape character is '^]'.
220 hostname.domain.tld ESMTP

Enter 'quit' to quit the telnet session.

You will also need to modify the port in your mail client to use the new SMTP port.

 

Article Source: http://www.articles4free.com

Travis is a freelance server administrator and computer consultant at Serverjuice
For more howtos and guides visit Howto Monster

Please Rate this Article

 

Not yet Rated


Click the XML Icon Above to Receive Web Articles Via RSS!
Articles4Free.Com - World Information Service by Ibrahim Machiwala (Lodhi)

Powered by Article Dashboard