Re: [Exim] Exim 4.1: Best way to setup per domain aliases

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: bas
CC: exim-users
Subject: Re: [Exim] Exim 4.1: Best way to setup per domain aliases
bas@??? wrote:
> Hello,
>
> I'm using Exim 4.10 (with Exiscan) and would like to have per domain aliases. I
> have the following in the
>
> domainlist local_domains = /usr/exim/config/local_domains
> and that file contains
> brijn.nu
> gfs82a.nu
> sjs.nu
>
> Now I would like to have under my config dir (/usr/exim/config), a file
> brijn.nu etc etc containing the aliases for that domain.
>
> How to do this


i prefer it that way

create a directory /usr/exim/config/domains/
put one aliasfile per domain in it

and do this

domainlist local_domains = dsearch;/usr/exim/config/domains/

and add the following router

virtual_aliases:
   driver = redirect
   data = ${lookup {$local_part} lsearch \
             {/usr/exim/config/domains/$domain}}



This is an easy solution, and works perfect for small setups, if you
have many domains, you should save the data in some database-format
(dbm,cdb).