i have a scenario in which certain email is sent using envelope senders that contain host names that are known only on the local lan/network, and unknown on the internet. most mail expressing that characteristic stays local, but occasionally, some is legitimately destined for the public internet. to that end, with such mail, i'd like to change the sender domain part to @example.com, but only if the recipient domain part does not end in example.com [both the sender and recipient domain part may be @example.com, @foo.example.com, @bar.foo.example.com, etc].

what is the right method for doing this? given ADDRESS_REWRITING_README, it seem to possibly be a fit for either masquerade_domains or smtp_generic_maps, but i'm not certain, and i'm not sure how to apply selectively.

-ben

Reply via email to