IR

iRedMail

Free, full-featured mail server solution

Mail Servers ★ 1.8k stars Medium setup GPL-3.0

iRedMail is a shell-script-driven mail server deployment that sets up Postfix, Dovecot, antispam, and webmail on major Linux and BSD systems. It supports OpenLDAP, MySQL, or PostgreSQL backends.

Key features

  • Automated full mail stack install
  • LDAP, MySQL or PostgreSQL backends
  • SpamAssassin and ClamAV
  • Roundcube and SOGo webmail

Pros & cons

Strengths

  • Works on many distros
  • Long-standing project

Trade-offs

  • Admin panel features gated in pro edition
  • Script-based, less reproducible

iRedMail replaces

Last reviewed Sep 13, 2026 · 819 words

Twenty minutes. That is roughly how long the iRedMail installer takes to turn a fresh Debian 12 or Rocky Linux 9 VM into a working mail server with Postfix, Dovecot, SpamAssassin, ClamAV, Roundcube, SOGo, fail2ban and a TLS-ready Nginx in front. It is the fastest route to a real bare-metal mail stack I know of. The bill arrives later: iRedMail is a shell script that edits system packages and config files in place, so you cannot rebuild the box from a compose file the way you can with a Docker stack, and the admin panel you will want by month two is the paid Pro edition.

What the script installs, and what it refuses to touch

iRedMail is GPL-3.0, written in shell, first released in 2007, with 1,843 GitHub stars at the time of writing. It supports Debian, Ubuntu, Rocky and AlmaLinux, plus FreeBSD and OpenBSD, which makes it one of very few full mail stacks that runs outside Linux. You pick an account backend at install time: OpenLDAP, MariaDB or MySQL, or PostgreSQL. LDAP is the right choice if other services will authenticate against the same directory; SQL is the right choice for everything else because it is easier to inspect and back up.

The installer insists on a clean OS. It checks for existing MTAs and web servers and stops if it finds them, so the correct way to run it is a dedicated VM whose only job is mail. It also insists on a fully qualified hostname before it starts, and that hostname becomes your mail server's identity in every TLS certificate, HELO banner and DNS record from then on. Choose it once.

The Pro gate is where the friction lands

The free iRedAdmin panel creates domains and users and not much else. Per-user quotas, aliases and forwarding rules, throttling, allow and block lists, admin activity logs and self-service password changes live in iRedAdmin-Pro, which at last check costs on the order of 500 US dollars a year per server. That is fair for a small business and absurd for a household.

The workaround is that the data is just rows. With the SQL backend, adding an alias is one INSERT into the alias table in the vmail database, and forwarding is one row in forwardings. Pick the SQL backend, keep a text file of the half-dozen queries you use, and the Pro gate stops mattering for a family or a club with 3 domains and 10 mailboxes. It matters a great deal once someone else has to administer the box.

Reproducibility is the trade you are making

Everything the script does lands in /etc/postfix, /etc/dovecot, /etc/nginx and friends, with the original questions recorded in a config file it leaves behind. Upgrades between iRedMail releases follow a written per-version guide and are manual. That is workable, but it means the server is a pet. Compare Mailu or docker-mailserver, where the whole configuration is a compose file and an env file you can rebuild anywhere in 10 minutes. If you have ever lost a mail server to a failed distro upgrade, you know which model you prefer.

Backups follow the same pattern: iRedMail installs cron jobs that dump the SQL or LDAP database nightly, and you are responsible for /var/vmail, where every message lives. Snapshot the VM as well; it is the only fast restore path you have.

The 4 GB floor is real

ClamAV alone holds roughly 1 GB of signatures in memory, SpamAssassin and Amavis add more, and SOGo runs its own daemon. 4 GB of RAM and 2 vCPUs is the honest minimum for a server that stays responsive during a virus-definition reload; 2 GB works only if you disable ClamAV, which the docs allow. Disk is whatever your mailboxes need plus 20 percent for indexes.

None of this fixes the part that kills most self-hosted mail: deliverability. Reverse DNS, SPF, DKIM and DMARC are documented and iRedMail generates the DKIM key for you, but a residential IP or a cheap VPS range with a bad reputation will still land in spam. Read the honest case for self-hosted email before you buy the domain.

What I'd do

If I wanted bare metal, no Docker, LDAP shared with other services, or a BSD host, I would run iRedMail with the SQL or LDAP backend on a dedicated 4 GB VM, skip Pro, and keep my admin queries in a notes file. For everyone else, the safer pick in 2026 is Mailu or mailcow, because a mail server you can rebuild from a compose file is a mail server you will actually keep patched. Whichever you choose, the email category has the honest sizing and the deliverability warnings you should read first.

Compare iRedMail

16 head-to-head comparisons.

Similar mail servers apps