How To Install iRedMail on Ubuntu 12.04 x64
Running your own email server can feel complicated at first. You hear words like Postfix, Dovecot, DKIM, SPF, DNS records, Roundcube, spam filters, and suddenly the whole process looks difficult.
That is exactly why iRedMail became popular. It helps you install a complete mail server system without manually configuring every single service from zero.
In this guide, you will learn how to install iRedMail on Ubuntu 12.04 x64 step by step.
What Is iRedMail?
iRedMail is an open-source mail server solution that installs and configures the most important email services automatically.
It can install and configure:
- Postfix for SMTP email sending
- Dovecot for IMAP and POP3 mail access
- Roundcube webmail
- SpamAssassin for spam filtering
- ClamAV antivirus
- DKIM email authentication
- iRedAdmin control panel
Server Requirements
Before you start, make sure you have:
- Ubuntu 12.04 x64 VPS or dedicated server
- Root SSH access
- At least 2GB RAM
- A domain name
- Port 25 open
- Correct DNS access
Step 1: Update Your Server
Login to your server using SSH:
ssh root@your-server-ip
Update your system packages:
apt-get update && apt-get upgrade -y
Then reboot the server:
reboot
Step 2: Set Your Hostname
Your mail server needs a proper hostname. Example:
mail.yourdomain.com
Edit the hostname file:
nano /etc/hostname
Add:
mail.yourdomain.com
Now edit the hosts file:
nano /etc/hosts
Add this line:
127.0.0.1 mail.yourdomain.com localhost
Apply hostname:
hostname mail.yourdomain.com
Check it:
hostname -f
Step 3: Configure DNS Records
DNS is extremely important for email delivery. Bad DNS setup is one of the biggest reasons mail servers fail.
A Record
mail.yourdomain.com → YOUR_SERVER_IP
MX Record
yourdomain.com → mail.yourdomain.com
SPF Record
v=spf1 ip4:YOUR_SERVER_IP -all
You should also configure reverse DNS from your VPS provider panel.
Step 4: Download iRedMail
Move to the root directory:
Explore a Premium Online Opportunity
Discover selected digital offers and online tools that may help you grow your projects, business, and productivity.
cd /root
Download iRedMail:
wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.0.0.tar.gz
Extract the archive:
tar zxf 1.0.0.tar.gz
Open the folder:
cd iRedMail-1.0.0
Step 5: Start Installation
Run the installer:
bash iRedMail.sh
The installer will open an interactive setup screen. Choose your preferred options carefully.
Recommended options for beginners:
- Mail storage path: default
- Web server: Nginx or Apache
- Database backend: MySQL
- First mail domain: yourdomain.com
- Admin email: postmaster@yourdomain.com
Step 6: Reboot Server
After the installation finishes, reboot your server:
reboot
Step 7: Access Webmail
After reboot, open your browser and visit:
https://mail.yourdomain.com/mail
For admin panel:
https://mail.yourdomain.com/iredadmin
Login using your admin email, usually:
postmaster@yourdomain.com
Step 8: Configure DKIM
iRedMail usually generates DKIM information during installation. You can find useful installation notes here:
/root/iRedMail.tips
Add the DKIM TXT record to your DNS provider. This helps improve inbox delivery and reduces spam problems.
Step 9: Secure Your Mail Server
Mail servers are often attacked by bots, so security matters a lot.
- Use strong admin passwords
- Enable firewall protection
- Use SSL certificates
- Enable Fail2Ban
- Monitor mail logs regularly
- Keep your server updated
Common Problems
- Port 25 blocked by VPS provider
- Wrong hostname
- Missing MX record
- Bad SPF record
- No reverse DNS
- Weak server reputation
Should You Use Ubuntu 12.04 Today?
For a live production email server, no. Ubuntu 12.04 is outdated and not safe for modern production use.
But if you are working with an old server, testing legacy systems, or learning how classic mail server setups worked, this guide is still useful.
Final Thoughts
Installing a mail server manually can be difficult, but iRedMail makes the process much easier. It combines Postfix, Dovecot, Roundcube, spam protection, antivirus, and admin tools into one installation process.
If you want to learn self-hosted email infrastructure, iRedMail is one of the easiest starting points.
Just remember: for serious production use, always choose a modern supported operating system.
Questions & Comments
Ask something about this post or request help from the community.
No comments yet. Be the first to ask a question.