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