Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

IMAP for my office e-mail has stopped working

After upgrading from Snow Leopard to Lion, IMAP to my office e-mail has stopped working in Mail.app. My g-mail and other organisation IMAP services are still functioning fine.


Asking around the office, this seems to be a common problem with Lion. Any ideas?


Many thanks.

Mac OS X (10.7)

Posted on Jul 20, 2011 6:56 AM

Reply
28 replies

Aug 1, 2011 6:47 AM in response to swiftorific

I too have this problem on a new Macbook Air with Lion. I cannot log into my imap account using SSL (port) 993. I keep getting asked for the passord and it keeps getting rejected. Turning SSL OFF and then back ON doesn't work. I run Mailserve for my mailserver and can log in fine using Snow Leopard on a MacPro, Macbook, 2 Mac Mini's and my iPod. Using SSL for the SMTP server and MD5 Challenge-Response for Authenticaion works fine. I had to turn SSL off in Mailserver (port 143) to get my mail.


This is such a problem for me I'd be installing Snow Leopard on the Macbook Air if it was possible.


Big thumbs down on Lion for me!

Aug 29, 2011 1:10 PM in response to swiftorific

All, I believe I have resolved this problem with the help of Apple's engineers. They have been very helpful. I have tested and I can now receive IMAP messages immediately instead of having to restart Mail. Steps to take:


1. quit Mail


2. make a copy of your /Users/~/Library/Mail folder (save to desktop as a backup)


3. remove the following files from /Users/~/Library/Mail


com.apple.mail.plist

Envelope Index


4. restart Mail


note: this basically wipes out mail as if it is a new reinstall


note: I removed LetterOpenerPro and reinstalled after this, but I don't believe it was a factor in the resolution. Hope this works for you (much kudos to Apple support!).


note: during testing, I created a new user account in Lion and the Mail app work properly. I had to make the changes above to make it work for my normal user account.

Nov 16, 2011 11:37 AM in response to swiftorific

Solved!


For any of you experiencing connection issues with IMAP and Lion it has nothing to do with Mail preferences, recompiling IMAP Server or so.


This is a Mail.app bug, i've just waste all day at the office trying to sort this out: using tcpdump, connecting to the server using openssl, etc.


Mail.app tries to use AUTH PLAIN if available on the server, according to the RFC, this command must be followed by a base64 hash which it's total length must be divisible by 3. This hash is just a base64 encoding of our username and password.


So... the problem is that Mail.app does not add the necessary padding to this username + password so the hash length is divisible by 3.


So... how to just solve the problem??? Just change your password's length!! Add one or two character's (depending on your username and password length) so the base64 hash is divisible by 3. I found this solution by connecting to my imap server using openssl in the terminal by adding the padding manually.


Hope you find this usefull, I'm filing this as a bug so apple fixes it for any password/username length.

IMAP for my office e-mail has stopped working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.