Re: [Exim] Exim 4.2 + Virtual addresses + multiple domains

Pàgina inicial
Delete this message
Reply to this message
Autor: Markus Fischer
Data:  
A: exim-users
Assumpte: Re: [Exim] Exim 4.2 + Virtual addresses + multiple domains
On Mon, Sep 29, 2003 at 09:53:35AM -0400, Ken Campbell wrote :
> I've searched the documentation + FAQ + list archive, and unfortunately
> have yet to solve the following problem. I appologize if this is a well covered
> issue, but I haven't been able to figure things out...
>
> I have a server running Exim 4.22 that will be responsible for handling mail for
> about 15 domains. Nearly all will of them will simply forward emails.
>
> I have them set up as local_domains in the configure file:
> domainlist local_domains = domain1.com : domain2.com : domain3.com : etc, etc...
>
> ... and I want to be able to put the following in my aliases file:
>
> bob@???: bob_1@???
> jane@???: jsmith@???
> tom@???: td@???
> sam@???: sammy@???
> gwen@???: g.doe@???
>
> .. etc, etc...
>
> This is how it was done on our old Exim 3.x server. I tried copying this format,
> but sending an email to (for example) bob@??? returns 550 User Unknown.
>
> Unfortunately the config files are incompatible (many directives in 3.x are not present in 4.x).
> I've tried creating routers based on the FAQ and manual, but nothing has worked..
>
> There did not appear to be any special routers or filters set up on the Exim 3.x box.
>
> Any specific examples of how I might accomplish the above would be muchly appreciated.


    I've used the technique described at
    http://www.exim.org/exim-html-4.20/doc/html/spec_41.html#SECT41.6


  virtual:
    driver = redirect
    domains = dsearch;/etc/mail/virtual
    data = ${lookup{$local_part}lsearch{/etc/mail/virtual/$domain}}
    no_more


    It's really very powerful, yet simple. First The directory
    /etc/mail/virtual is checked for a file with your virtual domain
    name. If found, that file is consulted for further aliases. You
    don't maintain one single file for all domains but one for each
    virtual domain.


    You even can use the dsearch construct in other places where you
    need to check whether you're responsible for a given domain. This
    reduces the work to create a new virtual domain by just creating an
    empty file in the directory /etc/mail/virtual and/or enter any
    further aliases you need.


    HTH,
        - Markus