[Exim] Re: Virtual domain and alias problem

Pàgina inicial
Delete this message
Reply to this message
Autor: Peter Bowyer
Data:  
A: exim-users
Assumpte: [Exim] Re: Virtual domain and alias problem
Björn Lindström <bkhl@???> wrote:
> The following message is a courtesy copy of an article
> that has been posted to gmane.mail.exim.user as well.


Please don't!

> "Peter Bowyer" <peter@???> writes:
>
>> Björn Lindström <bkhl@???> wrote:
>>> I have this router in my config:
>>>
>>> virtual:
>>> driver = redirect
>>> domains = dsearch;/usr/local/etc/exim/virtual
>>> data =
>>> ${lookup{$local_part}lsearch*{/usr/local/etc/exim/virtual/$domain}}
>>> no_more
>>>
>>> And here is a typical $domain alias file:
>>>
>>> # Alias.
>>> server: bkhl
>>>
>>> # The rest to sten.
>>> *: sten
>>>
>>>
>>> Now, the problem is that it seems like the messages will first be
>>> redirected according to the right alias files, which sends them
>>> along to the alias file corresponding to the canonical name of the
>>> server.
>>>
>>> That file is the one above. As a result, *everything* is redirected
>>> to the user sten.
>>>
>>> How do I get it to just use _one_ of the virtual domain alias files?
>>
>> Hmm... what outcome where you expecting from that router / alias
>> file? As it stands, a mail addressed to server@virtualdomain will be
>> aliased to bkhl@localhostname. If you want it rewritten to
>> bkhl@virtualdomain instead, you need a
>>
>> qualify_preserve_domain
>>
>> option in the router. But bkhl@virtualdomain will be run through the
>> routing again, and be aliased to sten@virtualdomain. Is this what
>> you want?
>
> No. I want all the aliases in one domain to be redirected according to
> the corresponding alias file, only. Only mail actually addressed to
> (or aliased to in another alias file) the canonical hostname should be
> affected by the alias file that has its name.


I'm not sure you understand my question. If you put a
qualify_preserve_domain option in your router (which will stop aliases
ending up qualified with your canonical host name and re-aliased with the
file that belongs to that name), server@virtualdomain will be aliased to
bkhl@virtualdomain. Is that how you want it to finish up? Is there some
other router, or some more entries in the alias file, which will catch this
address and deliver it appropritately? If not, it will go through the alias
router again and end up being caught by the * entry.

Peter