Q0401 - Exim/exim GitHub Wiki
I need to have any mail for virt.dom.ain that doesn't match one of the aliases in /usr/lib/aliases.virt delivered to a particular address, for example, [[email protected]](mailto:[email protected]).
Adding an asterisk to a search type causes Exim to look up * when the normal lookup fails. So if your aliasing router is something like this:
virtual:
driver = redirect
domains = virt.dom.ain
data = ${lookup{$local_part}lsearch{/usr/lib/aliases.virt}}
no_more
you should change lsearch
to lsearch*
, and put this in the alias
file:
This solution has the feature that if there are several unknown addresses in the same message, only one copy gets sent to the postmaster, because of Exim's normal de-duplication rules. NOTE: This solution works only if there is also an entry for postmaster in the alias file, ultimately resolving to an address that is not in virt.dom.ain.