smtp through port 465 timing out

accafella

Member
Jan 1, 2018
19
4
3
cambridge uk
cPanel Access Level
Root Administrator
Hello.
I recently transferred cPanel accounts to a new server and now I am getting reports from email account holders that their local mail clients are timing out for outgoing mail.
Their clients had previously been configured to use port 465 tls/ssl.

I have ensured that port 465 is open on the firewall.
I have tried closing port 25 to force traffic through port 465.
I have tried removing port 25 from the daemon_smtp_port in the Exim configuration advanced editor as well as changing the order of the ports thinking (hoping) this might prioritise port 465.

Netcat also reports a Connection timed out.

Am I missing something ?
Help would be enormously appreciated.

Thanks,
Steve
 
Last edited by a moderator:

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
If the User Email Accounts are timing out, It is due to only 3 reasons as I know:
1. The Ports are not publicly visible or the Service is going down. Try lsof -i:465 on Terminal and check if exim/smtp has occupied the port. If not, The service is probably down.
2. Check for Default Settings in Exim Configuration. It is most likely that any wrong Data has caused a Failure.
3.From WHM, check Home »Server Configuration »Tweak Settings
- Restrict outgoing SMTP to root, exim, and mailman (FKA SMTP Tweak) [?]
(Enabling this feature will redirect outgoing SMTP connections to the local mail server. root, exim, and mailman are still allowed to make direct connections.)

Also, Try Checking through Online utilities if your port is open and can be Visited by Another site. Also note that port 465 is SSL only. Port 25 is plain or may use STARTTLS. I would suggest you to disabled firewalld/csf/lfd whatever Firewall is there and then try for Port 465 Again to see if its a Firewall problem.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
4,871
601
273
cPanel Access Level
Root Administrator
I like the things that @ankeshanand mentioned, although these wouldn't confirm if the port is accessible outside the system. To check that, you'd want to perform the following test from a workstation and not the server:

Code:
telnet x.x.x.x 465
where "x.x.x.x" is the server's IP address. Can you try that and see if you are able to connect?
 

accafella

Member
Jan 1, 2018
19
4
3
cambridge uk
cPanel Access Level
Root Administrator
hi @ankeshanand and thanks.
I like the things that @ankeshanand mentioned, although these wouldn't confirm if the port is accessible outside the system. To check that, you'd want to perform the following test from a workstation and not the server:

Code:
telnet x.x.x.x 465
where "x.x.x.x" is the server's IP address. Can you try that and see if you are able to connect?
Yes I had, or have since, tried all those things and thanks all for your help and suggestions.

I turns out that we had inadvertently ordered the default fire-walling for our new VPS so in addition to the ConfigServer I installed there were some fire-walling conflicts resulting in port 465 remaining closed even as CSF reported it as open.

Facepalm.

So I disabled the default firewall and all it all works fine now.

Thanks again all for your assistance.
 
  • Like
Reactions: ankeshanand

ankeshanand

Well-Known Member
Mar 29, 2021
66
15
8
India
cPanel Access Level
Root Administrator
hi @ankeshanand and thanks.


Yes I had, or have since, tried all those things and thanks all for your help and suggestions.

I turns out that we had inadvertently ordered the default fire-walling for our new VPS so in addition to the ConfigServer I installed there were some fire-walling conflicts resulting in port 465 remaining closed even as CSF reported it as open.

Facepalm.

So I disabled the default firewall and all it all works fine now.

Thanks again all for your assistance.
I'm Glad I could Help!
 
  • Like
Reactions: accafella