None of the checkboxes was checked for login keys. I did see another thread on this forum that suggests this is not an isolated problem and that it may be a bug in Mail.
What I don't understand is why it's only so annoying for Yahoo IMAP. I have two otheremail accounts (Google and Hotmail/Outlook) that are fine. I've been asked 3 times for my Yahoo IMAP password in the last 15 minutes.