Skip to main content

Close port 25 to clients but open for mail servers?

Comments

5 comments

  • GOT
    Doing what you are suggesting is not possible afaik. Ports are either open or closed in the firewall, it cant make a distinction between a server connection and a client connection.
    0
  • keat63
    Yes, I suspect this is the case.
    0
  • sparek-3
    Do mail servers do some form of handshake to say "hey, I'm a server"

    No, they do not. Your only solution is to require SMTP authentication for relaying mail (sending mail from the server to domains that don't exist on your server ... i.e. exist in /etc/localdomains). That's how the distinction is made. If a connection comes into your mail server and it's recipient domain is not a local domain... then that connection is relaying out mail. You will want to restrict who can relay out mail to properly authenticated accounts. If a connection comes into your mail server ans it's recipient domain is a local domain... then the message is delivered appropriately to the account as stated... assuming it exists.
    0
  • cPanelMichael
    Hello @keat63, I concur with the other posts here. Let us know if you have any additional questions. Thank you.
    0
  • keat63
    Hi Sparek I don't quite follow. However, I'm confident that I'm pretty much locked down, so I'll settle with what I have I guess.
    0

Please sign in to leave a comment.