• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Please beaware of a breaking change in the REST API on the current Plesk release (18.0.62).
    Starting from Plesk Obsidian 18.0.62, requests to REST API containing the Content-Type header with a media-type directive other than “application/json” will result in the HTTP “415 Unsupported Media Type” client error response code. Read more here

Easiest way to open an alternate SMTP port?

J

JoeyAngrisano

Guest
I've got a client that can't send mail on port 25 since their ISP blocks this port. I've searched around on the forums ere and found several methods of opening up a secondary port however some of those methods seem outdated and none have worked for me so far (unless I'm missing a step).

With that said what's the easiest way to open up port 2525 in addition to port 25 for SMTP?
 
This really is nice and easy to do.

From memory, you just make a copy of smtp_psa that you'll find in /etc/xinet.d and call it something else, like smtp_2525

Now edit this new file. The firt line is the key. That defines the port. "service xxx"

Now the xxx by default is "smtp". But that's a descriptive word for the service not a port number.

The file that maps these service words to port numbers is /etc/services

port 2525 isn't defined in mine (RH9) but may be in yours. If it is then just use the appropriate service name. If it is not, try adding it, like this:

myspecialport 2525/tcp
myspecialport 2525/udp

(two lines, one for udp and one for tcp. Also note that there is a tab between the name and the number, not a set of spaces.

Then use "service myspecialport" as the first line in your smtp_2525 file.

When finished restart xinetd (service xinetd restart) and hopefully bob's your relative.

Remember to open port 2525 in your firewall if need be.

MAKE COPIES OF /etc/services and be prepared to delete your smtp_2525 files in case things go wrong. In fact back everything up. Use my advice at your peril. I'm not always right :)

Faris.
 
That did the trick. I'd previously done this same exact process but neglected to properly rename the first line in my 2525 smtp xinet.d file. Fixing that first line opened the port right up.

Thanks. :D
 
Having trouble getting port 2525 to work

I used the following article to add port 2525 to qmail:
http://wiki.mediatemple.net/w/(dv):Enable_alternate_SMTP_email_port
(also added the port to /etc/services tcp and udp)
It was working fine. I could telnet into qmail on port 2525 and get a response but suddenly it just stopped working.
Now when I try to telnet in on port 2525 it just hangs. I can see that xinetd is listening on 2525 and 25 but no joy connecting on 2525, 25 works though.
netstat output:
tcp 0 0 0.0.0.0:2525 0.0.0.0:* LISTEN 12253/xinetd
tcp 0 0 0.0.0.0:25 0.0.0.0:* LISTEN 12253/xinetd

Any ideas on how to address this or how to troubleshoot?
 
Back
Top