hi, I am trying toconfigure postfix for "Restricting what users can send mail to off-site destinations" have gone through the http://www.postfix.org/faq.html#relay_restrict but i am getting error as "Jan 23 16:37:38 caere postfix/smtpd[22999]: fatal: restriction class `local_only' needs a definition" have done as : /etc/postfix/main.cf: smtpd_recipient_restrictions = check_sender_access hash:/etc/postfix/restricted_senders smtpd_restriction_classes = local_only local_only = check_recipient_access hash:/etc/postfix/local_domains, reject and in : /etc/postfix/restricted_senders: foo@domain1 local_only bar@domain2 local_only and, /etc/postfix/local_domains: this.domain OK matches this.domain and subdomains that.domain OK matches that.domain and subdomains please advice dint find anything similar for my setup.
Hi falko ,this has been done and file local_domains.db created. i dont know what was wrong but after restarting postfix this error has been gone but after that all the user's were blocked so i added "user@domain ok" in the restricted_senders file for all the required users. and finally these users can mail (relay) offside now. do i have to run postmap for restricted_sender too ? i have done postmap for restricted_senders too. Thanks
You must run postmap for all hash files in your main.cf (e.g. local_only = check_recipient_access hash:/etc/postfix/local_domains, reject).