On Sun, Aug 22, 2021 at 11:23:35AM -0300, SysAdmin EM via Exim-users wrote:
> /opt/exim/bin/exim -d+lookup -be '${lookup
> mysql{servers=127.0.0.1::6033/c233/sqlmonitor/password;
> SELECT domain FROM eximdomains WHERE active=1 AND domain='
> feudaleyasociados.com.ar'}}'
> 
> https://pastecode.io/s/jc85ovhb
> 
> The error it indicates is: gave DEFER: MYSQL: query failed: Unknown column '
> feudaleyasociados.com.ar' in 'where clause'
> 
> I make the query from proxysql the result is successful:
> 
> [root@c233a ~] # mysql -usqlmonitor -p9cCnX7NigY99 -h 127.0.0.1 -P6033 c233
> -e "SELECT domain FROM eximdomains WHERE active=1 AND domain='feudaleyas
> ociados.com.ar'";
> mysql: [Warning] Using a password on the command line interface can be
> insecure.
> +--------------------------+
> | domain                   |
> +--------------------------+
> | feudaleyasociados.com.ar |
> +--------------------------+
> 
> It might be a problem from exim?

 No. These SQL queries are different: first has NO quotes around value in
 domain=.. predicate, but the second have ones. Debug output confirms it.

 Shell expands string like 'xxx'a.b.c'yyy' to 'xxxabcyyy'.
 You should do quoting carefully.
-- 
 Eugene Berdnikov

-- 
## List details at https://lists.exim.org/mailman/listinfo/exim-users
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to