Good day! I am storing all my clients id and aliases in mysql database. I
would like to have *@domain.name in aliases so if an adress for a
specified domain have that line , to catch all non-existent adresses. I
have read in the
"The Exim Specification, 6.6 Default values in single-key lookups" that i
can use something like that:
mysql_users_aliases:
driver = redirect
file_transport = address_file
pipe_transport = address_pipe
data = ${lookup mysql{ SELECT id FROM users \
WHERE id='${quote_mysql:${local_part}@${domain}}' }} \n \
${lookup mysql*@{SELECT sendto FROM aliases \
WHERE (username='$local_part' AND domainname='$domain')}}
Notice please the "$lookup mysql*@" , which means (from the book) that if
the query fails then it searches only the domain part , ignoring
everything to "*". But i am dissapointed because it is not working..
Error is something like :
failed to expand "${lookup mysql{ SELECT id FROM users WHERE
id='${quote_mysql:${local_part}@${domain}}' }} \n ${lookup mysql*@{SELECT
sendto FROM aliases WHERE (username='$local_part' AND
domainname='$domain')}}": lookup of "SELECT sendto FROM aliases WHERE
(username='sales' AND domainname='euro.md')" gave DEFER: MYSQL: query
failed: You have an error in your SQL syntax near '*' at line 1\n
Can i use mysql*@ syntax ? Or how do i search for *@domain if the first
alias search gives nothing..???
Thanks a lot..
Oleg R.