Create Email Accounts in Virtualmin: Step-by-Step
In this article
To create an email account in Virtualmin, log in to Virtualmin, select the virtual server that hosts the domain, open the Edit Users page, click Add a user to this server, fill in the username and password, and save. Virtualmin then creates the mailbox and the email address (for example, user@example.com) automatically. Before you start, make sure the domain is already set up as a virtual server in Virtualmin and that mail service (Postfix and Dovecot) is installed and running on the server.
What You'll Need
- A working Virtualmin installation with root or sudo access.
- The domain already added as a virtual server in Virtualmin, with DNS pointing to your server.
- Postfix and Dovecot installed and running (Virtualmin's install script usually sets these up).
- A browser to access Virtualmin (typically https://your-server:10000).
Step-by-Step
- Log in to Virtualmin. Open your browser and go to https://your-server-address:10000. Enter the root or a sudo-capable username and password. If you see a certificate warning, proceed only if you trust the server.
- Select the correct virtual server. In the left-hand navigation, click the domain name (for example, example.com) under the virtual servers list. All actions you take next apply to that domain.
- Open the user management page. Click Edit Users in the left menu. This page lists existing mailboxes and users for the domain.
- Start adding a user. Click Add a user to this server. A form appears with fields for the username, password, and optional settings.
- Enter the username. Type the part before the @ sign (for example, john for john@example.com). Use lowercase letters, numbers, dots, or hyphens; avoid spaces and special characters.
- Set a password. Type a strong password in the Password field and confirm it. You can also click the generate button if available. Note the password for the user.
- Choose mailbox options. Leave Create mailbox enabled if you want a full email account. If you only need a forwarding address, you can disable the mailbox and set a forward later. The Quota field limits mailbox size; leave it blank or set a sensible value.
- Save the user. Click Create (or Save). Virtualmin creates the Unix user, the mailbox, and the email address. You should see a confirmation message.
- Verify the account. Return to Edit Users and confirm the new user appears. You can also check Logs and Reports > Mail Log for any errors. Test by sending an email to the new address from an external account.
- Set up email client access (optional). Provide the user with the server's mail settings: IMAP/POP3 server (usually the domain or server hostname), SMTP server, username (full email address), and password. Use SSL/TLS on ports 993 (IMAP) and 465 or 587 (SMTP).
Common Mistakes
- Using the wrong virtual server. Creating a user under the wrong domain results in the wrong email address. Always confirm the domain name at the top of the page.
- Forgetting to enable the mailbox. If Create mailbox is unchecked, the user can log in but has no inbox. Check this option for full email accounts.
- Weak or reused passwords. Virtualmin may reject weak passwords depending on configuration. Use a strong, unique password.
- Ignoring DNS. If MX records do not point to your server, mail will not arrive. Verify DNS before blaming Virtualmin.
- Not testing after creation. Always send a test message to confirm delivery and check the mail log for errors.
Tips
- Use Edit Users to manage quotas, forwarding, and autoresponders later.
- Create aliases (forwarders) under Edit Mail Aliases for addresses like info@example.com that forward to a real mailbox.
- Enable Mailbox quota to prevent one user from filling the disk.
- Keep Virtualmin and Postfix/Dovecot updated for security fixes.
- Document the mail server settings for users to reduce support requests.
Troubleshooting
If the account is created but mail does not arrive, check these in order:
- DNS and MX records. Use a DNS lookup tool to confirm the domain's MX record points to your server's hostname. Changes can take time to propagate.
- Mail service status. In Virtualmin, go to Webmin > System > Software Package Updates or use the command line to check that Postfix and Dovecot are running. Restart them if needed.
- Mail logs. Open Logs and Reports > Mail Log and look for errors such as authentication failures or connection refused.
- Firewall. Ensure ports 25, 465, 587, 993, and 995 are open on the server and any external firewall.
- User login. Confirm the user can log in via Webmail (if installed) or an email client. Incorrect passwords or disabled accounts will block access.
If mail is rejected, check for blacklisting or missing SPF/DKIM records. Virtualmin can help generate DKIM keys under Email Settings > DomainKeys Identified Mail.
Frequently Asked Questions
Can I create an email account without a mailbox?
Yes. Uncheck Create mailbox when adding the user, then set up forwarding under Edit Mail Aliases to send mail elsewhere.
What is the difference between a user and an alias?
A user has a mailbox and can log in. An alias only forwards mail to one or more addresses and does not store messages.
How do I change a user's password later?
Go to Edit Users, click the username, and use the password change option. Alternatively, the user can change it via Usermin if enabled.
Why does Virtualmin say the user already exists?
The username may conflict with an existing system user or another virtual server user. Choose a different username or check Edit Users for duplicates.
Can I set a mailbox quota?
Yes. Enter a value in the Quota field when creating the user, or edit it later in Edit Users.
Do I need to restart mail services after adding a user?
No. Virtualmin updates the mail configuration automatically; a restart is not normally required.