I am looking to update my postfix configuration so it restricts the domains to which emails can be sent. I am thinking of using smtpd_recipient_restrictions with check_recipient_access, based on this solution: https://serverfault.com/a/412805 Does this allow for regex? I want to say, only send emails to *@mydomain.com and block everyone else. Something like this:
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/recipients
where recipients will be:
*@mydomain.com PERMIT,
* REJECT,
Is this doable?
Edit: I know this is possible with transportmap, but we already use check_recipient_access to block a few ids, and I would prefer not to introduce another configuration if possible.