Hey there @michaelmandint, I think I might have a part of your request already covered in my use case…
I have one authentik account which is able to login to multiple different mailboxes
The mailbox creation works automatically since mailboxes are automatically created by mailcow when a “new” user registers, the trick with my project is basically that it edits the email claim (I think, long time ago) then mailcow sees “Aha this one doesn’t exist and it is a valid user” so it creates a new mailbox for that new email, then my program stores in a db who owns what email (first one to log in), the next time someone uses SSO it then first goes to my program which then prompts to select what mailbox you would like to log in to and thats it. Additional mailboxes are then handled via the mailauth program, so you basically have two sides: The mailauth and mailcow side, both are connected to authentik, when you go directly to mailauth you are able to manage mailboxes and when you login via the mailcow side you are only allowed to select owned mailboxes, I am also happy to extend it if you need some additional stuff!

Here a screenshot