mwolson: Initial migration of exim4 settings to deleuze
[hcoop/zz_old/config/exim4-hopper.git] / conf.d / auth / 30_exim4-config_examples
index 24d52d1..e696ad1 100644 (file)
@@ -210,22 +210,38 @@ 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}}}
 
-plain:
+# hcoop-change: Authenticate against /etc/courier/exim.dat
+userdb_plain:
   driver = plaintext
   public_name = PLAIN
-.ifndef AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS
-  client_send = "${if !eq{$tls_cipher}{}{\
-                     ^${extract{1}{::}\
-                      {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
-                    ^${extract{2}{::}\
-                      {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
-                  }fail}"
-.else
-  client_send = "^${extract{1}{::}\
-                   {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
-                 ^${extract{2}{::}\
-                  {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}"
-.endif
+  server_condition = \
+    ${if \
+      crypteq {$3} \
+              {${extract{systempw}{${tr{${lookup{$2} \
+                                 dbm{/etc/courier/exim.dat} \
+                           }}{|}{ }}}}} \
+      {yes} \
+      {no} \
+    }
+  server_set_id = $2
+
+# hcoop-change: Comment out plain authenticator
+# plain:
+#   driver = plaintext
+#   public_name = PLAIN
+# .ifndef AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS
+#   client_send = "${if !eq{$tls_cipher}{}{\
+#                      ^${extract{1}{::}\
+#                     {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
+#                   ^${extract{2}{::}\
+#                     {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
+#                 }fail}"
+# .else
+#   client_send = "^${extract{1}{::}\
+#                    {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
+#                  ^${extract{2}{::}\
+#                 {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}"
+# .endif
 
 login:
   driver = plaintext