cannot send emails to other Web servers

Posted by developer on Server Fault See other posts from Server Fault or by developer
Published on 2014-08-24T03:58:51Z Indexed on 2014/08/24 4:22 UTC
Read the original article Hit count: 490

Filed under:
|
|
|

I'm trying to limit my server's open ports in CSF. The IPv4 port settings include:

# Allow incoming TCP ports
TCP_IN = "22,25,53,80,110,143,443,587,3654,53343”

# Allow outgoing TCP ports
TCP_OUT = "22,53,80,113,443,465,995,3654"

# Allow incoming UDP ports
UDP_IN = "53"

# Allow outgoing UDP ports
# To allow outgoing traceroute add 33434:33523 to this list
UDP_OUT = "53,113,123"

As you see, I have port 25 open in TCP_IN but have removed it from TCP_OUT. The reason is I wanted to have my mails transmitted over smtps, so I have port 465 opened instead in TCP_OUT. Since I am using Rouncube in Directpanel, I have also set the following in Rouncube's config.inc.php:

$config['default_host'] = 'ssl://mail.mydomain.com';
$config['smtp_server'] = 'ssl://mail.mydomain.com';
$config['smtp_port'] = 465;

However, when I remove port 25 from TCP_OUT, I no longer can send mails, say, to gmail, though I can send mails to own. But I can receive all mails.

Please let me know if I need to make any further changes. Do I need to disable port 25 at all, to have my mails sent via ssl.

Thanks

© Server Fault or respective owner

Related posts about port

Related posts about tcp