# local exim is SMTP server and clients authenticate to the local exim.
# They allow two styles of plain-text authentication against an
-# CONFDIR/passwd file whose syntax is described in exim_passwd(5).
+# CONFDIR/passwd file whose syntax is described in exim4_passwd(5).
# Hosts that are allowed to use AUTH are defined by the
# auth_advertise_hosts option in the main configuration. The default is
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
-userdb_plain:
+# this returns the matching line from passwd.client and doubles all ^
+PASSWDLINE=${sg{\
+ ${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}\
+ }\
+ {\\N[\\^]\\N}\
+ {^^}\
+ }
+
+plain:
driver = plaintext
public_name = PLAIN
- 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
+.ifndef AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS
+ client_send = "<; ${if !eq{$tls_cipher}{}\
+ {^${extract{1}{:}{PASSWDLINE}}\
+ ^${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$2}}\
+ }fail}"
+.else
+ client_send = "<; ^${extract{1}{:}{PASSWDLINE}}\
+ ^${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$2}}"
+.endif
login:
driver = plaintext
.ifndef AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS
# Return empty string if not non-TLS AND looking up $host in passwd-file
# yields a non-empty string; fail otherwise.
- client_send = "${if and{\
+ client_send = "<; ${if and{\
{!eq{$tls_cipher}{}}\
- {!eq\
- {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}\
- {$value}fail}}\
- {}}\
+ {!eq{PASSWDLINE}{}}\
}\
{}fail}\
- : ${extract{1}{::}\
- {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}} \
- : ${extract{2}{::}\
- {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}"
+ ; ${extract{1}{::}{PASSWDLINE}}\
+ ; ${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$2}}"
.else
# Return empty string if looking up $host in passwd-file yields a
# non-empty string; fail otherwise.
- client_send = "${if !eq\
- {${lookup\
- {$host}nwildlsearch{CONFDIR/passwd.client}\
- {$value}fail}}\
- {}\
+ client_send = "<; ${if !eq{PASSWDLINE}{}\
{}fail}\
- : ${extract{1}{::}\
- {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}} \
- : ${extract{2}{::}\
- {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}"
+ ; ${extract{1}{::}{PASSWDLINE}}\
+ ; ${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$2}}"
.endif