August 2, 2011
OS X Lion and the Math & Stats Mail Server
After an upgrade to OS X Lion, the Apple Mail program will not be able to login to the Math & Stats mail server (math mail.mcmaster.ca / ms.mcmaster.ca). What you will see is that the OS X Lion system asking for the mail-server password again immediately after you enter your password and hit Return.
Image via Wikipedia
The problem is particular to the latest version of Mail and UW IMAP (one of the standard unix mail servers).
In the Apple discussions forums, there are three solutions which appear to work - though none of the solutions seem to be universal (for varying reasons). For OS X Lion users who connect to the Math & Stats mail server, I recommend trying solution 1 below first, and then solution 2 if the former does not work. Solution 3 is documented here for completeness; I will resort to recompiling the mail server as a last resort.
Important note re. password length: it appears that another requirement is that your ms.mcmaster.ca password be no longer than twelve characters. I have yet to verify this with another server or to have corroboration from another source, but it is most certainly the case that Lion Mail will not authenticate with mathmail unless my password has twelve characters or fewer. Before proceeding any further, change your password if it is longer than twelve characters.
1) Turn SSL off and back on
- go to Mail -> Preferences -> Accounts
- select mathmail account
- go to Advanced tab
- uncheck "Use SSL"
- close Preferences
- re-open Preferences and check the "Use SSL" box
I note that this did not work for me, though others have reported success.
2) Remove Mail Settings and Start Fresh
The following will cause of your mail settings and local mail folders to disappear (though they will be recoverable). I recommend that you contact me if you have other accounts defined of if you are at all unsure.
- quit from Mail
- open Terminal
- cd ~/Library
- mv Mail Mail.2011mmdd
- open Mail
- go through setup again; details here
This worked for me.
3) Patch UW IMAP server
An Apple Support Communities user makes a convincing case for patching the UW IMAP server code. Apparently, Apple Mail is now making a legal but heretofore rare authenticate request which omits the first first field.