Issue in imap communication with Exchange server

Hello @fhediger,

Thank you,
we have added this information to the ticket and will continue to investigate this issue.

Hello @fhediger,

We have added CredentialsEncoding support to the AUTHENTICATE command.
Could you check the issue on your side using the hotfix

ImapClient client = new ImapClient(..

Hi @sergey.vivsiuk

I tried your fix, unfortunately it didn’t work. I don’t think the imap.log is of any use, as it shows only “AUTHENTICATE PLAIN ****” and that authentication fails.

Did you verify that your base64 auth string matches the one generated by my command?

echo -en "\0<username>\0<password in utf8>" | iconv -f utf8 -t iso8859-1 | openssl base64


Thanks for your feedback. Our developers will investigate the issue and contact you asap.

Hello @fhediger,

Yes, the base64 auth string for “AUTHENTICATE PLAIN” matches the generated by command:


For the test I used the following test data (user “uö”, password “pö”):

echo -en "\0uö\0pö" | iconv -f utf8 -t iso8859-1 | openssl base64

Please note that the IMAP test also uses “iso8859-1” encoding:



We have added an ImapClient debug option to show credentials in the log:


try (ImapClient client = new ImapClient(
        SecurityOptions.SSLImplicit)) {
} hotfix release


Thank you, I will try this again with the credential Log! :+1:


I tested again and now it works! But to be honest I think that was a problem on my end. I think I packaged an old jar by mistake. Sorry for that.

It works now with the iso-8859-1 encoding (it works with iso8859-1 or iso-8859-1).

So thank you for all the quick responses and fixes :pray:


Thanks for the feedback, we’re glad it worked out for you.