Re: [exim] Running a SQL Insert command

Pàgina inicial
Delete this message
Reply to this message
Autor: Jeremy Harris
Data:  
A: exim-users @ exim. org
Assumpte: Re: [exim] Running a SQL Insert command
Michael da Silva Pereira wrote:
> No Luck:
>
> Log file genreates:
> Warning: ACL "warn" statement skipped: condition test deferred: MYSQL:
> query failed: You have an error in your SQL syntax. Check the manual
> that corresponds to your MySQL server version for the right syntax to
> use near 'from, to, host, ctime) values ("msgid", "from", "to", "host" ,"\n
>
>
> config file looks like:
> begin acl
> acl_check_rcpt:
> accept hosts = :
>
> warn set acl_m9 = ${lookup mysql {INSERT INTO message_log \
> (msgid, from, to, host, ctime) \
> values \
> ("msgid", \
> "from", \
> "to", \
> "host" \
> ,"ctime")}}


OK, that's a MySQL error (not an Exim one). What does MySQL require
for quoting of string values? I only speak PgSQL, I'm afraid,
but that need single-quotes.

Or, did you really mean to try to put those strings in those fields?
Perhaps something more meaningful, made from Exim variables?

- Jeremy