Post

PostFix disable SMTP Connections From Outside

Use this if you don’t want to allow SMTP connection from outside the server.

To enhance the security of your Postfix mail server, you can limit SMTP connections to the local host. Follow these steps:

  • Locate the line that reads:
1
2
smtp inet n - - - - smtpd

  • Modify this line to restrict SMTP connections to the local host by changing it to:
1
2
127.0.0.1:smtp inet n - - - - smtpd

By making this adjustment, your Postfix mail server will only accept SMTP connections from the local machine (127.0.0.1). This simple configuration change will stop spammers from sending spam emails using your server.

This post is licensed under CC BY 4.0 by the author.