Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 info@somedomain.com):

  1. 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)
  2. In webmin I go to Virtual Domains and create a new mapping in order to map info@somedomain.com to the user somedomaininfo
  3. 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:

  1. if this is the right way to do this.
  2. in case it's the right way, if this process can be more automatic (by installing some module or something like this).
share|improve this question

2 Answers 2

up vote 0 down vote accepted

You can use database to keep mail users settings and manage domain/users. With postfixadmin/vimbadmin it would be very easy

share|improve this answer
  • I dont recommend creating UNIX system accounts for every user. You are migrating 30 domains. Assume there are 10 users per domain, and so you will have to create 300 UNIX system users.
  • I suggest you to store your user and domain details in database and make postfix and dovecot lookup in database. ( For postfix and dovecot use database lookup tables. More info about postfix lookup tables here. We use postgres in our setup and so we use pgsql lookup type for both postfix and dovecot)

With this, you need not restart postfix/dovecot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.