Re: Problems with SASL and TIdSASLLogin

Giganews Newsgroups
Subject: Re: Problems with SASL and TIdSASLLogin
Posted by:  AncientDreamer (..@think.not)
Date: Tue, 23 Nov 2004

Sorry to nag, but ..... anyone? Please? :-)

(Is there someplace else I should post this?)


"AncientDreamer" <…@think.not> wrote in message
> Hello.
> I just dicoverered Indy's SASL last night, so my lack of understanding may
> very well be the root of my problems.
> I'm using Indy 10.0.52, by the way
> I'll illustrate using a small example that is close to what the Indy FAQ
> says on the subject:
> I drop TIdSMTP, TIdUserPassProvider and TIdSASLLogin on a form and set up
> the neccessary links between them, as well as Id/Pwd for the
> UserPassProvider. The SMTP AuthType is set to atSASL.
> I then load a mail message into a TIdMessage and do a connect to the
> which seems to work.
> Next, I do a IdSMTP1.Send(msg); and this always generates an exception in
> unit IdSASLCollection:
>      for i := Count - 1 downto 0 do begin
>        if Assigned(Items[i].FSASL) then
>        begin
>          if LSupportedSASL.IndexOf(Items[i].FSASL.ServiceName) >= 0 then
> begin
>            LS := LSASLMechanisms.Add;
>            LS.SASL.Assign(Items[i].SASL);
> <------------------------------------- Here
>          end;
>        end;
>      end;
> Adding other SASLmechanisms to the collection works, but that's most
> because their ServiceNames don't trigger the Assign statement.
> Any input on this will be appreciated.
> As a follow up question: Is there a recommended sequence of SASL
> to set up, since I have no idea what servers the users will connect to?
> Currently I have:
>        (SASLLogin)
>        SASLplain;
>        SASLAnonymous;
>        SASLskey;
>        SASLCRAMMD5;
> Cheers,
> AD



In response to

Problems with SASL and TIdSASLLogin posted by AncientDreamer on Wed, 17 Nov 2004