Agree, I have exactly the same problem on 4 mail accounts that worked flawlessly until I upgraded my MacBook to Lion.
I hope it goes away with updates or installing Mountain Lion, I have the same problem as Maurizio, this MacBook is my hub, but I am finding it intensely irritating to have to enter long, 4 complex passwords every 5 minutes.
I recently got my MacBook Pro (16G of RAM), OSX 10.7.4. Mail 5.3 and spent many hours trying to fix a problem with Mail to synchronize with my Gmail, where I have over 20000 messages, 5G. Apple care was useless, they claimed it's a slow internet connection, but I believe it's a problem with Mail, which crushes when it gets some many messages. I fixed it hard way:
1. Wait until downloaded 2-3 thousand messages
2. Take all accounts offline
3. Quit and restart Mail
4. Remove old messages which were retrieved (or, move them to local folders), in chunks of no more than 600 messages. Then go to 3 until all old messages are gone from the Inbox, then Quit and restart Mail
5. Take accounts online and go to step 1.
After several rounds, it's OK, and synchronizing with iCloud. Apple should know that Mail 5.3 has issues.
Dear all, thanks for your feedback. Unfortunately none of the suggested solutions worked. My system administrators claim that the problem is due to a change in protocols which requires to update our mail servers software (which seems to be supported by other online discussions); obviously in a large University this is not a frequent routine and they are not willing to update unless stronger reasons come up.
The bottom line is that I still cannot use Mail and I had to revert to another mail program, which is quite annoying to me since on my other machines with older OSX I still use Mail and the two programs tend to organize things differently.
I only wish to let Apple know that this sort of issues are those that keep users to update to the newer OSX releases: how can I be sure that the basic software will work under the new OSX? Any software should be fully backward-compatible or, if it cannot be for security reasons or company policy, the limitatins should be well documented!
Apple, hope you realize that the Academic community is the one that endorsed your products when they were not so widespread, and you should pay more attentn to its requests...
I too have tried all the suggestions so far in this post. I just tried something new. I thought maybe the problem isn't with the Mail client, but with the services. For example, I've had that problem with my new Mac, ever since I switched to the 2012 release of the MBP13.
So I went to online to the mailbox, and went to options. (In this case, it was the Windows Live account.)
Sign in > (top right corner) Options > More Options > (Managing Your Account) POP and deleting downloaded messages > Do what my other program says-if it says to delete messages, then delete them.
Now that, and making sure the Mail client isn't checking too often for new messages, should quell the issue IMO.
As far as Yahoo goes, they are charging US$20 per year for "POP" features. So I think that will remain a problem unless you want to spend that 20 bucks.
This is just a fix I tried. I don't know if it'll work for everyone, but it has been working for me for about 48 hrs now.
I have had this/similar problem through Lion and now with Mountain Lion (new computer, NOT migrated so 100% clean).
Mail runs fine checking accounts every 5 mins. Then every few days an account will require me to enter a password. If I do it works. If I cancel, take account back online and try again it continues to fail. If I exit mail and re-run immediately then it works for a few days more. So (in my case) it does not look like the mails server but something in mail itself.
(Never had the problem with Leopard nor Snow Leopard - and the 1st computer went Leopard->Snow Leopard->Lion (where the problem started). Mountain Lion is a new machine and everything was manually re-entered NOT ported across. Problems only on POP/SMTP (but I only use one IMAP account).
I have the same problem with Mountain Lion (new mcBook Pro, migrated from Lion). Most same as DeimosL had.
Mail runs fine checking accounts every 5 mins. Then every few days an account will require me to enter a password. If I do it works. If I cancel, take account back online and try again it continues to fail. So (in my case) it does not look like the mails server but something in mail itself as well.
errors seem random on different IMAP accounts.
I have the same problem as maurizioplll
I got a new iMac running Lion, and the mail account (which is my University's server) works, but it freezes about once every hour. The only fix is to force quit mail, then reopen it. When it re-opens, the messages that I have already sent pop us as incomplete pages, though when looking in the sent mail box, it is clear that they have already been sent.
Total mess. I have double, triple and quadrupled the settings, and as with maurizioplll,the account settings have been the same for many years anyway.
I am becoming increasingly concerned with the level of quality control at Apple.
OSX 10.8.5 as at 19 Oct 2013
I too have had these "wrong password" OSX Mail errors for more years than I can remember, could even be ten years or more. As someone has said above, Apple gives a one-size-fits-all error response regardless of the nature of the error, whether local client (i.e. OSX Mail) or remote server (e.g. Apple or Gmail or Other); that error response being to say that the user has entered an incorrect password, when in fact the currently saved password has been working perfectly prior to this error.
Examination of the key chain entry also shows the password to be correct.
Sometimes re-entry of the password in to the offered error dialogue will work, but in my opinion this is mere co-incidence with the underlying cause having been resolved by the local or server system.
To compound the diagnostic problem some years ago there was a problem with key chain forgetting passwords - or to be more precise being corrupted. That problem seems these days not to recur, unless there are other data corruption issues on a particular computer, but that will usually be apparent through many issues arising where email failures are just one issue, as opposed to being the only one.
POP implementations used to work such that the account would accept only one login at a time, and an attempt at simultaneous email client login would result in a ten minute lockout. Meaning all email client attempts to log in would be refused for the next ten minutes. These days we have also "manual" online login availability, which seems to allow login regardless of email client logins. I have suffered this with OSX Mail (so not Apple's issue, aside from the unhelpful and misleadingly cryptic response.)
Another cause of login blocks is where the server system has a defence feature that automatically blocks an ip address after an administrator set number of failed logins; this can be automated or not and can be permanent or timed, such that further attempts are allowed after a cooling off period, whether minutes, hours or days. I have suffered this with OSX Mail (so not Apple's issue, aside from the unhelpful and misleadingly cryptic response.).
Servers often use RBLs (i.p. Block lists) such that if someone else in your i.p. range engages in activity that results in your i.p. address being blocked because it is on a block list (or indeed you do!) then again I have suffered this with OSX Mail (so not Apple's issue, aside from the unhelpful and misleadingly cryptic response. In this case it was my entire ISP who was black/block listed and I was innocent collateral damage - another story still on the internet somewhere. I have suffered this with OSX Mail (so not Apple's issue, aside from the unhelpful and misleadingly cryptic response). How long it takes to get off such lists can vary - having full time administrators will mean immediate attention and hopefully resolution.
The server might be suffering an "outage". In other words it has fallen off the internet. A month ago I had no mail for two days because a raid ten system lost three drives, server side. OSX mail's response was that my local password was wrong.
The internet might be slow. Used to be that when the kids across the USA came home from school, everything slowed down (probably was time we went to bed anyway). Result was email time-outs resulting in "your password is wrong" errors. These days I think everyone is online 24/7 so this is less evident as an issue. However, slow downs do still happen and we have DDOS attacks, which slow down both the targets and the net generally and maybe your computer if it has become a mule.
The local network may itself have all or any of the above; indeed someone may have simply pulled a plug somewhere or router or switch may be sorting itself out, or need a reset; same result: bad password OSX Mail dialogue.
and so on, most of these are resolved by clicking cancel in response to the bad password dialogue and coming back later - after someone else or something else has fixed the(ir) problem, which isn't our problem, we just have to suffer the consequences for a while.
More recently l moved from POP to IMAP and then back to POP because my servers didn't like frequent multiple IMAP logins - repeated password wrong dialogues, over and over and over again.
Now I have moved to IMAP again and reduced the frequency to hourly on one machine and manual on another. The hourly one I use manual if I want a quick instant check. I have not yet understood how IDLE works, except that it has to do with dropping the connection to the server when things are idle (presumably no activity).
I'd say my most common cause of bad password dialogue has been wrong port numbers; incoming 143 instead of 993 and on the outgoing side having other than (Custom) 465, so relyiing on the automatic (25,465,587). Both these being where SSL is ticked - or needs to be.
If set to SSL with correct port numbers check the server actually supports SSL and on those ports (administrators can use other ports if they want to, this will be more likely in enterprise/academic locations).
My most recent bad password dialogue was just now.. server doesn't like how many IMAP accounts I have collecting simultaneously and OSX Mail has only one mail collection frequency setting which it applies to all accounts at the same time - yes Apple could address that I guess. Maybe a pref file somewhere can be edited, but that's above my pay grade.
When I set out to make my above reply (which I can no longer edit or I would have added this text) I had no intention of it being so long. Upon reading it through I decided to head off and check the settings on my own servers - something most users cannot do.
To my pleasant surprise I found quite a few settings I have now changed, to increase the resources available to process simultaneous email logins from the same ip address. In other words, my OSX Email clients, on two Macs, both running multiple IMAP accounts, in fact create quite a large number of processes all from the same ip address, bearing in mind this will be seen by the server as my WAN (external internet) ip address, not my local LAN (internal network) ip addresses which are of course different from one computer to the next.
So let's say you have two dozen students on their own LAN, seen as one ip address by the server, that could quite easily exceed the settings set in the expecttion of each ip address representing only one user. JUST MY PRIVATE VIEW there, I hasten to add. I wonder if PCs respond differently to this issue, so only mac users see it the way that we do (i.e. Bad Password dialogue).
Where in an academic environment and where a user has multiple machines running the same email addresses to collect multiple copies of that email address' emails, I cannot help wondering if some of the academic environment issues may (MAY!) be capable of being eased by changes in mail server settings.
Again, none of this is Apple's problem, apart from that infuriatingly misleading bad password prompt. It even says the same in connection doctor.
There is a LONG TIME issue with Apple Mail from way back in the beginning of OSX and still in Yosemite where for IMAP accounts that aren't Apple, gmail, yahoo, etc - your own ISP, Mail will routinely ON ITS OWN change Authentification in the Outgoing Mail Server Settings FROM "Password" to "MD Challenge Response" - I have no idea WHY it does this, but it does often.
So whenever I have a Mail issue of any kind, especially asking for a password, I look and viola! That stupid MD Challege Response has magically reappears. I change it back to "Password" and issue is solved. I wish I could tell how to make this not happen, but its a deep rooted Apple Mail bug.