merge hcoop vmail configuration
[hcoop/zz_old/config/exim4-hopper.git] / conf.d / router / 310_exim4-config_virtual_user
diff --git a/conf.d/router/310_exim4-config_virtual_user b/conf.d/router/310_exim4-config_virtual_user
new file mode 100644 (file)
index 0000000..b2f28f8
--- /dev/null
@@ -0,0 +1,14 @@
+# hcoop-change: Route mail for hosted domains
+
+virtual_user:
+  driver = accept
+  transport = virtual_delivery
+  # Look up the parameters for this email address, and store them in
+  # $address_data for later use.  If no data exists for this address,
+  # then "fail", which causes Exim to move on to the next router.
+  # This allows us to access the contents of $address_data in the
+  # virtual_delivery transport later on, without having to do multiple
+  # accesses to exim.dat.
+  address_data = ${tr{${lookup{$local_part@$domain} \
+                              dbm{/etc/courier/exim.dat}{$value} fail }} \
+                     {|}{ }}