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.
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
- 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.
https://your-server/mail/ to send and receive emails from any browser.