Skip to main content

Best way to block outgoing port 25

Comments

6 comments

  • cPRex Jurassic Moderator
    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
  • osnanderson
    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
  • cPRex Jurassic Moderator
    Did you try that CSF settings I mentioned?
    0
  • osnanderson
    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
  • cPRex Jurassic Moderator
    Yes, that should be all that is needed.
    0
  • quietFinn
    I believe you also need SMTP_BLOCK = ON in CSF.
    0

Please sign in to leave a comment.