[Exim] MySQL lookup for aliases

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Vladimir Sharun
日付:  
To: exim-users
題目: [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 ?