How do I make Postfix only accept outbound mail from $mynetworks if the from is *@mydomain(s) ?

To be clear (and differentiate from similar questions I found) I want to make postfix such that users in $mynetworks, not subject to usual relay limitations, cannot send mail out using this smtpd for domains it does not control (ie: prevent sending out mail from gmail/hotmail etc using the internal postfix server), but still be able to send

Thanks! -SM

Edit: Let me re-simplify the question. I want to restrict relaying for $mynetworks so that mail is only accepted if it is from $relay_domains - an inverse of sorts of the default relay restriction for outside hosts, where mail is only accepted if the mail is to $relay_domains

1 Answer 1


In case anyone else is ever required by organizational policy to do this, I've found out how to enforce this restriction:


Thanks to everyone for looking anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.