Best way to block outgoing port 25
Hello
Can you tell me the best way to block the outgoing port 25 completely on the server?
I tried removing the outgoing IPV4 port from the CSF firewall configuration, but still emails are being sent from cPanel. I wanted to completely block port 25 so no emails are sent from the server.
Would you know how to help me?
Thank you
-
Hey there! If you don't want any email sent, you could just disable Exim so it isn't running. Inside CSF there is also this option: # This is a comma separated list of the ports to block. You should list all # ports that exim is configured to listen on SMTP_PORTS = "25,465,587"
so you'll want to remove the ports you don't want active in the firewall from that list.0 -
I'll explain my situation better: I want to completely block outgoing emails through port 25, but allow sending emails to some accounts via smarthost on another port. So I believe disabling exim would not work. Do you know how to do this total blocking of outgoing port 25? 0 -
Did you try that CSF settings I mentioned? 0 -
Did you try that CSF settings I mentioned?
I didn't understand well about this SMTP_PORTS option. Would it be enough for me to remove port 25 from SMTP_PORTS and that would prevent emails from going out through that port 25?0 -
Yes, that should be all that is needed. 0 -
I believe you also need SMTP_BLOCK = ON in CSF. 0
Please sign in to leave a comment.
Comments
6 comments