Product:
Search Type:

Can I use additional port other than port 25 for SMTP connections? I was told I should open up one more port for SMTP, because most ISP's block port 25 now.

Article ID: 837 
Last Review: Jul,15 2008
APPLIES TO:
  • Plesk for Linux/Unix

RESOLUTION

Choose any unused port and add it to the /etc/services file, for example:

smtp_alt 25025/tcp # new SMTP port

If you have 'xinetd'  as super-server,  make a copy of /etc/xinetd.d/smtp_psa to /etc/xinetd.d/smtp_psa_alt and correct service line within new file:

service smtp_alt

Restart xinetd `/etc/init.d/xinetd restart` and SMTP connections will be accepted on the both standard and 25025 ports. You may also need to reconfigure Horde IMP (webmail) settings so it use alternative SMTP port too. This can be done in /etc/psa-horde/imp/servers.php file under smtpport parameter for both IMAP and POP3 servers.

In case if 'netd' super-server is used (Debian or FreeBSD), modify inetd.conf to enable additional SMTP port: 

grep '^smtp ' /etc/inetd.conf | sed 's/^smtp/smtp_alt/' >> /etc/inetd.conf

and restart inetd.

NOTE: If you wish to disable default (25) port completely and continue using alternate one only, please do not block 25 port at firewall and do not remove 'smtp_psa' service from xinetd/inetd but set default SMTP service be listened on 127.0.0.1 only by adding 'bind = 127.0.0.1' to /etc/xinetd.d/smtp_psa, otherwise SMTP service status will be displayed incorrectly in Plesk CP. Plesk determines SMTP service status by checking 25th port and the port number is hardcoded there.


Please provide feedback on this article

Did this article help you solve your issue?
Yes
No
Partially
I do not know yet
 
Strongly Agree   Strongly Disagree
  9 8 7 6 5 4 3 2 1
The article is easy to understand
The article is accurate
Additional Comments:
*Please provide us with your email address in case we need to contact you.
*Please type the code you can see.
* - required fields