Q0426 - Exim/exim GitHub Wiki
Q0426
One of the things I want to set up is for anything@onedomain to forward to anything@anotherdomain. I tried adding $local_part@anotherdomain to my aliases but it did not expand - it sent it to that literal address.
If you want to do it that way, you can use the expand
operator on the
lookup used in the data option of the redirect router. For example:
data = ${expand:${lookup{$local_part}lsearch*{/etc/aliases}}}
Another approach is to use a router like this:
forwarddomain:
driver = redirect
domains = onedomain
data = $local_part@anotherdomain
The value of data
can, of course, be more complicated, involving
lookups etc. if you have lots of different cases.