Hi,
I'm using Exim 4.20 and have 3 different mysql servers running on different
hosts.
I tried to configure relay server to authenticate all users to send email.
Unfortunately all authentication fails.
It seems like check $sender_address_domain fails and directly goes to
second query,
but it still uses connection to first mysql server.
It should work in following way: If sender domain is chinggis.com it should
use first query using first mysql connection,
otherwise it should use second mysql server and query.
However it doesn't work.
How can I configure to use second mysql server if first mysql server fails?
Can somebody give me advice and recommendations on this issue?
Following is the snippets of my exim configure.
In the Main section:
mysql_servers = host1/emls/root/xxx : host2/email/mailuser/xxx :
host3/corp/root/xxx
..
In the authenticators section:
cram:
driver = cram_md5
public_name = CRAM-MD5
server_secret = \
${if eq{$sender_address_domain}{chinggis.com}\
{\
${lookup mysql{select plt from usrs where (pq =
'${quote_mysql:$1}' or name = '${quote_mysql:$1}') and plt != ''}}\
}\
{\
${lookup mysql{select pwrd from usrs where (id =
'${quote_mysql:$1}') and pwrd != ''}}\
}\
}
server_set_id = $1
thanks in advance,
Ganbold