• Home
    • Zextras Carbonio
    • Admin Guide
    • How To Deploy a Private E-mail Server for Free Using Zextras Carbonio Community Edition On AlmaLinux 8.7 (Stone Smilodon)| Carbonio CE

How To Deploy a Private E-mail Server for Free Using Zextras Carbonio Community Edition On AlmaLinux 8.7 (Stone Smilodon)| Carbonio CE

As of now, Rocky LinuxAlma Linux, and Debian are not officially supported operating systems (OS) for Carbonio CE. Installation on Debian is strongly discouraged due to potential compatibility issues. It’s advised to utilize officially supported OS such as Ubuntu 20.04LTS or RHEL8, as mentioned in the official documentation. Considering this article’s timing, it’s recommended to refer to the current official documentation and use the supported OS to avoid complications during installation.

Did you check the previous articles in this series? In case, you missed them check them here, How to Install Carbonio CE On Ubuntu 20.04LTS, How to Install Carbonio CE On RHEL8” and “How to Install Carbonio CE On Rocky Linux 8“. In this article, we will discuss how you can install Carbonio CE on Alma Linux 8.

Disclaimer

Carbonio CE is currently only available for 64-bit CPUs and can be installed on top of the below-mentioned distributions:

  • Ubuntu 20.04 LTS
  • RHEL 8

Warning:
Right now, there are no other officially supported distributions for Carbonio CE. So please consider all the aspects before installing Carbonio CE on Alma Linux in any active/live/production environment.

Warning:
Linux distributions compatible with Ubuntu 20.04LTS (e.g., Debian) and RHEL 8 (e.g., AlmaLinux, Rocky Linux, CentOS etc) may be used as base OS for Carbonio CE installation in that case to satisfy all required dependencies, you may need to include adding third-party repositories or annually installing software packages which are not included in the official documentation.

Additional Requirements

Before entering the main installation phase, these are the additional requirements that you should keep it mind.

  1. valid DNS resolution for the domain (MX and A records) and the FQDN (A record)
  2. Python 3, the latest version available on the Operating System chosen
  3. Perl, the latest version available on the Operating System chosen

Install Alma Linux 8 On Your Server

You can visit this site and download it.

Alma Linux Download Link

In this test, we are using Alma Linux 8.7 (Stone Smilodon) selecting Minimal Install (Basic Functionality) from the x86_64 DVD ISOS during the installation.

Alma Linux is not yet the officially supported OS for Carbonio CE. So the steps mentioned here are not included in the Official Documentation Page.

Set Static IP Address

Set a static IP Address on your server. It can be a private or a public one.

