This is how I do it.
(Note the comments are not continus, look in main.cf for the full spiel)
note the xxx.xxx is to hide the ip. You can specify anything from individual ip's though subnets, networks. Its very useful, I can now relay from all the machines I use (or squirrelmail if I'm at a strange box)
Code: Select all
anferny distfiles # grep networks /etc/postfix/main.cf
# The mynetworks parameter specifies the list of "trusted" SMTP
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# mynetworks list by hand, as described below.
# Specify "mynetworks_style = host" when Postfix should "trust"
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host
# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
mynetworks = 160.220.48.0, xxx.xxx.195.186, 127.0.0.1
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
# - from "trusted" clients (IP address matches $mynetworks) to any destination,