Hello listers, I am testing Exim4u with MySQL-8.0.14 and I find a situation where the group router sql query is not running. root(a)gw:/usr/local/etc/mail # exim -bt finance(a)crownkenya.com LOG: MAIN PANIC failed to expand "${if eq{Y}{${lookup mysql{select g.is_public from groups g, domains d where d.enabled = '1' and d.domain = '${quote_mysql:$domain}' and d.domain_id = g.domain_id and g.enabled = '1' and g.name = '${quote_mysql:$local_part}'}}} {$sender_address} {${lookup mysql{select u.username from domains d, groups g, group_contents c, users u where d.enabled = '1' and d.domain = '${quote_mysql:$domain}' and d.domain_id = g.domain_id and g.name = '${quote_mysql:$local_part}' and g.enabled = '1' and g.is_public = 'N' and c.member_id = u.user_id and d.domain_id = u.domain_id and u.enabled = '1' and u.username = '${quote_mysql:$sender_address}' }}}}" while checking a list: lookup of "select g.is_public from groups g, domains d where d.enabled = '1' and d.domain = 'crownkenya.com' and d.domain_id = g.domain_id and g.enabled = '1' and g.name = 'finance'" gave DEFER: 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 'groups g, domains d where d.enabled = '1' and d.domain = 'crownkenya.com' and d.' at line 1 Is anyone using mysql-8.0.x with Exim4U? -- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
Actually, I realized that if I dump exim4u database from mysql-5.7 server and import into mysql-8.0 server, it does not create the groups table. On Sat, 16 Feb 2019 at 14:32, Odhiambo Washington <odhiambo(a)gmail.com> wrote:
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
I solved this somehow. It would appear that mysql-8.0.x does not like to allow the creation of a table named "groups". So I modified my sql queries to instead use "mygroups" as the table name. This also requires the modification of the admingroup* php scripts to be edited to alter every reference to SQL groups into mygroups On Sat, 16 Feb 2019 at 14:39, Odhiambo Washington <odhiambo(a)gmail.com> wrote:
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
Hi Odhiambo, I suspect 'groups' is perhaps a reserved word in MySQL 8. An easier way to solve the problem would probably have been to escape this table name using background backticks where it's used in Exim config (and possibly IMAP/POP configs). Cheers, Rimas Sent from my mobile phone. Please excuse my brevity and potential typos. On 2019 m. vasario 16 d. 14:55:16 GMT+02:00, Odhiambo Washington <odhiambo(a)gmail.com> wrote:
Hello Rimas, Thank you for your email - on a weekend :-) To be honest, I tend to agree about the word 'groups' being reserved, but I am yet to Google for the same. And the solution - I think it's better to rename the table to avoid confusion anywhere. On Sat, 16 Feb 2019 at 16:02, Rimas Kudelis <rq(a)akl.lt> wrote:
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254 7 3200 0004/+254 7 2274 3223 "Oh, the cruft.", grep ^[^#] :-)
participants (2)
-
Odhiambo Washington
-
Rimas Kudelis