If it's asking for the Keychain passsword, and the keychain is the core of OS X security. The keychain is where all passwords and digital certificates and related materials are stored. It is not related — at all — to the mail server passwords. Rather, it's where the mail server passwords are stored.
If the keychain password is not the same as the login password for the account, then it's either the old password (prior to a password reset), or the keychain will probably need to be reset and the keychain rebuild and passwords and such re-entered.
There is intentionally no way to recover the keychain password so — if you don't know what the keychain password is — then you're left to wipe and reset the keychain.
If there is no user keychain, you'll probably want to recreate that within the Keychain Access tool.
If the mail server is asking for a mail server password, then there's either an error in what was specified or — as is often the case with the no-support "free" mail servers — there's something wonky with the mail server setup, or with what you're entering. Yahoo has apparently tended to have somewhat of an odd set-up, and there are some discussions around the forums of set-up issues with that service. (I long ago decided to have a domain of my own hosted for mail, and stay away from the free services. That for various reasons.)
O.k. the note that comes up is; mail wants the"login" keychain. I tried all i can think of. Again, this is on the users side only.
I CAN get mail, I did a test with someone , and it worked, both ways. It just keeps asking also for the mail password, and I have to put that in about 2-3 times . No passwords or keychains are set in the keychain acess.
By way of introduction, you have your own login keychain, which is where OS X stores your own passwords and your own certificates, your secure notes, and related — and that keychain has a password. The default password for your login keychain is your login password, but that's not a requirement.
There are cases I've encountered where a password change didn't (also) change the keychain password, and you had to use the old password to access the keychain and change the password there; here is a related support note.
Each separate login has its own keychain, with its own password, etc.
If the keychain password is not the login password for the target account, then the account or the keychain has a problem, and — if you cannot remember the old password — you will have to recreate the keychain using the Keychain Access tool. Here is the Keychain reset sequence.
Here is a very quick overview of the Keychain, from the developer documentation. (The developer documentation will get dense, but that particular section has a concise overview of what Keychain provides.)
And FWIW, reentering a password repeatedly is how you get locked out. With various security systems, that sort of repeated activity will potentially even lock you out if (when?) you do remember the correct password.