What Is iRedMail?
iRedMail is a free, open-source mail server solution that automatically installs and configures Postfix, Dovecot, SpamAssassin, ClamAV, and a webmail client. It transforms a fresh Breeze into a fully functional email server with minimal manual configuration.
Prerequisites
- A Breeze with at least 4 GB RAM running a fresh Ubuntu 22.04 installation
- A fully qualified domain name (FQDN) set as the hostname
- DNS MX record pointing to your Breeze
- Ports 25, 587, 993, and 443 open
Step 1: Set the Hostname
sudo hostnamectl set-hostname mail.yourdomain.com
echo "127.0.0.1 mail.yourdomain.com mail" | sudo tee -a /etc/hostsStep 2: Download and Run iRedMail
cd /tmp
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
sudo bash iRedMail.shThe installer will prompt you for:
- Mail storage path (default
/var/vmail) - Database backend (MySQL or PostgreSQL)
- First mail domain and admin password
- Optional components (webmail, antispam, antivirus)
Step 3: Reboot and Access
sudo rebootAfter reboot, access the admin panel at https://mail.yourdomain.com/iredadmin. Log in as postmaster@yourdomain.com.
Step 4: Configure DNS Records
- MX:
yourdomain.comtomail.yourdomain.com(priority 10) - SPF:
v=spf1 mx -all - DKIM: Copy the DKIM public key from
/root/iRedMail-1.7.1/iRedMail.tips - DMARC:
v=DMARC1; p=reject; rua=mailto:postmaster@yourdomain.com
Post-Installation Tips
- Enable Let's Encrypt SSL using Certbot for trusted certificates
- The file
/root/iRedMail-1.7.1/iRedMail.tipscontains all passwords and settings - Monitor mail queues with
postqueue -pon your Breeze