EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SMTP-client authenticate for AUTH PLAIN

Posted: 06/09/2015 07:14:53
by Hans B├Ącklund (Standard support level)
Joined: 04/22/2013
Posts: 4

I have a problem with authenticating using AUTH PLAIN.
I have disabled SASL (CRAM-MD5, DIGEST-MD etc) due to problems with some smtp-servers when these were active so now I'm back to AUTH PLAIN and AUTH LOGIN.

The code (TElSMTPClient.Authenticate) takes PLAIN first when both are available.

My problem is that there is some differences in what the server thinks is the authentication-id.
For example GMail uses "Username + #0 + Username + #0 + Password" (Base64-encoded of course) just as the function "EncodeUsername" does, so GMail works fine.

Some other servers like Apple Mailserver (Postfix?) uses "Username + #0 + Password" (Base64-encoded of course) and because of this returns 535. Saying that the authentication failed.

Is there no standard for AUTH PLAIN? Or am I missing something here?

Is there any way around without modifying the SBB-code?
(A solution like "EHLO"/"HELO" in the Login-function ought to work, I think.)

Trying to implement an smtp-client that works with any smtp-server seems to be impossible without asking the enduser questions he/she doesn't understand. How does mail-clients solve this, trial and error?

Best regards /Hans B├Ącklund
Posted: 06/09/2015 08:02:21
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

According to the standard the approach implemented in our code is correct. However we've just added a workaround for your case.

You are welcome to test it. I'll create a Helpdesk ticket for you and post improved source file there.



Topic viewed 545 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!