[Exim] problem with queries option

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