Autor: Giuliano Gavazzi Data: A: exim-users Assumpte: Re: [exim] how to detect if address aliased?
On Mon, 12 Dec 2005, Tony Finch wrote:
> On Sat, 10 Dec 2005, Magnus Holmgren wrote:
>> Giuliano Gavazzi skrev:
>
>>> In short, how do I detect that a redirect router has successfully
>>> redirected an address?
>>
>> Suggestion: Set address_data in the redirect routers (make sure that you
>> have preconditions that fail for addresses not handled by the routers),
>
> This is what I do. We have virtual domains in the form of aliases files.
> Some domains have "escape routes" for special case addresses (such as
> ticketing systems) which are only valid internally to our mail hub and by
> arrangement with the target system. E.g. there might be an escape route in
> the botolph.cam.ac.uk domain for rt.botolph.cam.ac.uk. [...] >> If you use address_data for other purposes it becomes more complicated,
>> of course.
>
> If you add keyword/value pairs to address_data then you can use ${extract
> to pull out the various parts. If you are careful you can then use if for
> multiple purposes.
Tony, thank you you too! I modified the routers last night but I am not
too happy about that complication, maybe I need to think about it with a
clear mind. I too have alias based virtual domains (I like being able
to add a domain simply adding a new directory built from a template).
Also, as I wrote before, I have three (yes, three) redirect routers
just for aliases, one for special case foo-whatever,
another for foo[-optional] local parts, and a third for the system
wide aliases. This is what I got (with a better naming system):
here I preserve an eventual field=value field that might be also stored in
address_data. Also, I fail when the lookup fails so that address_data is
not reset (normally at least one of these aliases will fail to lookup)..
The localuser router then checks that the aliased field is not empty::