Network and Trust Boundary

inet_interfaces = all
        
        mynetworks = 127.0.0.0/8 [::1]/128 10.0.1.0/24
        mynetworks_style = host

This configuration:

  • Allows Postfix to listen on all interfaces

  • Restricts relay usage to trusted IP ranges. Only clients within the following IP ranges are allowed to relay mail:

    • localhost

    • Internal subnet 10.0.1.0/24

This prevents the system from becoming an open relay.

It is recommended to leave mynetworks_style = host and manually define allowed trusted networks using the mynetworks parameter.

Ensure that you replace, add, or remove networks or interfaces according to the IP ranges for which you want to allow the relay to be used.