Quick Answer

iRedMail is a free, open-source installer that deploys a complete email server stack — Postfix (SMTP), Dovecot (IMAP/POP3), Roundcube or SOGo (webmail), SpamAssassin, ClamAV, and Fail2ban — on a fresh Linux server. It supports multiple distros (Ubuntu, Debian, CentOS, Rocky Linux, OpenBSD), offers MySQL/MariaDB, PostgreSQL, or OpenLDAP backends, and provides a web admin panel via iRedAdmin. The paid iRedAdmin-Pro adds advanced features.

iRedMail Setup Guide: Full-Featured Email Server

By Braedon·Mailflow Authority·Self-Hosted SMTP

iRedMail: The Flexible Middle Ground

iRedMail sits between Mail-in-a-Box's simplicity and Mailcow's Docker-based architecture. It installs a full email stack directly on the OS, supports multiple Linux distros, and gives you more control over the underlying components than either alternative.

For a comparison with other options, see Mailcow vs iRedMail vs Modoboa. It's the right choice when you want a guided installation but need to customize the stack afterward — different database backends, specific distro requirements, or integration with existing infrastructure.

Prerequisites

  1. Fresh Linux server — Ubuntu 22.04/24.04, Debian 12, Rocky Linux 9, or OpenBSD
  2. 2 GB RAM minimum (4 GB recommended with ClamAV)
  3. Clean IP address — check blacklists before installing
  4. Domain name with DNS access
  5. Port 25 open — verify with your VPS provider
  6. PTR record — set reverse DNS to your mail hostname

VPS Recommendations

ProviderPort 25Starting PriceNotes
HetznerOpen~$4/moBest value, EU-based
OVHOpen~$5/moEU-based, good IP reputation
DigitalOceanRequest$6/moNeed to request port 25 unblock
VultrRequest$6/moNeed to request port 25 unblock

Installation

Download and run the installer:

wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.7.1.tar.gz
tar xzf 1.7.1.tar.gz
cd iRedMail-1.7.1
bash iRedMail.sh

The installer prompts for:

  1. Mail storage path — default /var/vmail (keep it)
  2. Web server — Nginx (recommended) or Apache
  3. Database backend — MySQL/MariaDB, PostgreSQL, or OpenLDAP
  4. First domain — your primary email domain
  5. Admin password — for the postmaster account
  6. Optional components — Roundcube, SOGo, Fail2ban, iRedAdmin

Choose MySQL/MariaDB unless you have a specific reason for PostgreSQL or LDAP. It's the most widely documented backend.

DNS Configuration

After installation, configure these DNS records:

# MX Record
yourdomain.com    MX    10    mail.yourdomain.com

# A Record
mail.yourdomain.com    A    [your-server-ip]

# SPF
yourdomain.com    TXT    "v=spf1 mx ip4:[your-server-ip] -all"

# DKIM (key generated during install, check /var/lib/dkim/)
dkim._domainkey.yourdomain.com    TXT    "v=DKIM1; k=rsa; p=MIIBIjAN..."

# DMARC
_dmarc.yourdomain.com    TXT    "v=DMARC1; p=quarantine; rua=mailto:[email protected]"

# PTR (set in VPS control panel)
[your-ip]    PTR    mail.yourdomain.com

The installer generates the DKIM key automatically. Find it at:

cat /var/lib/dkim/yourdomain.com.pem
# Or check the iRedAdmin panel for the public key
amavisd-new showkeys

Post-Installation Setup

Access the Admin Panel

Navigate to https://mail.yourdomain.com/iredadmin/ and log in with [email protected].

Create User Accounts

In iRedAdmin → Add → User. Each user gets IMAP access, webmail, and SMTP sending ability.

Configure Webmail

Roundcube is available at https://mail.yourdomain.com/mail/. SOGo (if installed) at https://mail.yourdomain.com/SOGo/.

Test Email Flow

  1. Send a test email to an external Gmail account
  2. Check Gmail headers for SPF=pass, DKIM=pass, DMARC=pass
  3. Reply from Gmail to test inbound delivery
  4. Check spam scores at mail-tester.com

iRedMail vs. Mailcow vs. Mail-in-a-Box

FeatureiRedMailMailcowMail-in-a-Box
InstallationScript on OSDocker ComposeScript on OS
Distro supportManyAny with DockerUbuntu only
Web adminiRedAdminMailcow UICustom panel
Database optionsMySQL, PG, LDAPMySQL onlySQLite
CustomizationHighMediumLow
MaintenanceManual updatesDocker pullRe-run script
Learning curveMediumLow-MediumLow

Practitioner note: I recommend iRedMail for organizations that already have Linux sysadmin staff and want email running alongside existing infrastructure. It integrates better with existing systems than Docker-based solutions because it uses standard OS packages and configs. But if you don't have sysadmin experience, Mailcow's Docker approach is easier to manage.

Maintenance Checklist

  • Daily: Check mail queue (mailq), monitor disk space
  • Weekly: Review logs (/var/log/mail.log), check blacklists
  • Monthly: Update OS packages (apt update && apt upgrade), check iRedMail releases
  • Quarterly: Rotate DKIM keys, verify backups, review user accounts

Practitioner note: The biggest iRedMail maintenance gotcha is ClamAV updates. ClamAV's virus definitions update via freshclam, and if freshclam breaks silently (often due to rate limiting from ClamAV's servers), you're running outdated virus definitions. Monitor freshclam logs or set up a cron alert.

If you're choosing between iRedMail and other self-hosted options, schedule a consultation — I'll evaluate your requirements and recommend the right stack.

Sources


v1.0 · April 2026

Frequently Asked Questions

Is iRedMail free?

The core iRedMail installer and server stack are free and open-source. The basic iRedAdmin web panel is free. iRedAdmin-Pro (advanced admin panel with per-user throttling, whitelists, and domain management) requires a paid license starting at $499 for unlimited users.

What's the difference between iRedMail and Mailcow?

iRedMail installs directly on the OS (bare metal or VM). Mailcow runs in Docker containers. iRedMail supports more Linux distros and database backends. Mailcow has a better web UI out of the box. iRedMail is more flexible; Mailcow is more turnkey. For comparison details, see our Mailcow vs iRedMail comparison.

Can iRedMail handle high volume?

iRedMail's Postfix installation handles moderate volume well (tens of thousands per day). For high-volume relay use, you'd tune Postfix settings manually. iRedMail is better suited for mailbox hosting than bulk sending — for relay-focused setups, consider Postal or KumoMTA.

Does iRedMail include a web admin panel?

Yes. The free iRedAdmin panel covers basic user and domain management. iRedAdmin-Pro adds per-user settings, throttling, global filters, and detailed logging. SOGo provides a groupware webmail with calendar and contacts.

Can I migrate from iRedMail to another platform?

Yes. Since iRedMail uses standard Postfix and Dovecot, your mail data is stored in standard Maildir format. You can migrate mailboxes using imapsync or rsync. DNS records stay the same — just point to the new server.

Want this handled for you?

Free 30-minute strategy call. Walk away with a plan either way.