Mail. Managing the module
This article continues How to deploy a mail server with BeAdmin. If the module is not installed yet and Roundcube is not open, start there. This article covers operations on the module itself: starting, stopping, restarting the service and reloading its configuration, reinstalling and removing the module, and managing the Roundcube web client.
Managing the service
At the top right of the module page there are four control buttons for the mail server: Start, Stop, Restart, and Reload configuration.
- Start — turns the service on if it has been stopped.
- Stop — turns the service off. Mail delivery and sending stop, and Roundcube and external mail clients lose connection to the server.
- Restart — stops the service and immediately starts it again. Open connections are dropped. Useful after manual configuration edits.
- Reload configuration — applies the new configuration without a full restart. Active connections are kept.
⚠️ Stopping the service on a running mail server is risky
While the service is off, incoming messages are not accepted, and external mail clients and Roundcube return connection errors. Schedule a stop during a maintenance window.
While the module is being reinstalled or removed, the service control buttons are unavailable.
Reinstalling the module
Reinstallation is launched from the three-dot menu next to the Mail server heading.
- Reinstall mail server — removes the packages and installs them again. Domains, mailboxes, and aliases are kept. Use this if the service does not start, the configuration is corrupted, or you need to set a mail server address that was not specified during installation. After reinstallation, the service restarts automatically.
Fields in the reinstall dialog
The dialog has the same fields as the initial module installation, but some values are already prefilled — review them and adjust if needed:
- Primary domain — the domain used to create mailboxes. The first mail domain of the module is prefilled. Change it only if you really want to move mail to another domain.
- Mail server address — the domain that external mail clients connect to and for which an SSL certificate is issued by Let's Encrypt. The field is prefilled with
mail.<primary-domain>. Override it manually if you need a different address. If you did not set the address during the initial installation, fill it in now — the reinstall will issue a Let's Encrypt SSL certificate. Before that, make sure the name has an A record pointing to the server's IP. - Advanced options → Dovecot database password — the password of the MariaDB service user that Dovecot uses to access the mail server database. There is no need to change it without a reason. Leave the field empty and the panel will generate a new password.
Removing the module
Removal is launched from the same three-dot menu next to the Mail server heading.
- Remove mail server — completely removes the module from the server along with all its data: domains, mailboxes with all messages, aliases, and Roundcube.
‼️ Removing the module wipes all data
Domains, mailboxes with all messages, aliases, and Roundcube are deleted. The action is irreversible. Before removing, export any messages you need via Roundcube or an external mail client.
ℹ️ MariaDB is preserved when the module is removed
The mail server uses MariaDB as its database, but removing the Mail module does not affect MariaDB or other databases on the server. If you decide to deploy the mail server again later, install the module once more. See the Quick start for details.
Managing Roundcube
Reinstallation and removal of the Roundcube web client are launched from the three-dot menu next to the Roundcube block.
- Reinstall Roundcube — updates only the web client. The mail server itself, domains, mailboxes, and aliases are not affected. Use this if Roundcube no longer opens or its service database is corrupted.
- Remove Roundcube — removes the web client. The mail server keeps running, and mailboxes remain accessible through external IMAP/SMTP clients. If you decide to bring Roundcube back later, install it again. See the Quick start for details.
Useful links
- How to deploy a mail server with BeAdmin — installing the module, the Roundcube web client, connecting external mail clients.
- How to configure DNS records for the mail server — the full set of records: A, MX, SPF, DKIM, DMARC, PTR.