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
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
- Fresh Linux server — Ubuntu 22.04/24.04, Debian 12, Rocky Linux 9, or OpenBSD
- 2 GB RAM minimum (4 GB recommended with ClamAV)
- Clean IP address — check blacklists before installing
- Domain name with DNS access
- Port 25 open — verify with your VPS provider
- PTR record — set reverse DNS to your mail hostname
VPS Recommendations
| Provider | Port 25 | Starting Price | Notes |
|---|---|---|---|
| Hetzner | Open | ~$4/mo | Best value, EU-based |
| OVH | Open | ~$5/mo | EU-based, good IP reputation |
| DigitalOcean | Request | $6/mo | Need to request port 25 unblock |
| Vultr | Request | $6/mo | Need 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:
- Mail storage path — default
/var/vmail(keep it) - Web server — Nginx (recommended) or Apache
- Database backend — MySQL/MariaDB, PostgreSQL, or OpenLDAP
- First domain — your primary email domain
- Admin password — for the postmaster account
- 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
- Send a test email to an external Gmail account
- Check Gmail headers for SPF=pass, DKIM=pass, DMARC=pass
- Reply from Gmail to test inbound delivery
- Check spam scores at mail-tester.com
iRedMail vs. Mailcow vs. Mail-in-a-Box
| Feature | iRedMail | Mailcow | Mail-in-a-Box |
|---|---|---|---|
| Installation | Script on OS | Docker Compose | Script on OS |
| Distro support | Many | Any with Docker | Ubuntu only |
| Web admin | iRedAdmin | Mailcow UI | Custom panel |
| Database options | MySQL, PG, LDAP | MySQL only | SQLite |
| Customization | High | Medium | Low |
| Maintenance | Manual updates | Docker pull | Re-run script |
| Learning curve | Medium | Low-Medium | Low |
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
- iRedMail: Official Documentation
- iRedMail: GitHub Repository
- Postfix: Configuration Documentation
- Dovecot: Configuration Manual
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.