The Utter Asinine Stupidity Of Mail.app's Sudden Bouts Of Password Amnesia

I am, again, for $DIVINITY alone knows how many times, absolutely FURIOUS with . Or the Keychain. Or with . I’m not quite sure yet, but I’m pretty damn annoyed, if only because I am utterly sick and tired of doing beta-testing for them.

Out of the blue, without any syncing (it’s set to manual, and I’ll tell you why in a jiffy), any new software installs, or, in fact, any use whatsoever of my desktop machine, it has lost all the passwords to seven e-mail accounts I have configured on it, and persists in asking for them again and again, regardless of how many times I fill them in or re-launch the app.

And yes, the passwords are there on the keychain. All of them. And yes, I was foolish enough (oh, the shame! the shame!) to enable keychain syncing, but I have not synced to in ages – in fact, I have studiously avoided using anything related to it ever since I iDisk is still insecure in a few weeks back.

And yet, the idiotic, bovine sham of an application persists in asking for them repeatedly, time and again, and refusing to store them after I re-enter them, plus taking ages to quit after I try to mend its ways.

And yes, I have verified the integrity of my keychain, nuked my mail preferences and the entirety of my Library/Mail folder (attempting to derive some satisfaction from this bout of wanton, reckless destruction) and even created an entirely new keychain before embarking on the chore of setting up everything again.

If I needed further evidence of being unfinished and buggy, this violation of the law of least surprise (i.e., things shouldn’t break without warning, especially when the machine has been off for days) would be right at the top of my list.

A pox on you, !

Initial Update: Yes, yes, I’ve read this. Doesn’t work. One of the last commenters has precisely the same issue on . I’m calling it a night and hoping to have time to reinstall the machine from scratch come break. Then again, this might be a good test for (which, of course, would not work if I had this issue on my since I use FileVault on it, so I’m hoping this doesn’t spread…).

Update: The Fix, And Another (Unrelated) Cause For The Same Symptoms

In a nutshell, restoring my login keychain using fixed my problem. I have no idea why Andrew Escobar’s procedure (or creating a new keychain) failed to work, but it is possible (since kept hanging upon close) that there was something in the background ignoring my previous attempts.

So yes, it was a bum keychain. Bruno got it right. How it got damaged while the machine was powered off will, I suppose, remain a complete mystery.

Nevertheless, quite a few people pointed out a number of other possible causes for the same symptoms. Actually, the few who actually read my rant through and understood that there was no way this was a server or network problem (what with there being seven mail accounts involved and all) mostly pointed out as a likely cause.

Now, I don’t have installed on my desktop (and have yet to find a reason to use it), so that had nothing to do with my woes.

But I did have it installed on my since fiddling it on a few months back, and as such I conducted a little experiment: I tweaked services with it (removed the “Send Selection” option), and lo and behold, got exactly the same behavior.

Why? Because messes around with Info.plist file (tweaking the NSServices key in there), and that breaks the application signing (kudos to Chris Adams for posting a comment regarding that) – and that, in turn, must be causing keychain access to fail, producing the same effect as a bum keychain.

So just in case someone for this kind of problem and finds this page, you now have two possible fixes for your situation:

  • Restore your login keychain (or the entire Library/Keychains folder) from a backup
  • Restore (ideally in the same way)

This assuming you’re not geeky enough to backup its Info.plist file alone, which is what I did before messing with Service Scrubber

And now, back to our regular programming. Or some such thing.