How to install iRedMail in Linux

Installation of iRedMail with Virtual Domains, Webmail, SpamAssassin and ClamAV in Linux

iRedmail is one of the best open-source Mail server. With this you can deploy a full-featured mail server in few minutes. Even the newbie can easily able to understand the whole setup. Before the installation process lets have a glance about its features.



  • Full featured with zero cost
  • Available on Major Linux distributions.
  • Dovecot & PostgreSQL, Apache & NginX web server support.
  • Roundcube : Webmail with AJAX, Global LDAP Address book.
  • Calendar service(CalDAV) & Contact service(CardDav)
  • Antivirus such as Clamav.
  • Fail2ban for log files.


  • A valid DNS MX record that points to your mail server.
  • CentOS with minimal installation

For CentOS minimal installation:


iRedmail Installation

Before installation you must have an static IP and a Fully Qualified Domain Name in your machine.
Here the following setup is done in my system.
Static IP :

For the configuration of static IP:

Now we go for iRedmail Installation. Download the archive package from its official download page section and use wget command to download the latest version. The current stable version is iRedmail 0.9.4.

[root@linuxhelp ~]# wget

 In case if you cant reach the link from wget command just download directly in browser and then make use of it.
Official Website:
Official Website

Next extract the downloaded tar package.

[root@linuxhelp ~]# tar xvjf iRedMail-0.9.4.tar.bz2

Now enter into the newly extracted iRedMail directory path and then make script to executable mode.

[root@linuxhelp ~]# cd iRedMail-0.9.4
[root@linuxhelp iRedMail-0.9.4 ~]# ls -l
drwxr-xr-x.  2  501 games  4096 Apr 29 17:33 addons
-rw-r--r--.  1  501 games 59799 Feb  4 18:48 ChangeLog
drwxr-xr-x.  2  501 games  4096 Apr 29 17:33 conf
-rw-r--r--.  1 root root   1837 Apr 29 17:49 config
drwxr-xr-x.  2  501 games  4096 Apr 29 17:33 dialog
-rw-r--r--.  1  501 games   318 Feb  4 18:48 Documentations
drwxr-xr-x.  2  501 games  4096 Apr 29 17:33 functions
-rw-r--r--.  1  501 games  4646 Feb  4 18:48
-rw-r--r--.  1 root root   6010 Apr 29 18:27
drwxr-xr-x.  4  501 games  4096 Apr 29 17:37 pkgs
-rw-r--r--.  1  501 games   785 Feb  4 18:48
drwxr-xr-x.  2 root root   4096 Apr 29 18:27 runtime
drwxr-xr-x. 15  501 games  4096 Apr 29 18:27 samples
drwxr-xr-x.  2  501 games  4096 Feb 14 15:52 tools

[root@linuxhelp iRedMail-0.9.4 ~]# chmod +x
[root@linuxhelp iRedMail-0.9.4 ~]# ls -l
-rwxr-xr-x.  1  501 games  4646 Feb  4 18:48

Before that some additional packages is to be installed. So go to "pkgs" directory and run the script. It will start checking the available packages for iRedmail. If it exists already then check for update.

[root@linuxhelp iRedMail-0.9.4/pkgs ~]# ./

 Check whether the script is in executable mode or change using chmod command.

Once the process is done, continue with iRedmail installation.

[root@linuxhelp iRedMail-0.9.4 ~]# ./

The welcome screen will appear at first. Choose Yes to continue with installation or abort.
welcome screen

Next it employs the confirmation to store e-mails on /var/vmail system path, where it creates separated directories for every domain so that you can append it to your MTA server. If ok then continue or change the path to your need.
Default mail storage path

It will ask for the preferred web server such as nginx or apache. Choose the desired one using Space bar and click next
Preferred web server

Now choose you preferred database to store mail domain names and the recipients that will connect to Postfix and then choose MySQL and then continue with Next.

Add your first virtual domain name and add only the domain name not system FQDN if you own a registered domain name.
first virtual domain name

The postmaster administrative account is used by the system to report incidents those related to mail functions, system failures, logwatchm which usually sends its statistics here - so select a strong password and continue Next.
postmaster administrative account

Now choose your other mail server components like iRedAdmin official administrative panel to Postfix, DKIM domain keys, Roundcube default webmail interface, PhpMyadmin, Awstats and Fail2ban.
Optional components

Depending on your optional components installed in your system you should answer with Yes. Pay more attention to file located on extracted directory since it contains sensitive mail server information such as usernames and passwords for server applications, server configurations files, default URL and other essential information.

Now reboot your system after installation completes and check file to see the server default settings.

Access the default web applications on the below URLs.

IRedAdmin panel- https://domain_name or server_IP/iredadmin/
Roundcube Webmail https://domain_name or server_IP/mail/


iRedmail Admin Panel


iRedAdmin administrative panel provides you with the basic web mail interface, where you can add virtual domains and also accounts for your mail server. To login to iRedAdmin panel you need to point your browser to

https://domain_name/iredadmin/ or https://server_IP/iredadmin/ URL and then use the following default credentials.

Username: postmaster@your_domain_name
Password: postmaster password

This credentials can be verified with file located in the extracted directory.

iRedmail Admin Panel Home Page
iRedmail Admin Panel

To add a user navigate to Add -> User and provide your desired username and password. You are also allowed to setup the amount of space for your user Mailbox.
add user

If the respective user is to make as Admin just check the Global admin check box.
domains and accounts

Addition of Multiple Virtual domains
To add another virtual domain navigate to Add -> Domain and mention the desired domain name.
add another domain
new domain

You can see the "Domain created" message. But confirm that "Enable this domain" box is checked. Incase if not checked then you cant access that domain.
created domain


Roundcube webmail Interface

Reading users email is provided by Roundcube web interface and in order to access it navigate to https://domain_name/mail or https://server_IP/mail/ and provide your mail account credentials in the form of
login page

Same credentials as we used for iRedmail admin panel login.

When you access the default administrative mail account postmaster you will see two initial emails, where one of them consisting of your servers sensitive information. And the another mail consists of other Useful resources.


iRedmail administrator

default administrative mail account

Thus the iRedmail setup is completed. To compose mail click Compose in left top corner and Start with your content. Click Send to send the mail.
 iRedmail setup
sending message


To check Services

You can check your server’s open connections and listening daemon state by running the following command.

[root@linuxhelp ~]# netstat -tulpn 
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
tcp        0      0    *                   LISTEN      1497/dovecot        
tcp        0      0    *                   LISTEN      1716/python         
tcp        0      0   *                   LISTEN      1517/amavisd (maste 
tcp        0      0      *                   LISTEN      1469/mysqld         
tcp        0      0        *                   LISTEN      1300/sshd           
tcp        0      0 :::80                       :::*                        LISTEN      1618/httpd          
udp        0      0       *                               1221/portreserve

To check logs

Logs for iRedmail setup will be stored by default in /var/log/maillog file.

[root@linuxhelp ~]# tailf /var/log/maillog

An important thing is that , after deploying a full mail environment, you need to have a valid domain name with a MX DNS record to receive mail from other domains such as Google, Hotmail etc.

Thank you! for using Linux Help.

You find this tutorial helpful? Share with your friends to keep it alive.
For more help topics browse our website
Be the first to comment, we value your suggestions. For further queries please comment below.

Tags: Iredmail
user image Author :  Grayson