Hi Morten,
> I have a running Exim server which is currently only used for outbound
> mail. Now I'd like to configure it such that:
>
> All inbound mail for *@*.mydomain.com should be delivered to user X.
>
> For example:
>
> foo@??? goes to /var/mail/X
> bar@??? goes to /var/mail/X
> bar@??? goes to /var/mail/X
>
> I have the MX record *.mydomain.com in the DNS. As I'd like to support
> any subdomain, my guess is that I can accomplish this without setting up
> virtual domains. But my terminology is lacking so I don't quite know
> what I should look for in the documentation. Any tips?
Create a file that lists your domains and their destinations. Mine is
called 'CONFDIR/domain-aliases'. This assumes that user X has email
address x@localdomain.
*.mydomain.com x@localdomain
If you need to construct a domainlist from this file, for use in ACLs or
elsewhere, you can use:
domainlist xyz_domains = partial-lsearch;CONFDIR/domain-aliases
Then put this in your Exim config:
# Router for forwarding mail for certain (sub)domains to a single address
subdomain_route:
driver = redirect
data =
${lookup{$domain}partial-lsearch{CONFDIR/domain-aliases}{$value}fail}
Best regards,
Martijn Grendelman