Have you been unable to verify account name or password on High Sierra, or changed your keychain password recently and then had issues with Apple mail and other services such as Linkedin, Google, Flickr, Vimeo? I have had exactly this situation and I solved it with a quick fix that will save you a lot of time.
Changed your keychain password recently? It may have wiped your passwords in Internet accounts
Recently I upgraded to High Sierra - the Apple OSX released in August 2017 and all appeared to go well with the upgrade - it certainly looks fresh. During the install a new security check came up - apparently, you cannot have the same password for your Mac log-in and your iCloud log-in. I was not expecting this so didn't have my 1Password available on my iPhone to help generate a new one so I muddled through and thought I would change that again later. When I opened Apple Mail all my email accounts failed to connect - all were asking for the password. I have quite a few email accounts for different side projects and luckily I have the password all stored in 1password. However, none of the passwords would verify. I checked online webmail for a couple and the password worked just great so it wasn't that.
I got onto Apples very responsive and helpful help desk, who in turn asked me to do safe restarts and other things but nothing would change so they asked me to reinstall High Sierra. Several hours later (rural broadband...) I had the Mac back up and running and all seemed to be ok. I was able to get emails and life was back to happy.
That was until I shut down the Mac a few days later. On rebooting it I was back to square one when the OSX asked me to reenter my password for Google services - I immediately checked Mail and sure enough none of the accounts were connecting - same 'Unable to verify account name or password' issue yet again.
This time I was not going to reinstall the OSX - I'd had this issue years ago and had solved it then but could not remember what I did - just remembered it was simple but not obvious. After a lot of trial and error, I found the solution and am writing it up as much for myself as for anyone else who runs into the same issue. here you go:
How to recover your OSX Mac Mail and Internet Accounts from the 'Unable to verify account name or password' issue.
Open System Preferences and then Internet accounts. You will have a list of your email accounts and other internet services on the left.
For account where you have your own server:
Click on your account and a few seconds later you get the popup asking for your password. Press cancel here as nothing you enter will validate. Once you have cancelled you will see the Mail account details:
Please note the password field is blank - enter your account's password here and then press the tab button to move the focus out of the password field - the system will then check the account and password and if you have the correct password it will validate. Do the same for each email account. Easier than reinstalling OSX...
For accounts like Google mail, Facebook, Linkedin etc I deleted the account and created a new one.
So it looks like the keychain is used to validate your password - and because I had changed my login password, all the passwords stored for those accounts had been deleted. This is a very frustrating bug in OSX and I would have expected better from Apple but it may be an edge case that rarely happens and other factors may be at play with keychain keeping us secure.