So I've configured my mail using a profile. I have setup 3 mail accounts, but each time I launch Mail, it asks me for the passwords of all those accounts. The first time I thought: maybe that's a bug in Mail when mail accounts are configured using profiles. Unfortunately, that doesn't seem to be the case: it prompts me to enter the password for all 3 accounts, and it doesn't stop. When I enter it, it just asks me for the passwords of the other accounts, and then it asks for the first one again, etc., etc.
When I go to the Preferences, I can see that the passwords are indeed not entered. It can only connect to one(!) SMTP server (that's what Connection Doctor says).
What is causing this and how can it be solved?