Setting up a mail server can sometimes be a cumbersome task, which is why services like iRedMail exist: they make life easier by handling all the configuration needed to have a mail server. With a simple command, you have Postfix + Dovecot working perfectly, and they also provide a set of useful applications for managing email accounts as well as a web-based email client.
Here is a list of all the software included with iRedMail:
- Postfix: As a Mail Transfer Agent (Mail transfer agent , MTA).
- Dovecot: POP3 and IMAP server.
- Nginx: Web server.
- OpenLDAP: LDAP server for storing email accounts.
- MySQL, MariaDB, PostgreSQL: As a database server.
- SpamAssassin: Antispam filter.
- ClamAV: Antivirus for email.
- Amavisd-new: An interface for managing Postfix, SpamAssassin, and ClamAV.
- Roundcube: Web-based email client.
- SOGo Groupware: Client for managing calendars, contacts, tasks, and email.
- Fail2ban: For blocking brute-force access attempts.
- NetData: An incredible real-time monitor.
Requirements for installing iRedmail
To install iRedMail, you need to use a Linux distribution, and all our images work correctly with this software, so you can install it on Ubuntu, Debian, or CentOS without any problems. To install iRedMail, the server must have at least 2GB of RAM.
Our server must also have a short hostname configured and respond to a domain name. To do this, we will edit the /etc/hostname and /etc/hosts files and leave them as follows:
- For the file /etc/hostname
mx- For the file /etc/hosts
127.0.1.1 mx.midominio.com mx localhost localhost.localdomainThe final result should be as follows:
$ hostname -f
mx.midominio.comInstalling iRedMail
For this tutorial, we will use Ubuntu 18.04, but any of our Linux distributions will work. The first thing we will do is download the software and then run the script. First, we update the repositories:
# apt update
# apt upgradeThen we install the following package:
# apt install bzip2We download the software with:
# wget https://github.com/iredmail/iRedMail/archive/refs/tags/1.8.2.tar.gzWe extract it:
# tar xzf 1.8.2.tar.gzAnd run it:
# cd iRedMail-1.8.2
# bash iRedMail.shDuring installation, we will need to configure the administrator users as well as all the software we want to install:
After installation, we can access the services at the following URLs:
- Roundcube webmail: https://mx.midominio.com/mail
- SOGo groupware: https://mx.midominio.com/SOGo
- Netdata (monitor): https://mx.midominio.com/netdata
- Web admin panel (iRedAdmin): https://mx.midominio.com/iredadmin