On 7 Oct 2004 at 15:57, Noah Meyerhans wrote about
"[exim] trouble with a redirect rout":
|...
| The router looks like this:
| legacy_mail:
| driver = redirect
| domains = +legacy_domains
| condition = ${lookup{$local_part}dbm{/etc/exim/$domain.db}}
This is a precondition, so if the lookup fails, the router is not
run.
| local_parts = dbm;/etc/exim/$domain.db
| local_part_suffix = +*
| local_part_suffix_optional
| data = ${quote:\
| ${local_part:$local_part_data}$local_part_suffix\
| }@${domain:$local_part_data}
| cannot_route_message = "Unkown user $local_part in domain $domain"
| more = false
|...
| However, if this
| router is listed first, I expect the "more = false" directive to cause
| exim to stop trying other routers and return the same 550 message.
No, not the way you have it. From the Fine Manual:
| more Type: boolean* Default: true
|
| ...
| If this option is set false, and the router is run, but declines to handle
^^^^^^^^^^^^^^^^^^^^^
| the address, no further routers are tried, routing fails, and the
| address is bounced.
| ...
| Also, the setting of
| "more" does not affect the behaviour if one of the precondition tests
| fails. In that case, the address is always passed to the next router.
So you don't want to use condition= to cause the router to be skipped
if the lookup fails. I think you want to do the lookup in an ${if in
the data= line and then fail the expansion or return an empty string
if the lookup fails.
- Fred