I have a server with one IP and multiple domains. Using Webmin, Postfix and Dovecot.
These domains are created automatically by webmin (and it creates the user, the user folder, database etc) but as I need to create multiple mail accounts on each domain I follow the following process (imagine I want to create the account email@example.com):
- I create a specific user for that mail account, as I can't repeat info as username I prepend the domain name to the username (in this example: somedomaininfo)
- In webmin I go to Virtual Domains and create a new mapping in order to map firstname.lastname@example.org to the user somedomaininfo
- Restart postfix and dovecot (I'm not sure if this is required)
After this everything works great but I'm in the process of migrating about 30 domains and repeating this steps in all domains is a little pain.
I would like to know:
- if this is the right way to do this.
- in case it's the right way, if this process can be more automatic (by installing some module or something like this).