[root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160 | tail -9
NAME=ens160
UUID=68aba678-63b0-4f3f-915f-87d16d43b1d8
DEVICE=ens160
ONBOOT=yes
IPADDR=192.168.1.121
PREFIX=24
GATEWAY=192.168.1.1
DNS1=8.8.8.8
IPV6_PRIVACY=no
[root@localhost ~]#

Configure hostname and hosts file

Configure the hostname of the server in FQDN format.

[root@localhost ~]# cat /etc/hostname
mail.example.com

[root@localhost ~]# hostnamectl
   Static hostname: mail.example.com
         Icon name: computer-vm
           Chassis: vm
        Machine ID: a352dd817da7498db4f1e3716e0244fc
           Boot ID: be733ea2be004da4a675ef32590828f4
    Virtualization: vmware
  Operating System: AlmaLinux 8.7 (Stone Smilodon)
       CPE OS Name: cpe:/o:almalinux:almalinux:8::baseos
            Kernel: Linux 4.18.0-425.3.1.el8.x86_64
      Architecture: x86-64
[root@localhost ~]#

Modify the /etc/hosts file as follows:

[root@localhost ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.1.121   mail.example.com        mail
[root@localhost ~]#

Modify Selinux status

To proceed Carbonio CE Installation, selinux status should be either disabled or permissive.

[root@localhost ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

Modify The Firewall Service Status

Disable firewalld daemon.

[root@localhost ~]# systemctl stop firewalld.service
[root@localhost ~]# systemctl disable firewalld.service
Removed /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@localhost ~]#

Reboot the Server

As we have modified server hostname & selinux configuration it is recommended to reboot the server.

[root@localhost ~]# reboot now

Add Postgresql repositories

Add required repositories.

[root@mail ~]# yum -y install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm

Install and configure dnsmasq [Optional]

If you have active resolvable public DNS records, then you can skip this step. But if you do not have any active/resolvable DNS records against the domain you are using, then follow below mentioned instructions:

[root@mail ~]# dnf install dnsmasq

[root@mail ~]# vi /etc/dnsmasq.conf
server=1.1.1.1
mx-host=example.com,mail.example.com,50
host-record=example.com,192.168.1.121
host-record=mail.example.com,192.168.1.121

Modify the /etc/resolv.conf as follows:

[root@mail ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search example.com
nameserver 127.0.0.1

Now restart dnsmasq service.

[root@localhost ~]# systemctl restart dnsmasq

Managing Postgresql Database

The version of Postgresql shipped by Alma Linux 8 is older than required by Carbonio CE. We need to make sure that Postgresql 12 is installed in your system.

[root@mail ~]# dnf -qy module disable postgresql
[root@mail ~]# dnf -y install postgresql12 postgresql12-server

[root@mail ~]# /usr/pgsql-12/bin/postgresql-12-setup initdb
Initializing database ... OK

[root@mail ~]# systemctl enable --now postgresql-12
Created symlink /etc/systemd/system/multi-user.target.wants/postgresql-12.service → /usr/lib/systemd/system/postgresql-12.service.
[root@mail ~]#

Now, we need to modify one more file before reloading postgresql-12

[root@mail ~]# vi /var/lib/pgsql/12/data/pg_hba.conf

[find the line]
host    all             all             127.0.0.1/32            ident

[change it to]
host    all             all             127.0.0.1/32            md5

Now reload the postgresql-12

[root@mail ~]# systemctl reload postgresql-12

Install wget

Now we need to add zextras repository to the system. For that we need to download the script. For that we need to install wget.

[root@mail ~]# dnf install wget

Add Carbonio repository to the system

You need to download and add zextras repository in your system in order to install necessary carbonio CE packages.

Head to the Carbonio Community Edition webpage and fill out the form. You will soon receive an e-mail including very easy instructions to add the repository to your operating system.

After you successfully added the repository, upgrade the system.

[root@mail ~]# dnf upgrade

Install service-discover-server

[root@mail ~]# dnf install service-discover-server

Install Carbonio Packages

Before installing the carbonio packages we need to enable powertools repo and install perl-common-sense to avoid following errors:
Error:
Problem: package carbonio-mta-4.0.16-1.el8.x86_64 requires carbonio-amavisd, but none of the providers can be installed
– package carbonio-amavisd-2.12.2-2.el8.x86_64 requires carbonio-perl-convert-uulib, but none of the providers can be installed
– cannot install the best candidate for the job
– nothing provides perl(common::sense) needed by carbonio-perl-convert-uulib-1.8-3.el8.x86_64
– nothing provides perl-common-sense needed by carbonio-perl-convert-uulib-1.8-3.el8.x86_64
(try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)
Solution Reference: Visit this page

[root@mail ~]# dnf --enablerepo=powertools install perl-common-sense -y
[root@mail ~]# dnf install carbonio-directory-server \
carbonio-proxy \
carbonio-webui carbonio-files-ui \
carbonio-mta  \
carbonio-appserver carbonio-logger  \
carbonio-user-management \
carbonio-files-ce carbonio-files-db \
carbonio-storages-ce \
carbonio-preview-ce \
carbonio-docs-connector-ce carbonio-docs-editor \
carbonio-admin-ui carbonio-admin-console-ui \
carbonio-admin-login-ui

Use the following command to launch Carbonio bootstrap

[root@mail ~]# carbonio-bootstrap

Setup Carbonio Mesh & pending setups

[root@mail ~]# service-discover setup-wizard
[root@mail ~]# pending-setups -a

Fix permissions of Carbonio Mesh tokens

[root@mail ~]# chmod a+r /etc/zextras/carbonio-mailbox/token

Configure Carbonio CE databases

[root@mail ~]# su - postgres -c "psql --command=\"CREATE ROLE carbonio_adm WITH LOGIN SUPERUSER encrypted password '123456';\""
[root@mail ~]# su - postgres -c "psql --command=\"CREATE DATABASE carbonio_adm owner carbonio_adm;\""
[root@mail ~]# PGPASSWORD=123456 carbonio-files-db-bootstrap carbonio_adm 127.0.0.1

Restart all services and check the status

[root@mail ~]# su - zextras
[zextras@mail ~]$ zmcontrol restart

[zextras@mail ~]$ zmcontrol -v
Carbonio Release 22.12.0
[zextras@mail ~]$
[zextras@mail ~]$
[zextras@mail ~]$ zmcontrol status
Host mail.example.com
        amavis                  Running
        antispam                Running
        antivirus               Running
        directory-server        Running
        logger                  Running
        mailbox                 Running
        memcached               Running
        mta                     Running
        opendkim                Running
        proxy                   Running
        service webapp          Running
        service-discover        Running
        stats                   Running
        zimbra webapp           Running
        zimbraAdmin webapp      Running
        zimlet webapp           Running
        zmconfigd               Running
[zextras@mail ~]$

And with this step the installation process is completed.

😊👍😎

Now you/user can access the Webmail Interface panel using one of the following methods/links:

https://Server_IP_Address
https://mail.example.com
https://192.168.1.121

zextras is the default admin account in Carbonio CE server. In this case the account is, zextras@example.com

To access the admin account for the first time, you have to set/change it’s password:

[root@mail ~]# su - zextras
[zextras@mail ~]$ carbonio prov sp zextras@example.com 123456

Now you can access the Admin Panel Interface with that credential using one of the following methods/links:
https://Server_IP_Address:6071/login
https://mail.example.com:6071/login
https://192.168.1.121:6071/login

That’s it.

😊

Post your comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

How To Deploy a Private E-mail Server for Free Using Zextras Carbonio Community Edition On Rocky Linux 8.7 (Green Obsidian) | Carbonio CE
Understanding Carbonio CE Email Account Status | Carbonio CE