Exception: The input is not a valid Base-64 string as it contains a non-base 64 character
Question asked by Ray Cook - 7/1/2019 at 6:34 AM
Anyone know what this means? What can cause it? No obvious issues with mail.
Seeing a lot in the logs from my own IP

Exception: The input is not a valid Base-64 string as it contains a non-base 64 character, more than two padding characters, or an illegal character among the padding characters.
   at System.Convert.FromBase64_Decode(Char* startInputPtr, Int32 inputLength, Byte* startDestPtr, Int32 destLength)
   at System.Convert.FromBase64CharPtr(Char* inputPtr, Int32 inputLength)
   at System.Convert.FromBase64String(String s)
   at SmarterTools.Common.Utilities.ConvertHelper.FromBase64(String text)
   at MailService.TcpServerLib.SMTP.SMTPSession.#Feb(String #v9i)

4 Replies

Reply to Thread
Employee Replied
Employee Post
Ray, The SMTP ProcessAuthData method is trying to parse the authentication data received but it is not in valid Base64 encoding. I would recommend opening a ticket so that we can look at the logs.  Where is the message originating from?  Have you noticed it is just with messages from that server or is it across multiple servers?
Ray Cook Replied
It appears to be originating from my desktop IP and we only have one mail server - I'll check back a few days to see if it just started to happen. But I've not noticed any local errors, bounces etc - all seems fine. It's not clear to me looking at the logs which mail account is causing this - I have 3 which could be connecting via SMTP via my mail client which is Apple Mail - no other mail client is running from my IP - I guess there is my phone and iPad  via wifi but no errors there either.
Scarab Replied

We have a large Apple user-base (90% of our user-base) and tend to see this error occur from time to time specifically from the Apple Mail app on Mac OS & iPhone/iPad. Periodically Apple releases an update to the Mail app that messes up the way it handles CRAM-MD5 authentication for passwords containing symbols (and about 6 months later they fix it and about 2 years later screw it up again...a cycle ongoing since about 2001).

Since it is a good thing to have a symbol in your password you probably shouldn't just change your SmarterMail password to one that does not include one (although we have verified in 100% of cases this has happened in that it resolves the issue immediately).

The better solution is to set your Apple Mail app to use PASSWORD authentication instead of CRAM-MD5 authentication. This also resolves the error 100% of the time in the cases we've had.
Ray Cook Replied
tx for this answer. i'll try this

Reply to Thread