How to Install iRedMail Server On Ubuntu

0
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       1.2.3.4 (ip adderss)
@                   IN A       1.2.3.4 (ip adderss)
@                   IN MX 10   mail.yourdomain.com
@                   IN TXT   v=spf1 a mx ip4:138.68.14.182 ~all
_Dmarc                   IN TXT   v=DMARC1; p=none; fo=1; rua=mailto:dmarc@yourdomain.com; ruf=mailto:dmarc@yourdomain.com

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 mail.yourdomain.com

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
57.154.210.219 mail.yourdomain.com mail

install gzip (extract zip file on vps)

apt install gzip

Download iredmail

wget https://github.com/iredmail/iRedMail/archive/1.4.0.tar.gz

Start the installation with following command


tar zxvf 1.4.0.tar.gz

cd iRedMail-1.4.0

bash iRedMail.sh

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

iredmail-welcome-message

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:

iredmail-directory

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

(Press Space Button And This Enter)

iredmail-install
iredmail-domain

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

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.

iredmail-manage

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, d=techwebbot.gq, /var/lib/dkim/techwebbot.gq.pem
dkim._domainkey.techwebbot.gq.  3600 TXT (
  "v=DKIM1; p="
  "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5eDrkDirZRovmjBZr9wI"
  "22HxtrAnClU6JrPuioHquh3rC2ZIIL/A4lpNi4eN8DhmgaSIkCXUinIXmtjaqTKj"
  "IeUJMzTURB7j/NX2jo1EUvNmlf8QOK0c2ijCUytUXIeJcVvmDa3du7xelxl+KL01"
  "ZHaHR41cFp49D5WDJ5xq+IoZfIzdmPSBlZ9XG9dieleSBzzxEo6k67Zcy05dojjM"
  "Q+JK0nk5qM/TJ6u0zoHv0u7Lm2q9vTZvmkjEXsLyCMyUGwg8pj9LPoVjpr7hUHMB"
  "/lW8B4s2xyrMdJlCxdB6Po2yE2AZ1ssTXWmHcuoW3To3BeQqdQCdQgDY/kHhQKqx"
  "jQIDAQAB")

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.