On 7/10/2013 9:30 PM, Feel Zhou wrote:
> Thanks
> firsttime,setting bad user
> 
> /etc/postfix/main.cf <http://main.cf>
>     smtpd_sender_restrictions =
>         check_sender_access hash:/etc/postfix/sender_
> reject_addr_check
> /etc/postfix/sender_reject_addr_check
>     badu...@example.com <mailto:badu...@example.com> REJECT
> 
> It's working well, baduser will be reject, after that, setting
> "IP_match_domain" restrictions
> 
> /etc/postfix/main.cf <http://main.cf>
>     smtpd_sender_restrictions =
>         check_client_access cidr:/etc/postfix/enforce_ip_
> match_domain
>     smtpd_restriction_classes =
>         example
>     example = check_sender_access hash:/etc/postfix/example.domain
>         reject
> /etc/postfix/enforce_ip_match_domain
>     IP    example
> /etc/postfix/example.domain
>     example.com <http://example.com>    OK
> 
> Then This IP only can use @example.com <http://example.com> as the
> sender address, at this time, can not reject badu...@example.com
> <mailto:badu...@example.com> send mail. If I disable
> "IP_match_domain" restrictions, It's working again. So, I really
> want these two restrictions working together
> 
> Thank you very much
> Tom
> 


Combine the two, like this:

smtpd_sender_restrictions =
  check_sender_access hash:/etc/postfix/sender_reject_addr_check,
  check_client_access cidr:/etc/postfix/enforce_ip_match_domain




  -- Noel Jones

Reply via email to