• 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

Issue Can't connect to SMTP despite correct firewall rules

Constantin Kraft

New Pleskian
Hello fellow community!

I run SuiteCRM which needs to connect via SMTP to a mail server which I resides on the same host.

Despite having opened ports 587 and 465 for ingoing and outgoing traffic I can't `telnet example.com {587,465}` … it produces `Connection refused` (executed in shell on the same host).

However from outside I can connect to the mail server via Thunderbird.
Also netstat confirms the ports are opened for incoming traffic.

Can someone help/give a hint?
It would be much appreciated.

Thanks in advance & best regards,
Constantin
 
Maybe the problem with incorrect hostname resolving on your server? Checking iptables rules also would be useful.
 
It was a firewall issue, which could be solved by disabling the catch-all rule which prevents outgoing traffic.

When activated it somehow overrides the rule that explicitly allows outgoing traffic on ports 465 and 587.
The corresponding lines in the screenshot are the third and fifth (catch-all rule now configured to allow) from below.

Any hints on what's wrong?
 

Attachments

  • Screenshot-2018-1-26 COINS Plesk.png
    Screenshot-2018-1-26 COINS Plesk.png
    137.9 KB · Views: 11
Last edited:
It was a firewall issue, which could be solved by disabling the catch-all rule which prevents outgoing traffic.

When activated it somehow overrides the rule that explicitly allows outgoing traffic on ports 465 and 587.
The corresponding lines in the screenshot are the third and fifth (catch-all rule now configured to allow) from below.

Any hints on what's wrong?
AFAIK there is, by default, no outgoing block....

On the other hand... I manually manage my firewall.

Even if you have some tool or gui to manage your firewall one should really try to understand how iptables works.
If you knew you would have had no need to ask this question.
 
Back
Top