[exim] Multiple aliasfiles for virtual domains

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: srunschke
Dátum:  
Címzett: exim-users
Tárgy: [exim] Multiple aliasfiles for virtual domains
Greetings list,

I've started merging various domains on a single server and tried
to realize a setup where I can have multiple alias files - one for each
hosted domain.

My current approach is to modify the standard system_alias router
in the following way:

system_aliases:
  debug_print = "R: virtual_system_aliases for $local_part@$domain"
  driver = redirect
  domains = +local_domains
  allow_fail
  allow_defer
  data = ${if exists{/etc/aliases.$domain}{${lookup{$local_part} \
        lsearch{/etc/aliases.$domain}}}fail}


According to the tests I made, this seems to work like intended, but
does anyone see a problem arising with this config? Or is there
a smarter way to do it? I've googled and searched the list, but
didn't come up with a better idea.

Since my approach has the problem of not having a catchall
aliasfile to match all the standard aliases (postmaster, etc.pp), I
thought of enhancing it:

  data = ${if exists{/etc/aliases.$domain}{${lookup{$local_part} \
        lsearch{/etc/aliases.$domain}}} \
        ${lookup{$local_part}lsearch{/etc/aliases}}


But sadly that approach cannot work, as it only checks the catchall
aliasfile if the specific $domain-aliasfile does not exist. Instead
I want to have it look into /etc/aliases if the lookup into
/etc/alias.$domain
failed, whether the file did not exist or did not yield a corresponding
alias - I don't (want to) care ;)

Could anyone point me to a direction of how to realize that?
Is it possible to nest the data= of my router even more, as in
doing more checks when the "if exists" fails?

regards
        sash


--------------------------------------------------
Sascha Runschke
Netzwerk Administration
IT-Services

ABIT AG
Robert-Bosch-Str. 1
40668 Meerbusch

Tel.:+49 (0) 2150.9153.226
Mobil:+49 (0) 173.5419665
mailto:SRunschke@abit.de

http://www.abit.net
http://www.abit-epos.net
---------------------------------
Sicherheitshinweis zur E-Mail Kommunikation /
Security note regarding email communication:
http://www.abit.net/sicherheitshinweis.html