Use userdb.dat rather than exim.dat for Exim
authorroot <root@deleuze.hcoop.net>
Thu, 1 Nov 2007 02:30:52 +0000 (22:30 -0400)
committerroot <root@deleuze.hcoop.net>
Tue, 17 Jun 2008 04:21:51 +0000 (00:21 -0400)
conf.d/auth/30_exim4-config_examples
conf.d/router/310_exim4-config_virtual_user
conf.d/transport/40_exim4-config_virtual_delivery

index b228b4c..f844199 100644 (file)
@@ -210,7 +210,7 @@ cram_md5:
   client_name = ${extract{1}{:}{${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}
   client_secret = ${extract{2}{:}{${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}
 
-# hcoop-change: Authenticate against /etc/courier/exim.dat for plain
+# hcoop-change: Authenticate against /etc/courier/userdb.dat for plain
 # and login authenticators
 
 userdb_plain:
@@ -220,7 +220,7 @@ userdb_plain:
     ${if \
       crypteq {$3} \
               {${extract{systempw}{${tr{${lookup{$2} \
-                                 dbm{/etc/courier/exim.dat} \
+                                 dbm{/etc/courier/userdb.dat} \
                            }}{|}{ }}}}} \
       {yes} \
       {no} \
@@ -235,7 +235,7 @@ userdb_login:
     ${if \
       crypteq {$2} \
               {${extract{systempw}{${tr{${lookup{$1} \
-                                 dbm{/etc/courier/exim.dat} \
+                                 dbm{/etc/courier/userdb.dat} \
                            }}{|}{ }}}}} \
       {yes} \
       {no} \
index ecd010a..8491201 100644 (file)
@@ -4,3 +4,6 @@ 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/userdb.dat} \
+#                         }}{|}{ }}}}
index 255a9b1..8dce1f9 100644 (file)
@@ -2,19 +2,21 @@
 # mailboxes (i.e. email accounts which have been granted to non-hcoop
 # members by the owner of the domain)
 
-# Warning: This is currently known to not work for some domains.
-# Perhaps we should be using a postgresql/mysql lookup here.
-
 virtual_delivery:
   debug_print = "T: virtual_delivery for $local_part@$domain"
   driver = appendfile
   user = ${extract{uid}{${tr{${lookup{$local_part@$domain} \
-                                 dbm{/etc/courier/exim.dat} \
+                                 dbm{/etc/courier/userdb.dat} \
                         }}{|}{ }}}}
   group = mail
   mode = 0660
   mode_fail_narrower = false
   envelope_to_add
   return_path_add
-  directory = /home/vmail/${domain}/${local_part}
+  directory = ${extract{mail}{${tr{${lookup{$local_part@$domain} \
+                                 dbm{/etc/courier/userdb.dat} \
+                        }}{|}{ }}}}${run{/etc/exim4/get-token \
+                        ${extract{uid}{${tr{${lookup{$local_part@$domain} \
+                                 dbm{/etc/courier/userdb.dat} \
+                        }}{|}{ }}}}}{}}
   maildir_format