I've had IMAP-UW login problems with Apple Mail since the GM seed release.
I sat down and diagnosed the problem, last week, but never took the time to come up with a solution.
Tonight, I sat down, and with a high dose of cafine, solved the issue for me, hope this will help others...
First, the "bug".
As others have determined, Apple has changed the login in sequence from using "tag LOGIN userid userpassword" to "tag AUTHENTICATE PLAIN `base64 encoded login data'"
If you follow the RFC's, `base64 encoded login data' parameter is an encoded string with three fields as follows; `authzid\0authcid\password'
The problem, is that, Apple has choosen to supply an empty "authzid" field, so you get a `\0authcid\0password' AUTHENTICATE parameter string instead.
This in and of it's self is legal according to the RFC's, however, this exercises the bug in IMAP-UW
Second, the "fix"
The patch is a one line change, and all is well again!
Note! This is against imapd-2007e (version 404)
--- ./imapd/imapd.c 2008-11-18 12:46:59.000000000 -0600
+++ ../../../imap-2007e/src/imapd/imapd.c 2011-07-22 00:46:57.000000000 -0500
@@ -2141,7 +2141,7 @@
/* must be at least one BASE64 char */
else if (!base64mask[*ret]) return NIL;
else { /* quick and dirty */
- while (base64mask[*s++]); /* scan until end of BASE64 */
+ while (base64mask[*s]) s++; /* scan until end of BASE64 */
if (*s == '=') ++s; /* allow up to two padding chars */
if (*s == '=') ++s;
}
Recompile, and restart your imapd processes, and your good to go.