Hello,
i have to setup Postfix that clients or printers from subnets like 192.168.10.0/24 or specific ip addresses like 192.168.16.45 are allowed to send mails to every destination. I have done this by this main.cf: smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.10.0/24 192.168.20.0/24 hash:/etc/postfix/SMTP_allow.txt In the txt file are the specific mail addresses. Now i have to restrict some subnets to send mails only to domains like acme.com or jdoe.com. I found this this article: (http://www.postfix.org/RESTRICTION_CLASS_README.html) *Restricting what users can send mail to off-site destinations* / How can I configure Postfix in a way that some users can send mail to the internet and other users not. The implementation uses two lookup tables. One table defines what users are restricted in where they can send mail, and the other table defines what destinations are local. /etc/postfix/main.cf: smtpd_recipient_restrictions = ... check_sender_access hash:/etc/postfix/restricted_senders ...other stuff... smtpd_restriction_classes = local_only local_only = check_recipient_access hash:/etc/postfix/local_domains, reject /etc/postfix/restricted_senders: foo@domain local_only bar@domain local_only /etc/postfix/local_domains: this.domain OK matches this.domain and subdomains that.domain OK matches that.domain and subdomains/ Can i use only mail addresses in the file "restricted_senders" or also ip subnets ? If not, how can i achieve this ? -- Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html