Q0422 - Exim/exim GitHub Wiki
Q0422
How can I arrange for all addresses in a group of domains *.example.com to share the same alias file? I have a number of such groups.
For a single group you could just hard wire the file name into a router that had
domains = *.example.com
set, to restrict it to the relevant domains. For a number of such groups you can create a file containing the domains, like this:
*.example1.com example1.com
*.example2.com example2.com
...
Then create a router like this
domain_aliases:
driver = redirect
domains = partial-lsearch;/that/file
data = ${lookup{$local_part}lsearch*{/etc/aliases.d/$domain_data}}
The variable $domain_data contains the data that was looked up when
the domains
option was matched, i.e. example1.com
, example2.com
,
etc. in this case.