--
On Tue, 2004-07-06 at 12:11, Eli wrote:
> ${lookup ...} - maybe ${lookup/defer_ok ...}?
since i really need this option, i went ahead and wrote a patch to
expand.c that implements this feature.
its not ideal, it could probably do with generalization (i.e. not tie
options to "lookup"), and logging the fact that the database had an
error is probably a good idea too...this was just a proof of concept.
in effect, what it does is to ignore connectivity errors if /defer_ok is
appended to lookup, and just return an empty/blank value in that case.
tested example:
virtual_aliases:
driver = redirect
domains = +relay_domains
data = ${lookup/defer_ok 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}{${lookup{$local_part@$domain}dbm*@{/etc/exim_incoming/virtual_aliases.db}}}}
retry_use_local_part
forbid_file
forbid_pipe
patch attached, apply with:
# patch -p1 < exim-4.34-lookup-defer.patch
in the top-directory of the 4.34 source.
leon
--
[ exim-4.34-lookup-defer.patch of type text/x-patch deleted ]
--