Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q0435


`Navigation(siblings)`_


Q0435

Question

My alias file contains fully qualified addresses as keys (as it was used in sendmail's /etc/mail/virtualusertable), and some wildcard domains in the form @foo.bar. Can Exim handle these?

Answer

You can handle fully qualified addresses with this router:

qualified_aliases:
  driver = redirect
  data = ${lookup{$local_part@$domain}lsearch{/etc/aliases}}

(Add any other options you need for the redirect router.) Place this router either before or after the default aliases router that looks up the local part only. (Or, if you have no unqualified aliases, replace the default router.) To handle wildcards in the form @foo.bar you will need yet another router. (Wildcards of the form @foo.bar can be handled by an lsearch@ lookup.) Something like this:

wildcard_aliases:
  driver = redirect
  data = ${lookup{@$domain}lsearch{/etc/aliases}}

Place this after the routers that handle the more specific aliases.


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.