changing smtp port

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
altanalansu
New user
New user
Posts: 6
Joined: 2010-09-18 21:51

changing smtp port

Post by altanalansu » 2010-09-19 13:44

Hello,
I'm living in Turkey. In my country port 25 is blocked by ISP (TTNET) due to security reasons. Every client must use port 587 for smtp in order to get mail from the server.
So I'm trying to change hmailserver's default smtp port from 25 to 587 in order to clients to send mail. I'm opening hmailserver administrator tool and then settings-> advanced->TCP/IP ports and change the default smtp port from 25 to 587. After that I try to make a diagnostic. The diagnostics give me an error like this:(not all green) how can I get all green from the diagnostics? I don't want to use port 25 for smtp.please help me.

Test: Collect server details
hMailServer version: hMailServer 5.3.3-B1879
Database type: MSSQL Compact

Test: Test IPv6
IPv6 support is available in operating system.

Test: Test outbound port
SMTP relayer not in use. Attempting mail.hmailserver.com:25
Trying to connect to host mail.hmailserver.com...
Trying to connect to TCP/IP address 83.169.11.240 on port 25.
Connected successfully.

Test: Test MX records
Trying to resolve MX records for alsgrup.com...
Host name found: mail.alsgrup.com

Test: Test local connect
Connecting to TCP/IP address in MX records for local domain domain alsgrup.com...
Trying to connect to host mail.alsgrup.com...
Trying to connect to TCP/IP address 77.92.140.52 on port 25.
ERROR: It was not possible to connect.
ERROR: Was not able to open connection.

hutchingsp
New user
New user
Posts: 12
Joined: 2010-09-12 17:45

Re: changing smtp port

Post by hutchingsp » 2010-09-19 13:50

I'm guessing the hmail diagnostics assume your hmail server is alway listening on port 25?

Can you telnet to it on port 587?

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: changing smtp port

Post by dzekas » 2010-09-19 14:45

altanalansu wrote:Hello,
I'm living in Turkey. In my country port 25 is blocked by ISP (TTNET) due to security reasons. Every client must use port 587 for smtp in order to get mail from the server.
So I'm trying to change hmailserver's default smtp port from 25 to 587 in order to clients to send mail. I'm opening hmailserver administrator tool and then settings-> advanced->TCP/IP ports and change the default smtp port from 25 to 587. After that I try to make a diagnostic. The diagnostics give me an error like this:(not all green) how can I get all green from the diagnostics? I don't want to use port 25 for smtp.please help me.
Don't change SMTP port. Add new SMTP service/port.

SMTP standards won't listen to your wishes. You need SMTP service on 25 port in order to get emails from other people. You can create some setup that allows you to run own email server on different port, but you still need some server with open 25 port and diagnostics will fail in such setup.

hMailServer diagnostics do only basic tests and it is up to you do understand when warnings don't apply to your setup.

altanalansu
New user
New user
Posts: 6
Joined: 2010-09-18 21:51

Re: changing smtp port

Post by altanalansu » 2010-09-19 15:26

thank you.. I added a new TCP/IP port for SMTP.
Now I have two ports for SMTP 25 and 587.. I can communicate to other servers using port 25 and clients with port 587. clients can receive and send mail. and diagnostics are all green..

jcox312
New user
New user
Posts: 3
Joined: 2019-10-08 00:36

Re: changing smtp port

Post by jcox312 » 2019-10-08 12:41

I can receive message from the internet on port 25 but i can't send out message on that port because it shows connection timeout, my isp don't allow outbound messages on port 25. How do I make port 587 my default port for outbound messages. Even when I tried to add port 587 to tcp/ip port my server still try to connect to other server through port 25 but when they try to send message to my server on port 25 my server accepts the connection and drop the message on my mail server. I have literally done every single thing I know how to do but my server end up communication with other server on port 25 when i try to send out message but when I tried to relay my messages on port 587 it went through.


This was when I tried to use a Relay on my server through port 587.

"TCPIP" 2144 "2019-10-08 09:58:43.292" "Connecting to XXX.XXX.XXX.XXX:587..."
"SMTPC" 2712 2312 "2019-10-08 09:58:43.636" "168.235.105.136" "RECEIVED: 220 relay.example.com ESMTP"
"SMTPC" 2712 2312 "2019-10-08 09:58:43.636" "168.235.105.136" "SENT: EHLO mymailserver.domain.net"
"SMTPC" 3720 2312 "2019-10-08 09:58:43.792" "168.235.105.136" "RECEIVED: 250-relay.example.com[nl]250-SIZE[nl]250-STARTTLS[nl]250-AUTH LOGIN PLAIN[nl]250 HELP"
"SMTPC" 3720 2312 "2019-10-08 09:58:43.792" "168.235.105.136" "SENT: STARTTLS"
"SMTPC" 3112 2312 "2019-10-08 09:58:43.949" "168.235.105.136" "RECEIVED: 220 Ready to start TLS"
"TCPIP" 820 "2019-10-08 09:58:44.308" "TCPConnection - TLS/SSL handshake completed. Session Id: 2312, Remote IP: XXX.XXX.XXX.XXX, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"SMTPC" 820 2312 "2019-10-08 09:58:44.308" "168.235.105.136" "SENT: EHLO mymailserver.domain.net"
"SMTPC" 3720 2312 "2019-10-08 09:58:44.480" "168.235.105.136" "RECEIVED: 250-relay.example.com[nl]250-SIZE[nl]250-AUTH LOGIN PLAIN[nl]250 HELP"
"SMTPC" 3720 2312 "2019-10-08 09:58:44.480" "168.235.105.136" "SENT: AUTH LOGIN"


This is when I try to send message without the relay.

"TCPIP" 3228 "2019-10-08 00:10:32.211" "DNS MX lookup: example.com"
"TCPIP" 476 "2019-10-08 00:10:32.211" "DNS - MX Result: 5 IP addresses were found."
"TCPIP" 476 "2019-10-08 00:10:32.211" "Connecting to XX.XXX.X.XX:25..."
"TCPIP" 2928 "2019-10-08 00:07:46.306" "Connecting to XXX.XX.XX.XXX:25..."
"TCPIP" 3228 "2019-10-08 00:07:46.306" "Connecting to XX.X.XX.X:25..."
"TCPIP" 2928 "2019-10-08 00:08:07.321" "Connecting to XXX.XXX.XXX.XX:25..."
"TCPIP" 3228 "2019-10-08 00:08:07.321" "Connecting to XX.XX.XXX.XXX:25..."


I need it to connect to port 587 just the way it connected when i used a relay with port 587 instead of port 25. Is it possible if it is please let me know what I am missing.

palinka
Senior user
Senior user
Posts: 1190
Joined: 2017-09-12 17:57

Re: changing smtp port

Post by palinka » 2019-10-08 13:38

Server to server connections are always and only on port 25. They're is nothing you can do to change that and even if you could, no other server would accept unauthenticated connections on any port other than 25.

You must use a relay.

Post Reply