Szerző: Eli Dátum: Címzett: exim-users Tárgy: [exim] Using a mysql query in a domainlist in retry section
Hi again (been a while since my last post & change of addresses),
I've got a problem that I had run in to a while back with Exim, but avoided
it since at the time I was able to use single key lookups. However now I am
trying to implement the same feature, but I have no choice but to use query
style lookups (in this case, to MySQL).
I have a domainlist which is a MySQL query to see if $domain is local or not
which works just peachy for all my other needs within the configuration
file, except when I try to do anything in the retry section. Here is my
domainlist:
domainlist domain_virtual = ${lookup mysql {SELECT host \
FROM domain WHERE host = '${quote_mysql:$domain}' LIMIT 1}}
Now from what I can tell from using -brt with -d to see what Exim is doing,
if I have a retry rule like so:
When Exim goes to expand +domain_virtual, there's no value in $domain (or
practically any other variable from what I've been able to see), so my query
ends up looking for a null domain which of course doesn't exist, and my
retry value is skipped. The retry value is used to specify retry times for
local domains that will be "better" than for remote hosts (in case you were
wondering).
Now, the exact same setup works perfect if the domainlist instead were:
Domainlist domain_virtual = dbm;/etc/exim/host.db
For example - if of course I had such an /etc/exim/host.db file to query.
I've spent quite a bit of time fiddling with various variables I know of to
see if any held a value I could use, but all of them were empty. Is there a
way to do what I'm trying to do here? If so can you tell me/point me to
info on it please - I've searched the mail archives and found nothing, and I
can't find any info on what variables are usable in the retry section,
etc... If there is no way to do this, can I make a request that a special
$key variable be created that holds the key you'd otherwise normally use for
a single-key lookup however it would in this case be available to a query
lookup?