Mail Relaying
By default, Postfix will not relay mail that did not originate from the local domain. This means that if a Postfix installation running at gracehopper.net receives mail intended for seymourcray.net, and that mail did not originate from gracehopper.net, the mail will be rejected and will not be relayed. If you want to allow selected domains to relay through you, add an entry for the domain to the main.cf file like this:
mynetworks = 192.168.2.0/24, 10.0.0.2/24, 127.0.0.0/8
The IP address needs to be specified in classless inter-domain routing (CIDR) format. For a handy calculator, head on over to www.subnet-calculator.com/cidr.php. You must restart Postfix for this change to take effect.
Caution
You need a good reason to relay mail; ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access