Is there a way to configure Dovecot or Postfix to create email accounts under user's home account. For example /home/user/vmail/...?
I think I have seen that type of setup on CPanel. This way the backup of accounts would be complete (mysql, user data and email) and for set-up where you have larger partition for /home directory instead off using default partition of /...
I have read online about Dovecot settings like:
mail_home = /var/vmail/%d/%n
mail_location = maildir:~/mail
The problem is that user account may have multiple domains for example:
www.main.com - main domain account
www.main2.com - 2nd domain
if to use settings above to modify them to:
mail_home = /home/{main-user}/vmail/%d/%n
mail_location = maildir:~/mail
Is there a way to get {main-user} variable? Any ideas how that could be set-up?
Any input is greatly appreciated.