> -----Messaggio originale-----
> Da: owner-postfix-us...@postfix.org [mailto:owner-postfix-
> us...@postfix.org] Per conto di Wietse Venema
> Inviato: mercoledì 14 giugno 2017 19:38
> A: Postfix users <postfix-users@postfix.org>
> Oggetto: Re: R: Client host rejected: Access denied
> 
> Scappatura Rocco:
> > > smtpd_recipient_restrictions =
> > >  ...
> > >  check_client_access
> > > proxy:mysql:/etc/postfix/mysql-check-client-access.cf
> > >  ...
> >
> > Hello,
> >
> > indeed I can't figure out why the check above can cause the error:
> >
> > "Client host rejected: Access denied"
> > ...
> > Here complete errore received by the sender:
> >
> > <y...@example.com>:
> > 554: 5.7.1 <sonic307-9.consmr.mail.ir2.yahoo.com[87.248.110.34]>:
> > Client host rejected: Access denied
> 
> You can use the postmap command so simulate the queries that
> check_client_access makes:
> 
> postmap -q 87.248.110.34 proxy:mysql:/etc/postfix/mysql-check-client-
> access.cf
> postmap -q 87.248.110 proxy:mysql:/etc/postfix/mysql-check-client-
> access.cf

postmap -q 87.248.110 proxy:mysql:/etc/postfix/mysql-check-client-access.cf
REJECT

:-)

Indeed I checked that I have an erroneous entry in my DB. Infact:

SELECT * 
FROM access
WHERE INET_ATON( ip ) & INET_ATON( mask ) = INET_ATON(  '87.248.110' ) & 
INET_ATON( mask ) 
ORDER BY mask DESC 
LIMIT 0 , 1

Returns:

+--------------+-----------------+--------+
| ip           | mask            | action |
+--------------+-----------------+--------+
| 77.246.0.112 | 225.225.225.224 | REJECT |
+--------------+-----------------+--------+

And mask 225.225.225.224 is clearly wrong.. 

:-(

Thanks for your support!

> postmap -q 87.248 proxy:mysql:/etc/postfix/mysql-check-client-access.cf
> postmap -q 87 proxy:mysql:/etc/postfix/mysql-check-client-access.cf
> 
> And for the domain name queries that check_client_access makes:
> 
> postmap -q postmap -q sonic307-9.consmr.mail.ir2.yahoo.com
> proxy:mysql:/etc/postfix/mysql-check-client-access.cf
> postmap -q postmap -q consmr.mail.ir2.yahoo.com
> proxy:mysql:/etc/postfix/mysql-check-client-access.cf
> postmap -q postmap -q mail.ir2.yahoo.com proxy:mysql:/etc/postfix/mysql-
> check-client-access.cf
> postmap -q postmap -q ir2.yahoo.com proxy:mysql:/etc/postfix/mysql-
> check-client-access.cf
> postmap -q postmap -q yahoo.com proxy:mysql:/etc/postfix/mysql-check-
> client-access.cf
> postmap -q postmap -q com proxy:mysql:/etc/postfix/mysql-check-client-
> access.cf
> 
> If any of those queries returns a result, then that is the action that 
> Postfix will
> execute.
> 
>       Wietse

RS

Reply via email to