[Exim] MySQL lookup for aliases

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Vladimir Sharun
Date:  
À: exim-users
Sujet: [Exim] MySQL lookup for aliases
I need a complex query for aliases like:

# if <condition> {string1}{string2}
query = ${if eq {${lookup mysql{select user from users where user='$local_part' \
       and flag !=8 and flag !=10 and flag!=64}}} {$local_part}\
       {$local_part}{:fail: Mailbox unavailable}}


But, due to "search_type = mysql" any of string1 or string2 in "if" is
expanded to mysql query, and of course lookup failed. Converting
strings to another sql query is solution, but maybe exists tricks,
saying to exim, that string1 or string2 is variables, not a query ?