Setting up your own mail server can seem complex, but Modoboa makes it significantly easier with its all-in-one, user-friendly mail hosting platform. Modoboa offers a modern web interface, built-in anti-spam features, DKIM/DMARC/SPF support, webmail, and administration tools right out of the box. It’s an ideal choice for individuals, businesses, and developers who want full control over their email infrastructure without relying on third-party providers.
With a strong focus on automation and security, Modoboa allows you to deploy a reliable and secure mail server in a matter of minutes.
Prerequisites
Before starting, ensure you have the following:
A fresh VPS (Debian 11 or 12 recommended) with root access and SMTP port enabled.
Minimal technical requirements - CPU: 2 RAM: 2GB Disk: 10GB
A fully qualified domain name (FQDN) like mail.example.com pointing to your server’s public IP.
A static IP address (not blacklisted), with reverse DNS (PTR) set for your domain.
Basic knowledge of Linux command-line usage and SSH access to the server.
We’ll use the Modoboa installer script, which automates the setup of essential components like Postfix, Dovecot, Amavis, SpamAssassin, ClamAV, and a web management interface.
Install Modoboa
1.1. Update the System and Install Dependencies
sudo apt update && sudo apt upgrade -y
sudo apt install -y git sudo curl
1.2. Install Modoboa Installer
sudo cd /opt
git clone https://github.com/modoboa/modoboa-installer
cd modoboa-installer
1.3. Create the Installer Configuration File. This will ask for settings like FQDN, SSL configuration, database backend, and mail options. Use your domain instead of “example.com”
sudo ./run.py --interactive example.com
Your domain e.g. “example.com” has to be already pointed to your server.
Name | Type | Record |
example.com | A | Servers_IP_Address |
mail.example.com | A | Servers_IP_Address |
example.com | MX | mail.example.com |
This step can take 10–30 minutes. It installs and configures all necessary services.
Accessing Web interface
After the installation is completed, you can access configuration page through your preferred browser via:
Default admin credentials:
Username: admin
Password: password (change immediately after login)
Done! Now you can add domains under section “Domains” and emails under “Identities”. To access webmail, create new email account and use it in login page.
Consider making configuration such as SSL if you have not configured it during installation, SPF, DKIM and DMARC records. Also check ports on which your email service will be accessible. More information about configuration settings can be found here.
Conclusion
Setting up a mail server with Modoboa is a straightforward and efficient way to gain full control over your email infrastructure. With its automated installer and built-in features like webmail, spam filtering, and SSL support, it provides a complete mail solution for individuals and businesses alike. Once configured properly with the correct DNS and security settings, your server will be ready to handle reliable, private email communication.