[Exim] problem with queries option

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Steffen Herold
Date:  
À: exim-users
Sujet: [Exim] problem with queries option
Hello

i want to use something like this in the aliasfile director.

virtual_alias:
driver = aliasfile
domains = ${lookup mysql {MYSQL_DOMAINALIAS}{$value}}
search_type = mysql
queries = MYSQL_ALIAS : MYSQL_POSTMASTER
rewrite = false
user = mail
qualify_preserve_domain


MYSQL_ALIAS = SELECT MYSQL_ALIASUSERFIELD FROM MYSQL_ALIASTABLE WHERE
MYSQL_DOMAINFIELD LIKE '${quote_mysql:$domain}' AND MYSQL_ALIASFIELD
LIKE '${quote_mysql:$local_part}'

MYSQL_POSTMASTER = SELECT MYSQL_ALIASUSERFIELD FROM MYSQL_ALIASTABLE
WHERE_DOMAINFIELD LIKE '${quote_mysql:$domain}' AND MYSQL_ALIASFIELD='*'



when I use a real existing alias everything is o.k. but
when I use " exim -bt not-a-real-alias@??? " I got

not-a-real-alias@??? cannot be resolved at this time:
search_find deferred: MYSQL: query failed: You have an error in your
SQL syntax near 'LIKE 'domain.com' AND alias='*'' at line 1

Steffen