Re: [exim] Running a SQL Insert command

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Jeremy Harris
Ημερομηνία:  
Προς: exim-users @ exim. org
Αντικείμενο: 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