Get vmail working!
[hcoop/zz_old/config/exim4-hopper.git] / conf.d / router / 310_exim4-config_virtual_user
dissimilarity index 66%
index 6ff2d33..b2f28f8 100644 (file)
@@ -1,9 +1,14 @@
-# hcoop-change: Route mail for hosted domains
-
-virtual_user:
-  driver = accept
-  transport = virtual_delivery
-#  require_files = /home/vmail/${domain}/${local_part}
-  condition = ${extract{mail}{${tr{${lookup{$local_part@$domain} \
-                                 dbm{/etc/courier/exim.dat} \
-                        }}{|}{ }}}}
+# 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 }} \
+                     {|}{ }}