HomeLinuxDebainInstall iRedMail on Debian...

Install iRedMail on Debian 12

What is iRedMail?

iRedMail is a shell script that automatically installs and configures all necessary mail server components on your Linux/BSD server, thus eliminating manual installation and configuration. With iRedMail, you can easily create unlimited mailboxes and unlimited mail domains in a web-based admin panel. Mailboxes can be stored in MariaDB/MySQL, PostreSQL database or OpenLDAP. The following is a list of open-source software that will be automatically installed and configured by iRedMail.

Features of iRedMail Mail Server

  • Fully Open Source: All iRedMail components are built from open source applications. It has bee certified to run on Red Hat Enterprise Linux, CentOS, Debian, Ubuntu, FreeBSD, OpenBSD.
  • Top Security: All mail services are accessed through secured connections – Use of TLS to access POP3, IMAP and SMTP services. Web portals are access via HTTPS. Emails are encrypted in transit using TLS if possible.
  • Access to Webmail: An intuitive web portal is available for accessing and managing mails, folders, sieve filters – (Roundcube webmail or/and SOGo groupware).
  • Unlimited Accounts: You have the powers to create as many mail accounts (domains, users, mailing lists, admins) as you want.
  • Web Admin Panel: As admin user, you get a web admin panel where you manage mail accounts.
  • Antispam & Antivirus: SpamAssassin, ClamAV, SPF, DKIM, greylisting, whitelisting, blacklisting. Quarantining detected spam into SQL database for further review.
  • Support for OpenLDAP, MySQL, MariaDB, and PostgreSQL backend store for mail accounts. Choose what you like.

Before you begin

These are the basic requirements for installing iRedMail on Debian 12 / Ubuntu 24 LTS.

  • 2 GB of memory required. If you plan to use it in production environment with multiple domains and user accounts, the add more memory – 4 GB+
  • Make sure 3 UID/GID are not used by other user/group: 2000, 2001, 2002.
  • Mail Server domain name
  • A sudo user account – User account added to sudo group or root user access

So relax as you start installation of iRedMail Mail Server on Debian 12 / Ubuntu 24 LTS with these easy to follow steps.

Preparations:

Set a fully qualified domain name (FQDN) hostname on your server

Next, set a fully qualified domain name (FQDN) for your server with the following command.

sudo hostnamectl set-hostname mail.example.com

We also need to update /etc/hosts file with a command line text editor like Nano.

sudo nano /etc/hosts

Edit it like below. (Use arrow keys to move the cursor in the file.)

127.0.0.1       mail.example.com localhost

Save and close the file. (To save a file in Nano text editor, press Ctrl+O, then press Enter to confirm. To close the file, press Ctrl+X.)

To see the changes, log out and log back in, then run the following command to see your hostname.

hostname -f

Note: if you get this error during installation, you need to install gzip dialog

# bash iRedMail.sh
[ INFO ] Checking configuration file: /home/asengul/iRedMail-1.7.4/config …[ INFO ] Found, but not finished. Launching installation wizard.
/home/asengul/iRedMail-1.7.4/dialog/config_via_dialog.sh: line 44: dialog: command not found
[ INFO ] Exit.

Enable default official Debian/Ubuntu apt repositories

  • iRedMail needs official Debian/Ubuntu apt repositories, please enable them in /etc/apt/sources.list.
  • Install packages required by iRedMail installer:
sudo apt install -y gzip dialog

Download the latest release of iRedMail

  • Visit Download page to get the latest stable release of iRedMail.
  • Upload iRedMail to your mail server via ftp or scp or whatever method you can use, login to the server to install iRedMail. We assume you uploaded it to /root/iRedMail-x.y.z.tar.gz (replace x.y.z by the real version number).
  • Uncompress iRedMail tarball:
cd /root/
tar zxf iRedMail-x.y.z.tar.gz

Start iRedMail installer

It’s now ready to start iRedMail installer, it will ask you several simple questions, that’s all required to setup a full-featured mail server.

cd /root/iRedMail-x.y.z/
bash iRedMail.sh

Screenshots of installation:

  • Welcome and thanks for your use

Specify location to store all mailboxes. Default is /var/vmail/.

  • Then choose whether you want to run a web server. It’s highly recommended that you choose to run a web server because you need the web-based admin panel to add email accounts. Also it allows you to access the Roundcube webmail. By default, Nginx web server is selected, so you can simply press Enter. (An asterisk indicates the item is selected.)

Then select the storage backend for email accounts. Choose one that you are familiar with. This tutorial chose MariaDB. Press up and down arrow key and press the space bar to select.

If you selected MariaDB or MySQL, then you will need to set the MySQL root password.

