While doing some testing I found this regarding the authentication mechanism used

Giganews Newsgroups
Subject: While doing some testing I found this regarding the authentication mechanism used
Posted by:  Frank Bishop (francis12…@fairpoint.net)
Date: Wed, 14 Oct 2009

I had a problem with the outgoing emails on one of my three test email
servers. I started capturing packets with
wireshark and noticed that when I used thunderbird to send the outgoing
email it used CRAM-MD5 to authenticate,
While when I used my code it used Plain SMTP-Authentication. After
reversing the order of the SASLMechanisms
I was able to get my code to used the more secure smtp-authentication

{ Add in order of increasing security }
IdSMTP.SASLMechanisms.Add.SASL := IdSASLPlain;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLLogin;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLExternal;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLAnonymous;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLOTP;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLSKey;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLCRAMMD5;
IdSMTP.SASLMechanisms.Add.SASL := IdSASLCRAMSHA1;

Initially I found

250-VRFY
250-ETRN
250-AUTH PLAIN LOGIN CRAM-MD5
250-AUTH=PLAIN LOGIN CRAM-MD5
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
AUTH PLAIN
334
AGZyYW5jaXMxMjMxQGZhaXJwb2ludC5uZXQARHNsMTIzNDU2
235 2.0.0 Authentication successful
RSET
....

after reversing the order of adding the SASLMechanisms the
authentication changed over to CRAM-MD5

Replies

In response to

Alternate Authentication Mechanisms posted by Frank Bishop on Tue, 13 Oct 2009