mwolson: Update exim4 from backports
authorroot@deleuze.hcoop.net <>
Mon, 5 Mar 2007 00:24:42 +0000 (19:24 -0500)
committerroot <root@deleuze.hcoop.net>
Mon, 5 Mar 2007 00:24:42 +0000 (19:24 -0500)
conf.d/auth/30_exim4-config_examples
conf.d/transport/30_exim4-config_remote_smtp_smarthost

index e696ad1..fdb35c2 100644 (file)
@@ -225,22 +225,27 @@ userdb_plain:
     }
   server_set_id = $2
 
+# this returns the matching line from passwd.client and doubles all ^
+PASSWDLINE=${sg{\
+                ${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}\
+               }\
+               {\\N[\\^]\\N}\
+               {^^}\
+           }
+
 # 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}}}\
+#   client_send = "<; ${if !eq{$tls_cipher}{}\
+#                     {^${extract{1}{:}{PASSWDLINE}}\
+#                   ^${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$2}}\
 #                 }fail}"
 # .else
-#   client_send = "^${extract{1}{::}\
-#                    {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}\
-#                  ^${extract{2}{::}\
-#                 {${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$value}fail}}}"
+#   client_send = "<; ^${extract{1}{:}{PASSWDLINE}}\
+#                  ^${sg{PASSWDLINE}{\\N([^:]+:)(.*)\\N}{\\$2}}"
 # .endif
 
 login:
@@ -249,29 +254,18 @@ login:
 .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
index 0dcb19a..b6f1131 100644 (file)
 remote_smtp_smarthost:
   debug_print = "T: remote_smtp_smarthost for $local_part@$domain"
   driver = smtp
-  hosts_try_auth = ${if exists {CONFDIR/passwd.client}\
-                               {${extract{1}{:}{DCsmarthost}}}\
-                              {}\
-                   }
-  tls_tempfail_tryclear = false
+  hosts_try_auth = ${if exists{CONFDIR/passwd.client} \
+        {\
+        ${lookup{$host}nwildlsearch{CONFDIR/passwd.client}{$host_address}}\
+        }\
+        {} \
+      }
   # to disable TLS on outgoing connections, uncomment this
   # hosts_avoid_tls = *
   DEBCONFheaders_rewriteDEBCONF