Re: [Exim] fallback lookups?

Top Page
Delete this message
Reply to this message
Author: leon breedt
Date:  
To: exim-users
Subject: Re: [Exim] fallback lookups?
On Tue, 2004-07-06 at 01:35, David S. Madole wrote:
> Have you tried nesting lookups using the "string2" item i.e. the one that
> gets used if the lookup fails?

unfortunately, there seems to be no way to regard a mysql unreachable
problem as a "soft" error or empty lookup.

i have two domain lists:

domainlist x_mysql = mysql;SELECT ...
domainlist x_fallback = dbm;...
domainlist relay_to_hosts = +x_mysql : +x_fallback

a failure in the mysql domainlist causes a 451 error :/

i get the same if the first lookup fails due to connectivity problems
when i'm doing a nested lookup in the routers.

i tried adding a "fail" to the end of the ${lookup} in the hope that it
would ignore database errors, with no luck.

this is what one of my routers looks like:

virtual_aliases:
  driver = redirect
  domains = +relay_domains
  data = ${if !eq \
            {${lookup mysql{SELECT ma.value FROM mail_alias ma,
mail_domain md WHERE ma.domain_id=md.id AND
md.name='${quote_mysql:$domain}' AND
ma.name='${quote_mysql:$local_part}' AND md.state='activated'}
{$value}fail}} \
            {fail} \
            {$value} \


{${lookup{$local_part@$domain}dbm*@{/etc/exim_incoming/virtual_aliases.db}}} \
          }
  retry_use_local_part
  forbid_file
  forbid_pipe




if i could indicate that i don't care whether the lookup fails due to
connectivity issues, and return empty string in that case, it would
serve my purposes.

or alternatively, if there were some way i could move on to the next
router if the first one (doing a MySQL lookup) fails.

leon

--
leon.breedt@???
+64-9-361-0619