First you have to look if Postfix and Dovecot are propely configured.
Step 1 >> Add a Webmin user. By going to System > Users and Groups.
Then click create a new user at the bottom of the listing of users.
Click Save and move on to the next step.
Step 2 >>
Now that you have the user and new password created, you are ready to setup the new user mailbox on the server. You now want to go over to Servers > Postfix Mail Server. Now in order to use your new user as an outgoing email you must next click on the icon labeled “Virtual Domains” then. Next simply go to “Add New Mapping”
But, when you click save mappings, if your are receiving such an error :
Error while saving a mapping : No map file defined
Then you need to create the map file or define one in your config
Check to see if virtual_mailbox_maps or virtual_alias_maps exists in the main.cf file. if it's not there, then create the file if it is there then check to make sure it's been created on your file system.
You need to edit your main.cf and add:
virtual_alias_domains = DomainOne.com DomainTwo.com
virtual_alias_maps = hash:/etc/postfix/virtual
You then need to run 'postmap' and you may need to restart postfix
You need to create a file called virtual, if it does not exists.
And you have to add the email address and respected User to the file for eg : -
email@example.com postmaster firstname.lastname@example.org joe email@example.com jane
The virtual_alias_domains setting tells Postfix that example.com is a called virtual alias domain.
If you omit this setting then Postfix will reject mail or will not be able to deliver it. NEVER list a virtual alias domain name as a mydestination domain The /etc/postfix/virtual file contains the virtual aliases.
With the example abovemail for firstname.lastname@example.org goes to the local postmaster.
While mail for email@example.com goes to the UNIX account joe
and mail for firstname.lastname@example.org goes to the UNIX account jane.
You then need to run 'postmap' and you may need to restart postfix.
Now you have created the required settings.
In order to create the mailboxfor the user,You have to go to System > Users and Groups >> module config at the bottom
Then tick the box having the option >> automatically create the mailbox when a user is created in the system. Then take the option 'Read user mail' and check whether the mailbox have been created