Installing the iRedMail mail server on CentOS 7. Part 1. Basic installation

Installing the mail server iRedMail. Basic setup

iRedMail is a full-fledged mail server for Linux, which includes the following components: – postfix mail server; – imap and pop3 dovecot server; – roundcube mail client web interface; – sogo mail client web interface; – greylist (automatic spam blocking system ); – Amavisd-new (a content filtering framework that uses antivirus and antispam virus filtering and spam filtering helper applications: ClamAV and SpamAssassin); – NGINX web server; – Awstats statistics module; – fail2ban (a software environment for intrusion prevention that protects computer servers from brute-force attacks).

A series of articles on installing and configuring the iRedMail mail server

  • Installing the iRedMail mail server on CentOS 7. Part 1. Basic installation
  • Installing the iRedMail mail server on CentOS 7. Part 2. Fighting spam
  • Installing the iRedMail mail server on CentOS 7. Part 3. Aliases, a web interface for working with aliases
  • Installing the iRedMail mail server on CentOS 7. Part 4. Configuring Postfix, authorization without entering a domain
  • Installing the iRedMail mail server on CentOS 7. Part 5. Storage structure of virtual mailboxes
  • Installing the iRedMail mail server on CentOS 7. Part 6. DKIM, SPF, DMARC
  • Installing the iRedMail mail server on CentOS 7. Part 7. Greylisting whitelist, WEB interface, Dovecot quota
  • Installation of the mail server iRedMail on CentOS 7. Part 8. White and black lists. Web interface

Preparatory stage

We update, add the EPEL repository, install the necessary software

[[email protected] ~]# yum update -y
[[email protected] ~]# yum install epel-release -y
[[email protected] ~]# yum install htop nano mc zip unzip wget -y

See what we have now hostname

[[email protected] ~]# hostname -f
srv-mail-01
[[email protected] ~]# hostname -s
srv-mail-01

Change the hostname to the one required for the mail server

[[email protected] ~]# hostnamectl set-hostname mail.itdraft.ru
[[email protected] ~]# hostname -f
mail.itdraft.ru
[[email protected] ~]# hostname -s
mail

We bring the file / etc / hosts to the following form

[[email protected] ~]# nano /etc/hosts
127.0.0.1    localhost
%ip%         mail.itdraft.ru mail

where% ip% is your external ip address

Disable SELinux and reboot

[[email protected] ~]# setenforce 0
[[email protected] ~]# nano /etc/selinux/config
SELINUX=disabled
[[email protected] ~]# reboot

Installing iRedMail

Downloading the latest release version of iRedMail from the official website

[[email protected] ~]# cd /home
[[email protected] ~]# wget https://bitbucket.org/zhb/iredmail/downloads/iRedMail-0.9.9.tar.bz2

Install the bzip2 package and unpack the downloaded archive

[[email protected] ~]# yum install bzip2 -y
[[email protected] ~]# tar xjf iRedMail-0.9.9.tar.bz2

Go to the directory where we unpacked iRedMail and make the installation script executable

[[email protected] ~]# cd /home/iRedMail-0.9.9
[[email protected] ~]# chmod +x iRedMail.sh

We start the installation of iRedMail

[[email protected] ~]# ./iRedMail.sh
В открывшемся приветствии отвечаем: Yes
Вводим путь для хранения почты: /var/vmail
Выбираем веб-сервер: Nginx
Выбираем СУБД: MariaDB
Задаем пароль администратора базы данных: 
Вводим наш почтовый домен: itdraft.ru
Задаем пароль для администратора почтовыми ящиками ([email protected]):
Выбираем дополнения для удобства работы с iRedMail: все

Подтверждаем введенные настройки (y) и нажимаем Enter. На все последующие вопросы тоже отвечаем y.
Ждем окончания процесса.
Sidebar