Where does Mail keep its configuration files? I had to replace my hard drive and don't have a backup. I do have a copy of my home folder on an external disk but it was a simple copy/paste job.

I've been dragging my stuff from that disk to my new drive but I don't know where to look for Mail.app account configuration data. I need to recover the server name, username and password for one of my accounts.
Mail.app stores server credentials in your login keychain. You will find your login keychain in: ~/Library/Keychains/login.keychain

Copy, rename, and open this keychain file with Keychain Access. Keychain Access is included with Mac OS X in the Applications > Utilities folder.

Within the Keychain Access application, search for your mail server using the search field at the top-right.

To retrieve a password, double-click on the item and enable Show password:.