Skip to content
syedasif27Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

iRedMail Setup Guide (Single Server)

This guide describes how to install and configure a single-node iRedMail mail server from scratch.


✅ Prerequisites to Ask the Client

Before installation, gather the following details from the client:

1. Domain & DNS

  • Fully Qualified Domain Name (FQDN) for the mail server (e.g., mail.example.com)
  • Access to manage DNS records (A, MX, SPF, DKIM, DMARC, PTR)
  • Public domain ownership confirmation

2. SSL/TLS

  • Decide whether to use Let's Encrypt or a custom SSL certificate
  • If custom SSL: provide fullchain.pem and privkey.pem

3. Server Access

  • Static public IP address
  • SSH credentials
  • Operating system version (e.g., Ubuntu 22.04, Rocky Linux 9, etc.)
  • Hostname must be set correctly

4. Mail Settings

  • List of mail domains to host (e.g., example.com)
  • Initial mailboxes and aliases
  • Mailbox quota policy

5. Storage

  • Disk size and layout plan
  • Partition for /var/vmail with enough space for email storage

6. Security & Backup

  • Is backup required?
  • Should spam/virus filtering be enabled (Rspamd, ClamAV)?
  • Firewall rules (open ports 25, 587, 993, 443, etc.)

🛠️ Installation Steps

Step 1: System Update and Hostname Configuration

sudo apt update && sudo apt upgrade -y          # Ubuntu/Debian
sudo dnf update -y                              # Rocky Linux
hostnamectl set-hostname mail.example.com
echo "192.0.2.10 mail.example.com mail" >> /etc/hosts

Step 2: Download iRedMail

cd /opt/
wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.6.9.tar.gz
tar xzf 1.6.9.tar.gz
cd iRedMail-1.6.9/
chmod +x iRedMail.sh

Replace 1.6.9 with the latest version from iRedMail Downloads

Step 3: Run the Installer

sudo bash iRedMail.sh

You will be prompted to choose:

  • Mail storage path (default: /var/vmail)
  • Web server (Nginx or Apache)
  • Backend (MariaDB, PostgreSQL, or OpenLDAP)
  • Mail domain(s) and admin account password

Step 4: DNS Configuration

Configure DNS for your mail domain:

Record Type Name Value
A mail 192.0.2.10
MX @ mail.example.com (priority 10)
TXT @ v=spf1 mx ~all
TXT _dmarc v=DMARC1; p=none
TXT default._domainkey (value generated by DKIM setup)

Ensure reverse DNS (PTR) record points to mail.example.com.

Step 5: Open Required Ports

sudo ufw allow 22,25,80,443,587,993/tcp
sudo ufw enable

Step 6: Access Admin and Webmail

  • Admin Panel: https://mail.example.com/iredadmin
  • Default Admin: postmaster@example.com
  • Webmail: https://mail.example.com/mail (Roundcube)

✅ Post-Installation Tips

  • Enable DKIM (auto-configured by installer)
  • Configure regular backups
  • Monitor email queues and logs
  • Keep system packages updated
  • Use Fail2Ban or similar tools for brute-force protection

📞 Support

  • Log location: /var/log/maillog, /var/log/clamav, /var/log/fail2ban.log
  • Mail data: /var/vmail
  • Backup your database and /var/vmail regularly

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors