how can I configure postfix to allow sending to a certain (external) domain only?
I'm already using check_recipient_access. Content of my /etc/postfix/recipients_restrictions:
My (current) configuration:
smtpd_recipient_restrictions = permit_mynetworks, check_recipient_access hash:/etc/postfix/recipients_restrictions, permit_sasl_authenticated, reject_unknown_recipient_domain, reject_unauth_destination, reject
I have already tried to switch permit_mynetworks and check_recipient_access. If I create an entry like "baddomain.com REJECT" in recipients_restrictions file, it works fine. I found out, there is no way to create a wildcard for "Reject" in this file (please correct me, if I'm wrong).
I want this server to send to addresses for few domains only and restrict it from sending any mails to any other domain as a matter of security.