[exim] trouble with a redirect router

Pàgina inicial
Delete this message
Reply to this message
Autor: Noah Meyerhans
Data:  
A: exim-users
Assumpte: [exim] trouble with a redirect router
Hi all. I'm trying to implement a fairly standard "virtual domain"
configuration. I've got a domain list "legacy_domains", which lists
several domains which are being phased out from our infrastructure and
currently only contain aliases. I want my router to be called for mail
that is addressed to an address in one of these legacy domains, and I
want it to return an "unknown user" message in the event that there's no
entry in the domain-specific aliases file. I want this to be the only
router that is called for mail to the domains in legacy_domains.

The router looks like this:
legacy_mail:
    driver = redirect
    domains = +legacy_domains
    condition = ${lookup{$local_part}dbm{/etc/exim/$domain.db}}
    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


The bit about the local_part_suffix is so we can pass the "plus hack"
along in the evelope To header. It's necessary, since that's what users
came to expect from the old infrastructure that we're phasing out. I
think it's where the problem is, though...

If this router is the last router listed, and the local_part is not
listed in /etc/exim/$domain.db, then a 550 error is returned to the
client with the correct cannot_route_message data. 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. This
is not the case. Other routers are being called after this one. Of
course, none of them are suceeding, because none of them handle
legacy_domains, but they're overriding the cannot_route_message I set
here.

Can anybody shed any light on what's going on here?

noah

-- 
Noah Meyerhans                         System Administrator
MIT Computer Science and Artificial Intelligence Laboratory