I have around 2000 email accounts. How can I configure postfix in a way that some users can send/receive email to/from the internet and others not. I am following this manual to restrict sending so far http://www.postfix.org/RESTRICTION_CLASS_README.html#external
/etc/postfix/main.cf: smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/restricted_senders, check_recipient_access hash:/etc/postfix/blacklist, reject_unauth_pipelining, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_client_access hash:/etc/postfix/rbl_override, reject_rbl_client cbl.abuseat.org, reject_rbl_client sbl-xbl.spamhaus.org, .... check_policy_service inet:127.0.0.1:10023, permit smtpd_restriction_classes = local_only local_only = check_recipient_access hash:/etc/postfix/local_domains, reject /etc/postfix/restricted_senders: email@example.com local_only firstname.lastname@example.org local_only /etc/postfix/local_domains: mydomain.com OK mysubdomain.mydomain.com OK
I run postmap command:
postmap /etc/postfix/restricted_senders postmap /etc/postfix/local_domains
Restarted the postfix service.
Using this setting, email@example.com should not be able to send email to any email address expect mydomain.com (Correct me if I'm wrong).
I used web based client and sent email from firstname.lastname@example.org to gmail, yahoo, etc and gmail, yahoo users could receive from email@example.com.
what is wrong here?