How to Install iRedMail on Ubuntu 24.04: The Full Guide

Stop paying "Per User" fees. Build a secure, private, and unlimited mail server on your iRexta Dedicated Hardware.

Why Build Your Own Mail Server?

Relying on big tech for email means paying high monthly fees and sacrificing privacy. With iRedMail, you get a full-stack mail solution including Postfix, Dovecot, SpamAssassin, and Roundcube webmail—all on your own server.

🚀 The iRexta Advantage: Port 25 & rDNS

Most cloud providers (AWS, DigitalOcean) block Port 25 by default, making it impossible to send mail. On iRexta Bare Metal Servers, Port 25 is open for legitimate use. Plus, you have full control to set Reverse DNS (rDNS), which is critical for hitting the Inbox instead of the Spam folder.

Step 1: Prepare Your Hostname

iRedMail requires a Fully Qualified Domain Name (FQDN). If your domain is example.com, use mail.example.com.

sudo hostnamectl set-hostname mail.example.com
# Verify it
hostname -f

Step 2: Install iRedMail

We will download the latest script and start the installation wizard.

# Update System
sudo apt update && sudo apt upgrade -y
# Download the Latest Stable iRedMail
wget https://github.com/iredmail/iRedMail/archive/refs/tags/$(curl -s https://api.github.com/repos/iredmail/iRedMail/releases/latest | grep tag_name | cut -d '"' -f 4).tar.gz
# Extract the downloaded file (Note: Folder name will change based on version)
tar xvf *.tar.gz
cd iRedMail-*
# Start Installer
bash iRedMail.sh

During Setup: Choose Nginx as the web server and MariaDB for the database. Enter your first mail domain (e.g., example.com) and set a strong admin password.

Configuration Wizard Tips:

  • Default Storage: Simply press Enter (usually /var/vmail).
  • Web Server: Select Nginx using the spacebar.
  • Database: Choose MariaDB for the best performance on iRexta hardware.
  • Domain: Don't enter the hostname (mail.example.com); enter your main domain (example.com).

Step 3: Crucial DNS Configuration

For your emails to be trusted, you must add these records to your DNS provider:

  • MX Record: Points to mail.example.com
  • SPF Record: v=spf1 ip4:YOUR_SERVER_IP -all
  • DKIM: Found in ~/iRedMail-*/iRedMail.tips. This file contains your DKIM public key for DNS setup.
  • DMARC: v=DMARC1; p=quarantine;

Bonus: Secure with Let's Encrypt SSL

To avoid "Insecure Connection" warnings, install a free SSL certificate:

# Install Certbot
sudo apt install certbot python3-certbot-nginx -y
# Request Certificate
sudo certbot --nginx -d mail.example.com
# iRedMail uses its own paths, so link the new certs (Pro Tip)
# Follow the iRedMail documentation to point the new certs in Postfix/Dovecot.

Step 4: Access Your Inbox

Once the installation finishes and you reboot the server, you can access your email interfaces:

  • Webmail: https://mail.example.com/mail/
  • Admin Panel: https://mail.example.com/iredadmin/

Conclusion

Building your own mail server gives you total data sovereignty. When hosted on iRexta Dedicated Hardware, you get the performance and IP reputation needed for enterprise-grade communication.

Need more power for your mail server? Explore iRexta Bare Metal Servers.

iRedMail Setup: Frequently Asked Questions

Why is my email going to Spam?
This is usually due to missing DNS records or a poor IP reputation. To hit the inbox, you must:
  • rDNS (PTR Record): Ensure your Server IP points back to your mail domain. You can set this in the iRexta panel.
  • SPF & DKIM: These digital signatures verify that the email is actually from you.
  • Warm-up: Don't send 10,000 emails on day one. Start slow to build trust with Gmail and Outlook.
Can I host multiple domains on one iRedMail server?
Absolutely! iRedMail allows you to host unlimited domains and create unlimited email accounts. You can manage everything—adding new domains, users, and aliases—directly through the iRedAdmin web panel.
Does iRedMail include a Webmail interface?
Yes, it comes pre-installed with Roundcube, a powerful and user-friendly webmail client. You can access it via https://your-server/mail/ to send and receive emails from any browser.
Is Port 25 open on iRexta Dedicated Servers?
Yes. Unlike standard cloud providers who block Port 25, iRexta allows Port 25 on our Bare Metal servers for legitimate email activities. This is why iRexta is a preferred choice for hosting private mail servers like iRedMail.
How much RAM do I need for iRedMail?
We recommend at least 4GB of RAM. iRedMail runs several security components like ClamAV (Antivirus) and SpamAssassin, which require a decent amount of memory to scan incoming and outgoing emails efficiently.
Can I use an SSL certificate with iRedMail?
Yes, and it is highly recommended. You can easily install a free Let's Encrypt SSL certificate to secure your webmail, admin panel, and mail encryption (IMAP/SMTP over TLS).