Mail. Managing mail domains, mailboxes, and aliases
After the Mail module is installed in BeAdmin, day-to-day work boils down to managing three entities: mail domains, mailboxes, and aliases. The module page has a dedicated section in the side menu for each of them. This article covers how to add and remove domains, create mailboxes, and set up aliases — both to an internal mailbox and to an external email address.
If the module is not installed yet, start with How to deploy a mail server with BeAdmin.
Adding a mail domain
A mail domain is the domain on which you create mailboxes and aliases. The server can host several domains: for example, the main one for work mailboxes and an additional one for a second project. Each domain has its own mailboxes and aliases.
- Open the Mail domains section and click Add domain.
- In the Add domain dialog, fill in the fields:
- Domain name — for example,
example.com. Use a domain whose DNS records you control. - Comment — an optional notes field.
- Domain name — for example,
- Click Add.
The domain appears in the list — you can immediately create mailboxes and aliases on it.
Getting an SPF record for a domain
SPF is a TXT record in the domain's DNS zone that tells other mail servers which IP addresses are allowed to send mail on behalf of your domain. Without it, messages often end up in spam.
- In the domain row, click DNS — a block with a ready-made TXT record opens up.
- Copy the string and add it at your domain registrar as a TXT record in the DNS zone.
If the block shows an error:
- SPF record is unavailable — no public IP address found on the server — the server is behind NAT or has only a local address. Build the record manually, specifying the public IP through which the server sends mail.
- Failed to load SPF record — a temporary error; try refreshing the block.
💡 Tip
SPF is the bare minimum for mail delivery. The full set of records (A, MX, SPF, DKIM, DMARC, PTR) with examples and explanations is described in How to configure DNS records for the mail server. Add DKIM and DMARC manually at your registrar.
Creating a mailbox
A mailbox is an address with its own password and message storage. You can connect to it over IMAP and SMTP from any mail client.
- Open the Mailboxes section and click Create mailbox.
- In the Create mailbox dialog, fill in the fields:
- Name — the part of the address before the
@. Latin letters, digits, and the characters.,_,+,-are allowed. For example,info. The panel warns you if the name does not match the format or is already taken. - Domain — pick a domain from the ones already added. If there is only one domain, it is filled in automatically. If the server does not have any domain yet, an Add domain button appears next to the name field — it opens the create-domain dialog right from here.
- Password — at least 8 characters; must contain both letters and digits. If you do not want to come up with one yourself, use the password generation button next to the field.
- Comment — an optional notes field.
- Name — the part of the address before the
- Click Create.
The mailbox appears in the list — you can use it right away through Roundcube or connect it to an external mail client.
Managing a mailbox
The following actions are available in the mailbox row:
- Enable/Disable — the row toggle temporarily stops accepting incoming mail. The accumulated messages are kept and the mailbox stays in the system. Turn it back on to resume delivery.
- Edit — opens a dialog where you can change some mailbox parameters.
- Change password — set a new password for the mailbox.
- Delete mailbox — wipes the mailbox from the server along with all accumulated messages.
⚠️ Warning
The mailbox address — the name and the domain — cannot be changed. To change the address, delete the mailbox and create a new one.
‼️ Deleting a mailbox is irreversible
All accumulated messages are lost together with the mailbox. If aliases point to the mailbox, the deletion dialog lists them — the aliases are deleted cascade together with the mailbox.
Creating an alias to an internal mailbox
An alias is an additional address that forwards mail to an existing mailbox. An alias has no message storage and no password, and it cannot be connected to a mail client — it only forwards.
A handy scenario: a shared address team@example.com that several public addresses lead to — info@, sales@, support@. The team reads a single mailbox while clients write to the addresses they are used to.
- Open the Aliases section and click Create alias. If the server does not have any mailbox yet, the section prompts you to create a mailbox first — without one, an alias has nowhere to forward to.
- In the Create alias dialog, fill in the fields:
- Name and Domain — the same as when creating a mailbox.
- Forwarding address — pick a recipient from the list of existing mailboxes on the server. To forward to an external address, see the next section.
- Comment — an optional notes field.
- Click Create.
The alias is shown in the list with an arrow pointing to the recipient — for example, info@example.com → team@example.com.
Creating an alias to an external address
An alias can also point to an address outside the server — for example, to forward mail from a company domain to a personal myname@gmail.com. This is convenient for one-off addresses or integrations with third-party services.
- In the Aliases section, click Create alias.
- In the Create alias dialog, fill in the fields:
- Name and Domain — the same as when creating a mailbox.
- Below the Forwarding address field, click Specify another address and enter an external email. To go back to picking an internal mailbox, click Pick from existing.
- Comment — an optional notes field.
- Click Create.
ℹ️ Info
An alias — internal or external — has no message storage and no password. It cannot be turned off with the toggle and its password cannot be changed. Only editing the forwarding address and the comment, or deleting the alias, are available.
Alias states
If the recipient mailbox is disabled, the alias row in the list is shown struck through; on hover a tooltip says Recipient mailbox is disabled — mail is not forwarded. Turn the recipient mailbox back on or change the forwarding address by editing the alias.
Removing a mail domain
In the domain row, click the delete button. In the confirmation dialog the panel warns: Are you sure you want to delete the domain {domain}? If it is used by sites or mailboxes, they will become unavailable. — this is a warning, not a block.
If, after confirmation, the domain still has linked mailboxes or aliases, the panel shows the message The domain is in use; remove the linked mailboxes and aliases first — the deletion does not go through. Remove all mailboxes and aliases on this domain and try again.
‼️ Deleting a domain is irreversible
A deleted domain cannot be restored — it has to be added again. If mailboxes were running on the domain before deletion, their messages are already lost together with the mailboxes themselves.
Useful links
- How to deploy a mail server with BeAdmin — installing the module, the Roundcube web client, connecting external mail clients.
- Mail. Managing the module — starting, stopping, reinstalling, and removing the server, managing Roundcube.
- How to configure DNS records for the mail server — the full set of DNS records: A, MX, SPF, DKIM, DMARC, PTR.