Mail slow authenticating to Yosemite server
I'm running mail on a Yosemite server, and Mac Mail client on Yosemite. With the "Activity" window open on the Mail client, I see two copies of "Communicating with server: Authenticating" a lot. On the server /Library/Logs/Mail/mail-err.log is filled with lines:
Nov 06 10:58:06 auth: Error: od(simon,192.168.0.29,<MuZNkS4HfQDAqAAd>): Credentials could not be verified, username or password is invalid.
Nov 06 10:58:06 auth: Error: od(simon,192.168.0.29,<MuZNkS4HfQDAqAAd>): authentication failed for user=simon, method=DIGEST-MD5
Nov 06 11:00:12 auth: Error: od(simon,192.168.0.29,<suuzmS4HggDAqAAd>): Credentials could not be verified, username or password is invalid.
Nov 06 11:00:12 auth: Error: od(simon,192.168.0.29,<suuzmS4HggDAqAAd>): authentication failed for user=simon, method=DIGEST-MD5
Nov 06 11:00:18 auth: Error: od(simon,192.168.0.29,<BLfTmS4HhADAqAAd>): Credentials could not be verified, username or password is invalid.
Nov 06 11:00:18 auth: Error: od(simon,192.168.0.29,<BLfTmS4HhADAqAAd>): authentication failed for user=simon, method=DIGEST-MD5
Nov 06 11:00:28 auth: Error: od(simon,192.168.0.29,<okUwmi4HhgDAqAAd>): Credentials could not be verified, username or password is invalid.
Nov 06 11:00:28 auth: Error: od(simon,192.168.0.29,<okUwmi4HhgDAqAAd>): authentication failed for user=simon, method=DIGEST-MD5
In the Server Mail settings, I have "Authenticate Using" set to "Local Users" (which checks the "Digest (CRAM-MD5)" and "Digest-MD5" boxes).
On the client, in the Mail IMAP settings for the account I have selected (picking what I think will be relevant) "Automatically detect and maintain account settings", "Port: 993", "Use SSL", "Authentication: Password" and "Use IDLE command if server supports it". I have NOT selected "Allow insecure authentication". I have previously selected "Authenticaion: MD5 Challenge-Response", but it seems to revert to "Password". I have an iPad and iPhone, both of which have "MD5 Challenge-Response" set, and don't appear to generate anything in mail-err.log
Mail from the Yosemite client works, it is just a bit sluggish. Under Mavericks new messages seemed to arrive simultaneously on all three clients, but now they hit iOS first.