Re: [Exim] AUTH LOGIN PLAIN and old e-mail clients

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Robert Heron
Fecha:  
A: Phil Brutsche
Cc: exim-users
Asunto: Re: [Exim] AUTH LOGIN PLAIN and old e-mail clients
> Robert Heron wrote:
> > ...
> > 250-AUTH=LOGIN PLAIN
> > 250-AUTH LOGIN PLAIN
> > ....
> >
> > which differs from mine at the line: 250-AUTH=LOGIN PLAIN which is an
> > additional one.
> > Maybe the old client programs pay attention to this line and

authenticate
> > only when received such line in answer to their EHLO command?
>
> Right on the money.
>
> I have an old patch (from the 3.3x days) that adds AUTH=LOGIN to the
> EHLO response in order to support SMTP AUTH for ancient broken clients.
> It will need to be updated for Exim 4.2x, of course. You should be
> able to find it in the list archives; if not, I *think* (no guarantees)
> I still have it laying around someplace. It's been a while since I've
> had to support OE 4, and it may have gotten lost in an accidental "rm
> -rf" or two since I switched to Exim 4.


I've just made a little dirty patch to exim-4.23, but it works well :))
It should also apply to exim-4.24 since the smtp_in.c file is the same as in
exim-4.23.

Regards,
Robert Heron


*** smtp_in.c Thu Oct 23 12:32:17 2003
--- exim-4.23/src/smtp_in.c Thu Oct 23 12:32:04 2003
***************
*** 2368,2400 ****
          if (verify_check_host(&auth_advertise_hosts) == OK)
            {
            auth_instance *au;
!           BOOL first = TRUE;
!           for (au = auths; au != NULL; au = au->next)
              {
!             if (au->server && (au->advertise_condition == NULL ||
!                 expand_check_condition(au->advertise_condition, au->name,
!                 US"authenticator")))
                {
!               int saveptr;
!               if (first)
                  {
!                 s = string_cat(s, &size, &ptr, US"250-AUTH", 8);
!                 first = FALSE;
!                 auth_advertised = TRUE;
                  }
!               saveptr = ptr;
!               s = string_cat(s, &size, &ptr, US" ", 1);
!               s = string_cat(s, &size, &ptr, au->public_name,
!                 Ustrlen(au->public_name));
!               while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]);
!               au->advertised = TRUE;
                }
!             else au->advertised = FALSE;
              }
-           if (!first) s = string_cat(s, &size, &ptr, US"\r\n", 2);
            }
          }
-
        /* Advertise TLS (Transport Level Security) aka SSL (Secure Socket
Layer)
        if it has been included in the binary, and the host matches
        tls_advertise_hosts. We must *not* advertise if we are already in a
--- 2368,2411 ----
          if (verify_check_host(&auth_advertise_hosts) == OK)
            {
            auth_instance *au;
!           int i;
!           BOOL first;
!           BOOL one = TRUE;
!
!           for (i = 0; i<2; i++)
              {
!             first = TRUE;
!             for (au = auths; au != NULL; au = au->next)
                {
!               if (au->server && (au->advertise_condition == NULL ||
!                   expand_check_condition(au->advertise_condition,
au->name,
!                   US"authenticator")))
                  {
!                 int saveptr;
!                 if (first)
!                   {
!                   s = string_cat(s, &size, &ptr, US"250-AUTH", 8);
!                   first = FALSE;
!                   auth_advertised = TRUE;
!                   }
!                 saveptr = ptr;
!                 if (i==1 && one==TRUE) {
!                   s = string_cat(s, &size, &ptr, US"=", 1);
!                   one = FALSE;
                  }
!                 else
!                   s = string_cat(s, &size, &ptr, US" ", 1);
!                 s = string_cat(s, &size, &ptr, au->public_name,
!                   Ustrlen(au->public_name));
!                 while (++saveptr < ptr) s[saveptr] = toupper(s[saveptr]);
!                 au->advertised = TRUE;
!                 }
!               else au->advertised = FALSE;
                }
!             if (!first) s = string_cat(s, &size, &ptr, US"\r\n", 2);
              }
            }
          }
        /* Advertise TLS (Transport Level Security) aka SSL (Secure Socket
Layer)
        if it has been included in the binary, and the host matches
        tls_advertise_hosts. We must *not* advertise if we are already in a