> In an attempt to work around existing infrastructure, I am trying to > restrict, by sender domain, what mail is accepted from certain IPs. > My thought at the moment is the lookup would look something like: > > ip.add.re.ssdomain1.com <http://domain1.com>, domain2.com > <http://domain2.com> > > And if a connection is started from ip.add.re.ss with a sender of > u...@domain3.com <mailto:u...@domain3.com> the message gets rejected. > Is there a way to do this in postfix? I checked out Policydv2 as I > thought this might fall under its purview, but after reading its > configuration and documentation, I don't think it supports this out of > the box. Thanks.
postfwd (http://postfwd.org) will do that with the following ruleset: id=SENDER01 sender_domain==dom1.com client_adress!=192.168.1.0/24, 1.1.1.1 action=REJECT not from this relay id=SENDER02 sender_domain==dom2.com client_adress!=172.16.16.0/22 action=REJECT not from this relay Best regards Jan