How to Install iRedMail Server On Ubuntu

Install iRedMail Server
iredmail is based on open source postfix, dovecot, openldap, roundcube and other software, plus installation packages, configuration files, and management tools (all open source) developed by the author. It can quickly build a protocol that supports SMTP, POP3, IMAP , and provides WebMail and Web Management interface mail system. To learn more about iredmail you can read their official documentation.

Vps Machine Requirements :-

  • 2 VCPU
  • 2 GB of RAM
  • 80 GB storage
  • Ubuntu  & Centos ( In this tutorial i Am Using Ubuntu )

Popular VPS provider with Open port 25

  1. Turnkey internet.
  2. Contabo.
  3. OVH.
  4. Digital Ocean*

Domain Name

Basic DNS settings

First match the four basics:

# Name              Type       Value
mail                IN A (ip adderss)
@                   IN A (ip adderss)
@                   IN MX 10
@                   IN TXT   v=spf1 a mx ip4: ~all
_Dmarc                   IN TXT   v=DMARC1; p=none; fo=1;;

Install iredmail:-

Update the system installation package

apt update -y
apt upgrade -y

Before installing, update the system installation package. If you don’t install it later, you may get an error.

Modify the server hostname ( hostname )

hostnamectl set-hostname

Before installation, set a correct domain name for your VPS host. First edit your host domain name setting: vim /etc/hosts, and put your domain name

apt install vim -y
vim /etc/hosts

add following lines mail

install gzip (extract zip file on vps)

apt install gzip

Download iredmail


Start the installation with following command

tar zxvf 1.4.0.tar.gz

cd iRedMail-1.4.0


Now, press Enter button. You should see the following page:


Here, provide a full path where you want to store mailboxes. Then, click on the Next button. You should see the following page:

Here, select Nginx as a web server and click on the Next button. You should see the following page:


Here, select OpenLDAP as a database and click on the Next button. You should see the following page:

(Press Space Button And This Enter)


set your domain name then enter. You should see the following page:

set the password for mail domain administrator and click on the Next button. You should see the following page:

Select Roundcubemail then enter

Now, review all the options you have chosen. Then, type y and press Enter to proceed the installation. Once the installation has been completed successfully. You should see the following output

Then you will enter the welcome page of the iRedMail installation process.

The login address of the management background related to iRedMail:

Roundcube webmail: https://your_server/mail/

iRedAdmin: https://your_server/iredadmin/


iRedAdmin is a post office server management platform. You can view and manage your server configuration in iRedAdmin, as well as manage administrators and accounts. This is to add and manage email accounts. In addition, iRedAdmin can also add accounts, domain names , users, etc.


DKIM (DomainKeys Identified Mail) generates a public key and a private key based on the traditional key authentication method, the public key will be stored in the DNS server , and the private key will be stored in the sending server on. The digital signature is automatically generated by the sending server, attached to the mail header, and sent to the receiving server.

root@mail:~# amavisd-new showkeys

; key#1 2048 bits, i=dkim,, /var/lib/dkim/  3600 TXT (
  "v=DKIM1; p="

Remove UnWanted ” ” And then add dkim recode on domain dns.

iRedMail provides a detailed log report. If you are unable to send or receive mail, you can find the reason from the log report. The reason for the frequent error may be that postfix, Dovecot, etc. are not running normally.

Leave a Comment


No comments yet. Why don’t you start the discussion?

Leave a Reply