Upgrading to El Capitan GM Candidate loses all Exchange folders in Mail
I fixed this by entering the passwords into Mail > Preferences > Accounts instead of Mail > Accounts (Internet Accounts in System Preferences) and it saved the passwords without any issues.