I haven't tested this but I'm pretty sure that it will work:
1. Setup Mail as normal and enter all the passwords that it asks for then check everything is working correctly by quitting and relaunching Mail then exit Mail.
2. Launch Keychain Assistant
3. Create a new keychain, lets call it "Mail"
4. when prompted for a password for Mail.keychain enter the master password that you wish to use whenever you open Mail
5. go to the settings for the newly created keychain and make sure that "Lock when sleeping" is enabled and set "Lock after x minutes of activity" to a time that suites you.
6. Click on the default keychain (usually named "login")
7. Sort the keychain items by "Date Modified" and drag all the keychain items that are for mail from the login keychain to the newly created "Mail" keychain.
8. click the lock icon under the "Mail" keychain and make sure that its locked.
9. Exit keychain Assistant
10. Launch mail - you should be presented by a dialog which asks you for the password for the Mail keychain - enter it and your mail should now be working.