<div dir="ltr"><div dir="ltr">On Fri, Jan 7, 2022 at 1:34 PM John Fawcett <<a href="mailto:john@voipsupport.it">john@voipsupport.it</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">On 07/01/2022 21:03, Ken Wright wrote:<br>
> On Fri, 2022-01-07 at 18:50 +0100, John Fawcett wrote:<br>
>> it may or may not be related to the tls issue, but I think you will<br>
>> want to investigate that message about the SQL query syntax error.<br>
>> You are not going to be able to login if the query is giving errors.<br>
>> Check the log doesn't reveal the cause.<br>
> Know anything about SQL queries, John?  Here's the user query in<br>
> question:<br>
><br>
> user_query = SELECT maildir, 2000 AS uid, 2000 AS gid FROM mailbox<br>
> WHERE username = '%u' AND active='1'<br>
><br>
> I copied this directly from the tutorial I've been following and this<br>
> is the first time I've seen this error.<br>
><br>
Hi Ken<br>
<br>
looks fine to me. However, mariadb is not accepting it. I suggest you <br>
run with auth_debug = yes and check the logs.<br>
<br>
</blockquote><div><br></div><div><br></div><div>Does it help at all if you use backticks around the column names for uid and gid? I.e.</div><div><br></div><div>from:</div><div>user_query = SELECT maildir, 2000 AS uid, 2000 AS gid FROM mailbox WHERE username = '%u' AND active='1'<br></div><div><br></div><div>to:</div>user_query = SELECT maildir, 2000 AS `uid`, 2000 AS `gid` FROM mailbox WHERE username = '%u' AND active='1' </div></div>