Way to create skeleton structure for new Maildir?

I’m running a Dovecot IMAP server. I can use the /etc/skel directory to create a default mail structure for main hosting accounts. But, there doesn’t seem to be a way for new email accounts. I would like to automatically setup a Inbox, Spam, Trash, Drafts structure for new email users in /home/{main_account}/homes/{email_user}/Maildir and /home/{main_account}/domains/{submain}/home/{email_user}/Maildir.

Am I overlooking something or is there a way to do this automatically?


Hmm… I was about to suggest setting up a script under System Settings -> Virtualmin Configuration -> Actions upon server and user creation, but I just noticed that there are no values like USER_CREATED for the $VIRTUALSERVER_ACTION template variable…

Maybe it might be a new feature idea to add that. Enabling execution of scripts when a user is created, modified or deleted, in addition to domains? That could be used then to set up a mail directory structure.