Creating a Mail Server Using Webmin
Here is the complete step-by-step procedure on how to create a mail server.
(a) Host a website from the server domainname.com and create a child of that website* called mail.domainname.com. (For help refer to
*For the document root of the child, enter : /usr/shared/squirrelmail
(b) Create a user on the server from which you can later login into the mail server.
(c) In the Zone List within domainname.com, go to Mail Server.
(d) Within the mail server, add/edit the following fields :
1. Mail Server : mail.domainname.com.
2. Priority : 10
Note : Leave the Name field blank.
Click on Create and then Save.
(e) Go to the Zone List of domainname.com and Click on Apply Changes. Alternately, you can go to the server terminal and use the command #service named restart.
(f) Go to the Webmin Index | Networking | Network Configuration | Hostname and DNS Client and make sure the following fields are as given here :
1. DNS Servers : ServerIPAddress
2. Resolution Order : Host DNS DNS
3. Search Domains : None
Note : Note down the entry in the Hostname field (say hostname).
(g) Click on Save.
(h) Go to Host Addresses | Add a new host address and add/edit the following fields.
1. IP Address : ServerIPAddress
2. Hostnames : hostname
(i) Go the the address 127.0.0.1 and add domainname.com to the Hostnames field.
(j) Click on Save | Return to Network Configuration | Apply Configuration.
(k) Go to Webmin Index | Servers | Sendmail Configuration | Sendmail Options. Remove the Address from the SMTP port options field and click on Save and Apply. The SMTP port options should finally look like this :
(l) Go to Local Domains and add domainname.com and click on Save.
(m) Click on Stop Sendmail followed by Start Sendmail to restart the sendmail service.
(n) Go to Webmin Server | Dovecot IMAP/POP3 Server | Networking and Protocols and in Serve Mail Protocols, select all four entries and click on Save. On the Dovecot Module Index, click on Start Dovecot/Apply Configuration.
(o) Go to mail.domainname.com and login using the user created at step (b).
(p) Go to Options | Personal Information and give your full name and email address.