Skip to content

Instantly share code, notes, and snippets.

@mcnemesis
Created July 4, 2013 14:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcnemesis/5928364 to your computer and use it in GitHub Desktop.
Save mcnemesis/5928364 to your computer and use it in GitHub Desktop.
Defining an Exim4 Router to allow Exim to route mails for virtual domains using custom virtual domains aliases.
#####################################################
# router/350_exim4-config_virtual_aliases
#####################################################
#---------------------------
# This router is added so that we can use this server for multiple domains
# And also be able to define custom aliases for each of these domains...
# NOTE : this router is placed before the system_aliases router so that virtual domain
# routing takes precedence over system_aliases
#----------------------------
#allows for aliases of the sort==> alias@host.com : local_user, other@example.com
domains_virtual:
driver = redirect
data = ${lookup{$local_part@$domain}lsearch{/etc/exim4/aliases.virtual}}
#allows for a special catch-all alias of the sort==> @host.com : local_user, other@example.com
domains_virtual_others:
driver = redirect
data = ${lookup{@$domain}lsearch{/etc/exim4/aliases.virtual}}
#####################################################
# end router/350_exim4-config_virtual_aliases
#####################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment