Hello, you may set "mynetworks_style = host" see http://www.postfix.org/postconf.5.html#mynetworks_style
Andreas Am 18.10.2016 um 21:51 schrieb Sebastian Nielsen: > Set mynetworks to only contain the IPs or networks of the production server. > You can use /32 to list single IPs. > Like: > mynetworks = 123.123.123.123/32, 222.222.222.222/32 > > etc > > Thus, the server will automatically only permit mail to mydestination (eg, > the domain that the server is authorative for) since the dev and test server > will then look like "external" users. > > Note that you will have to remove "permit_authenticated" from your relay > restrictions. > > -----Ursprungligt meddelande----- > Från: [email protected] > [mailto:[email protected]] För Mark Holmes > Skickat: den 18 oktober 2016 21:46 > Till: '[email protected]' <[email protected]> > Ämne: Restriction question > > Hi list, > > I'd like to configure Postfix such that I can prevent certain IP's/networks > from sending email to 'external' recipients. I'm basically trying to set it > so that our dev and test web application servers can't email any domains > other than our own - so developers can test email functionality without the > risk of sending email out to 'real' addresses by mistake. > > So I need something that says 'if the server is from this IP/network then > only allow mail to mydomain.net'. Or more likely, something which says > 'these internal networks can only send to internal recipients, with the > exception of these IP's which can also send to external recipients' > > I've done some Googling but can't quite figure the best way to achieve this. > Grateful for any pointers! > > Many thanks, > > Mark > > > This e-mail message is being sent solely for use by the intended > recipient(s) and may contain confidential information. Any unauthorized > review, use, disclosure or distribution is prohibited. If you are not the > intended recipient, please contact the sender by phone or reply by e-mail, > delete the original message and destroy all copies. Thank you. >