Next, enter your first mail domain. You can add additional mail domains later in the web-based admin panel. This tutorial assumes that you want an email account like username@example.com. In that case, you need to enter example.com here, without sub-domain. Do not press the space bar after your domain name. I think iRedMail will copy the space character along with your domain name, which can result in installation failure.

Next, set a password for the mail domain administrator.

Choose optional components. By default, 4 items are selected. If you like to use the SOGo groupware (webmail, calendar, address book, ActiveSync), then press the down arrow key and space bar to select. Press Enter to the next screen.

Now you can review your configurations. Type Y to begin the installation of all mail server components.

At the end of installation, choose y to use firewall rules provided by iRedMail and restart firewall.

Now iRedMail installation is complete.

Reboot your Debian server.

sudo shutdown -r now
After installation successfully completed, you can access web-based programs if you choose to install them. Replace your_server below by your real server hostname or IP address.

Roundcube webmail: https://your_server/mail/
SOGo Groupware: https://your_server/SOGo
Web admin panel (iRedAdmin): https://your_server/iredadmin/
Netdata (monitor): https://your_server/netdata/

- A word from our sponsors -

spot_img

Most Popular

More from Author

How To Install aaPanel on Ubuntu Ubuntu 22.04.5 LTS

Managing a server can be a daunting task, especially for those...

How To Install Fail2Ban on Ubuntu 24.04.2 LTS

Introduction Any service that is exposed to the Internet is at risk...

How to Install Webmin on Debian 12

Introduction Are you searching for a step-by-step guide to install Webmin on...

How To Install ISPConfig Control Panel on Ubuntu 22.04

The main task of a Linux system administrator revolves around monitoring...

- A word from our sponsors -

spot_img

Read Now

How To Install aaPanel on Ubuntu Ubuntu 22.04.5 LTS

Managing a server can be a daunting task, especially for those who are not well-versed in command-line interfaces. Fortunately, control panels like aaPanel simplify this process significantly. This article provides a comprehensive guide on how to install aaPanel on Ubuntu 24.04 LTS, ensuring you have a powerful...

How To Install Fail2Ban on Ubuntu 24.04.2 LTS

Introduction Any service that is exposed to the Internet is at risk of malware attacks. For example, if you are running a service on a publicly available network, attackers can use brute-force attempts to sign in to your account. Fail2ban is a tool that helps protect your Linux machine...

How to Install Webmin on Debian 12

Introduction Are you searching for a step-by-step guide to install Webmin on Debian 12? This simple tutorial is for you! Webmin is a free, open-source web-based control panel that simplifies Linux server management right from your browser. Its intuitive dashboard lets you handle various configurations, including user accounts, disk...

How To Install ISPConfig Control Panel on Ubuntu 22.04

The main task of a Linux system administrator revolves around monitoring the Linux system hardware and software, performing installations and upgrades while maintaining all the essential services and applications. In many scenarios, these activities are executed via the command line. This is mainly because the command line(server...

Installing Let’s Encrypt Free SSL Certificate on iRedMail

In our previous guides, we saw how one can install and configure iRedMail Server. The default installation of iRedMail generates and install a self-signed SSL certificate for Mails services – POP3/IMAP/SMTP over TLS and for HTTPS access to webmail services. When using a self-signed certificate, you’ll often get...

APT sources.list entries for every Debian release

/etc/apt/sources.list entries for every Debian release since Wheezy, including archived releases Debian uses APT as package installation and update manager. This also applies to a distribution (release) upgrade. Usually not much changes in the APT configuration, except the code name. But sometimes, the /etc/apt/sources.list file needs some adjustments...

Debian / Ubuntu Linux restart network interface

In this article, we will see How to restart Network Interface in Debian and Ubuntu. We can restart the networking service in Linux using various command. Use the following commands as per your Linux distribution to restart the networking service. You must run the command as root...

VirtualBox : Advanced Features and Practical Use

When using a traditional you need to install the operating system on a physical machine for evaluating software that cannot be installed on your current operating system. Oracle VirtualBox is what you need in this case, instead of reinstalling software on your physical machine. VirtualBox is designed...

Configuring a Static IP address on your Ubuntu (24.04, 24.10+) Server

To configure a static IP address on Ubuntu Server 24.10, follow these simple steps. Step 1 : Update and Install net-tools First, update your server and install the net-tools package, which includes essential networking utilities like ifconfig. sudo apt update sudo apt install net-tools Step 2 : Check Ethernet Interfaces Use the ifconfig...

Parrot virtualbox install and erorrs kernel

Option 1: Blacklist Many distros use a module blacklist to disallow module loading. Normally this can be done by adding these lines to your distro's modules.conf or similar. You might try reading man modules.conf or googling for directions for your specific distribution. blacklist kvm_intel blacklist kvm Option 2: Unload An alternative is...