Re: [EXIM] another Q on virt. domains

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: patl
Fecha:  
A: vtmue
Cc: eml
Asunto: Re: [EXIM] another Q on virt. domains
> here's another question I came across while thinking about a way to handle
> virtual domains:
> In order to accept mail (=to recognize the domain as local) both for
> a_user@??? as well as a_user@??? it seems that I have to have
> a file containing *.dom.ain and define the searchtype for that file with a
> prepending partial-.
>
> Assumed I use a entry for a virtual domain that looks like this:
>
> virtual:
> driver = aliasfile
> domains = partial-lsearch;/etc/mail/LD-list
> no_more
> file = /etc/mail/$domain
> search_type = lsearch
>
> Then it seems to me that I need several alias files for each domain
> depending on the different hosts that can appear in the address.
> Since I can't quite believe that this is true, I want to ask here for
> assistance...


I handle this by using a lookup expansion in the file path. Set up
your LD-list file so that the value associated with the domain key
is the path to use. (Or the base of the path if you will need to
access various files in the virtual domain's private tree.)

    *.dom.ain:    /etc/mail/dom.ain
    *.mumble.com    /etc/mail/mumble.com


Then modify the director to use the value of the lookup.

    virtual:
        driver = aliasfile
        domains = partial-lsearch;/etc/mail/LD-list
        no_more
        file = ${lookup {$domain} partial-lsearch \
         {/etc/mail/LD-list} {$value} fail}
        search_type = lsearch





-Pat

--
*** Exim information can be found at http://www.exim.org/ ***