Imaps login failure

0 votes
asked Jun 24, 2010 by Diego (120 points)
edited Aug 10, 2010

Hi all, i'm trying rebex library. When using ImapBrowser sample (or ImapConsoleClient) in Implicit Security mode, i can connect with almost all servers but one, thath respond ERROR 119 invalid user or password err 2 (NO). User and password are correct, as i can connect via web mail and mailbee libraries too. Any suggestion, plz? Thx Diego

Applies to: Rebex Secure Mail
commented Jun 24, 2010 by Lukas Pokorny (124,570 points)
Please check out, add logging capabilities to one of the samples and produce a log showing this error. Then mail the log to us ( or edit your question to include it. We should be able to tell more then.
commented Jun 24, 2010 by Lukas Pokorny (124,570 points)
Explicitly specifying an authentication method in the Imap.Login call might help - it is possible that default one doesn't work on this server and using a different method might be a usable workaround.
commented Jun 28, 2010 by Lukas Pokorny (124,570 points)
Is there any news on this? Have you been able to solve this or produce the communication log?
commented Jul 2, 2010 by Diego (120 points)
Thx, we have purchased source, and debugging at login function, we found that in standard sequence, the library (imap.cs line 2534) execute first the line if (Array.IndexOf(_authTypes, ImapAuthentication.CramMD5, 0, _authTypes.Length) >= 0){ LoginInternal(userName, password, ImapAuthentication.CramMD5, null); return; and in log we read: Response: R00002 NO ERROR 119 invalid user or password err 2 but if we move ahead the line if (Array.IndexOf(_authTypes, ImapAuthentication.ClearText, 0, _authTypes.Length) >= 0) the login is OK. Is it a Server issue? Thx Diego

1 Answer

0 votes
answered Jul 5, 2010 by Lukas Pokorny (124,570 points)

Based on the latest comment, I would say it's indeed a server issue. The server announces support for CRAM-MD5 authentication method, but when the client actually tries using it, it fails. The server should be either fixed or configured not to announce CRAM-MD5 support.

Rebex IMAP prefers CRAM-MD5 to ClearText because it's slightly more secure. To work around this issue, you don't need to modify any source code, just call the following variant of the Login method to force ClearText authentication:

imap.Login(userName, password, ImapAuthentication.ClearText);