On Tue, Sep 13, 2016 at 09:52:16PM +0200, Antoine Nguyen wrote: > query = SELECT name FROM admin_domain WHERE name='%s' AND type='domain' AND > enabled=1
What is not clear is how MySQL's quoting behaves given the input UTF-8 string. > postmap: cfg_get_str: /etc/postfix/sql-domains.cf: query = SELECT name FROM > admin_domain WHERE name='%s' AND type='domain' AND enabled=1 > > postmap: dict_mysql: successful query from host 127.0.0.1 > > postmap: dict_mysql_lookup: retrieved 0 rows I was hoping to see the expanded query string, but it is not output with "-v". Perhaps there's some sort of logging you can enable in the MySQL server or client libraries. Do make sure that your tests with the sql CLI really make the same query against the same database: SELECT name FROM admin_domain WHERE name='<utf-8-domain>' AND type='domain' AND enabled=1 -- Viktor.