[Exim] Outlook Hack in Exim 4?

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Langer
Data:  
A: exim-users
Assumpte: [Exim] Outlook Hack in Exim 4?
Hello Philip,

on Jan 26 Oscar Martmn posted a patch for SMTP Authentication with
Outlook 4 on this list, dealing with AUTH=LOGIN (notice the =)which is
expected by Outlook.

I now discovered that Outlook 2000 seems to have the same problem:
a customer couldn't get Outlook 2000 with SMTP AUTH and Exim working,
and without him changing anything (we checked the configuration before,
everything was ok) it worked when I had patched this Outlook 4 hack
into Exim.

Therefore I think, this is important for many people using Exim.
Could you add this to Exim 4? Attached is a diff on Exim 3.31.

Thanks,
Marc
diff -u -r exim-3.31/src/globals.c exim-3.31a/src/globals.c
--- exim-3.31/src/globals.c    Mon Jul  2 11:46:43 2001
+++ exim-3.31a/src/globals.c    Sat Jul 14 20:31:14 2001
@@ -37,6 +37,7 @@


 #ifdef HAVE_AUTH
 BOOL   auth_always_advertise  = TRUE;
+BOOL   auth_hack_outlook4     = FALSE;
 char  *auth_hosts             = NULL;
 #ifdef SUPPORT_TLS
 char  *auth_over_tls_hosts    = NULL;
diff -u -r exim-3.31/src/globals.h exim-3.31a/src/globals.h
--- exim-3.31/src/globals.h    Mon Jul  2 11:46:43 2001
+++ exim-3.31a/src/globals.h    Sat Jul 14 20:31:14 2001
@@ -23,6 +23,7 @@


 #ifdef HAVE_AUTH
 extern BOOL   auth_always_advertise;  /* If FALSE, advertise only when needed */
+extern BOOL   auth_hack_outlook4;     /* If FALSE, advertise only when needed */
 extern char  *auth_hosts;             /* These must authenticate */
 #ifdef SUPPORT_TLS
 extern char  *auth_over_tls_hosts;    /* These must use TLS for AUTH */
diff -u -r exim-3.31/src/readconf.c exim-3.31a/src/readconf.c
--- exim-3.31/src/readconf.c    Mon Jul  2 11:46:45 2001
+++ exim-3.31a/src/readconf.c    Sat Jul 14 20:31:14 2001
@@ -39,6 +39,7 @@
   { "always_bcc",               opt_bool,        &always_bcc },
 #ifdef HAVE_AUTH
   { "auth_always_advertise",    opt_bool,        &auth_always_advertise },
+  { "auth_hack_outlook4",       opt_bool,        &auth_hack_outlook4 },
   { "auth_hosts",               opt_stringptr,   &auth_hosts },
 #ifdef SUPPORT_TLS
   { "auth_over_tls_hosts",      opt_stringptr,   &auth_over_tls_hosts },
diff -u -r exim-3.31/src/smtp_in.c exim-3.31a/src/smtp_in.c
--- exim-3.31/src/smtp_in.c    Mon Jul  2 11:46:45 2001
+++ exim-3.31a/src/smtp_in.c    Sat Jul 14 20:31:14 2001
@@ -2249,7 +2249,9 @@
         if (advertise)
           {
           auth_instance *au;
+          int s_auth;
           BOOL first = TRUE;
+          s_auth=ptr;
           for (au = auths; au != NULL; au = au->next)
             {
             if (au->server)
@@ -2267,7 +2269,15 @@
               while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]);
               }
             }
-          if (!first) s = string_cat(s, &size, &ptr, "\r\n", 2);
+          if (!first)
+          {
+            s = string_cat(s, &size, &ptr, "\r\n", 2);
+            if (auth_hack_outlook4)
+              {
+              s = string_cat(s, &size, &ptr, s+s_auth,ptr-s_auth);
+              *(s+s_auth+8)='=';
+              }
+            }
           }
         }
       #endif