We are committed to provide service 24 X 7

Deals, Shopping, Training, Tools

Learn how to – Setup Mail Server on Rock Linux 8 With Postfix, Dovecot, MySQL, and RoundCube

Learn how to – Setup Mail Server on Rock Linux 8 With Postfix, Dovecot, MySQL, and RoundCube.

A mail server or a mail transfer agent(MTA) is an application that receives emails from either local or remote senders and forwards the outgoing messages to the required servers. When an email is sent, it goes through a series of servers before it reaches the final destination. This process is very fast in the way that you may not be able to realize the complexity behind sending and receiving emails.

Below is an illustration of how an email server works.

Mail servers are split into two main categories depending on the protocol used:

  • Outgoing mail servers: They use the SMTP protocol.
    • SMTP (Simple Mail Transfer Protocol): This protocol handles any outgoing mail requests and sends emails.
  • Incoming mail servers: They are further split into two:
    • POP3 (Post Office Protocol, version 3): they store sent and received messages on the local storage
    • IMAP (Internet Message Access Protocol): they store the copies of the sent and received messages on the server by synchronizing the entire mailbox

In this tutorial, you will learn how to set up a mail server on Rock Linux 8 With Postfix, Dovecot, MySQL, and RoundCube. This guide makes use of the Postfix as an SMTP server with Dovecot providing POP/IMAP functionality and RoundCube acting as a webmail program or client to allow users to send and receive emails from the browsers.

To get a clear overview, all the components used here are well explained below:

  • Postfix: This is a free and open-source mail transfer agent (MTA) used to relay electronic mail between servers over the internet. Postfix is highly configurable with great flexibility.
  • Dovecot: This is an open-source IMAP and POP3 email server for Linux/UNIX-like systems, written with security primarily in mind. It acts as a Local Delivery Agent (LDA) by taking emails from Postfix or other MTA / mail server software and storing them.
  • Roundcube: Most users require an easy-to-use interface to read their emails after being delivered. Roundcube is one of the preferred options for this task. It is a browser-based multilingual IMAP client with an application-like user interface that provides the full functionality you expect from an email client. This includes an address book, folder manipulation, spell checking, message searching, and MIME support.

Getting Started

This guide requires you to have the following:

  • Fully Qualified Domain name
  • Create A and MX Records for your Domain in a Public Domain Name Server

Update your system and set the hostname;

sudo dnf update -y
sudo hostnamectl set-hostname mail.example.com

You also need to disable SELinux:

sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/g' /etc/selinux/config
sudo reboot

Step 1 – Install the Required Packages

We will begin by installing the Postfix(Mail Transfer Agent), Apache, and PHP packages on Rocky Linux 8.

sudo yum install epel-release -y
sudo dnf install wget postfix certbot postfix-mysql httpd vim policycoreutils-python-utils -y

PHP 7.3 and above is required by Roundcube to display the web pages. Enable the Remi Repository;

sudo dnf install -y https://rpms.remirepo.net/enterprise/remi-release-8.rpm 

List the available PHP versions;

$ sudo dnf module list php
Last metadata expiration check: 0:00:01 ago on Sat 01 Oct 2022 09:27:43 UTC.
Rocky Linux 8 - AppStream
Name     Stream         Profiles                       Summary                  
php      7.2 [d][e]     common [d], devel, minimal     PHP scripting language   
php      7.3            common [d], devel, minimal     PHP scripting language   
php      7.4            common [d], devel, minimal     PHP scripting language   
php      8.0            common [d], devel, minimal     PHP scripting language   

Remi's Modular repository for Enterprise Linux 8 - x86_64
Name     Stream         Profiles                       Summary                  
php      remi-7.2       common [d], devel, minimal     PHP scripting language   
php      remi-7.3       common [d], devel, minimal     PHP scripting language   
php      remi-7.4       common [d], devel, minimal     PHP scripting language   
php      remi-8.0       common [d], devel, minimal     PHP scripting language   
php      remi-8.1       common [d], devel, minimal     PHP scripting language   
php      remi-8.2       common [d], devel, minimal     PHP scripting language   

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

Enable the preferred version, say PHP 8.0:

sudo dnf module -y reset php
sudo dnf module enable php:remi-8.0 -y

Now install PHP and all the required modules, using the command:

sudo yum install php-{pear,cgi,common,curl,gmp,fpm,mbstring,gd,mysqli,gettext,bcmath,json,xml,fpm,intl,zip} -y

Once complete, check the installed version.

$ php --version
PHP 8.0.24 (cli) (built: Sep 28 2022 15:32:34) ( NTS gcc x86_64 )
Copyright (c) The PHP Group
Zend Engine v4.0.24, Copyright (c) Zend Technologies

Step 2 – Install SSL Certificate for the Domain Name

We will begin by installing an SSL certificate for the FQDN. For this guide, we will use Let’sEncrypt to issue a free Trusted SSL certificate. Let’s start by installing certbot tool.

# Ubuntu / Debian
sudo apt update
sudo apt install certbot

# Fedora
sudo dnf install certbot

# RHEL 8 based systems
sudo dnf -y install epel-release
sudo yum -y install certbot

# CentOS 7
sudo yum -y install epel-release
sudo yum -y install certbot

Ensure the required package is installed:

$ certbot --version
certbot 1.22.0

Now install SSL certificates

sudo certbot certonly --standalone

Proceed as shown and replace mail.example.com with the correct FQDN for your server

Saving debug log to /var/log/letsencrypt/letsencrypt.log
Enter email address (used for urgent renewal and security notices)
 (Enter 'c' to cancel): mail@ownyourlife.com.ng

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Please read the Terms of Service at
https://letsencrypt.org/documents/LE-SA-v1.3-September-21-2022.pdf. You must
agree in order to register with the ACME server. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, to
share your email address with the Electronic Frontier Foundation, a founding
partner of the Let's Encrypt project and the non-profit organization that
develops Certbot? We'd like to send you email about our work encrypting the web,
EFF news, campaigns, and ways to support digital freedom.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: y
Account registered.
Please enter the domain name(s) you would like on your certificate (comma and/or
space separated) (Enter 'c' to cancel): mail.example.com
Requesting a certificate for mail.example.com

Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/mail.example.com/fullchain.pem
Key is saved at:         /etc/letsencrypt/live/mail.example.com/privkey.pem
This certificate expires on 2022-12-30.
These files will be updated when the certificate renews.
Certbot has set up a scheduled task to automatically renew this certificate in the background.

Create a directory for the certificates;

sudo mkdir /etc/postfix/ssl
sudo chmod -R 775 /etc/postfix/ssl

Copy the created certificates to the directory:

sudo cp /etc/letsencrypt/live/mail.example.com/fullchain.pem /etc/postfix/ssl
sudo cp /etc/letsencrypt/live/mail.example.com/privkey.pem /etc/postfix/ssl

Step 3 – Install and Configure the Database

We need a database, either MYSQL or its fork, MariaDB to store and retrieve important data for both Roundcube and Postfix.

MariaDB can be installed from the default Rocky Linux 8 repositories with the command:

sudo dnf install mariadb-server mariadb

Once installed, start and enable the service:

sudo systemctl enable --now mariadb

Harden the MariaDB instance:

$ sudo mysql_secure_installation
....
Enter current password for root (enter for none): Just press Enter
......
Switch to unix_socket authentication [Y/n] Y
.....
Change the root password? [Y/n] Y
New password:  New-root-password
Re-enter new password: Re-enter New-root-password
....
Remove anonymous users? [Y/n] Y
....
Disallow root login remotely? [Y/n] Y
.....
Remove test database and access to it? [Y/n] Y
......
Reload privilege tables now? [Y/n] Y
...
Thanks for using MariaDB!

Login to the MariaDB shell using the set password:

mysql -u root -p

Now create the Postfix Mail accounts database.

create database postfix_accounts;
grant all on postfix_accounts.* to postfix_admin@localhost identified by 'StrongPassw0rd';
flush privileges;

Now create tables used to store the domains:

CREATE TABLE `postfix_accounts`.`domains_table` ( `DomainId` INT NOT NULL AUTO_INCREMENT , `DomainName` VARCHAR(50) NOT NULL , PRIMARY KEY (`DomainId`)) ENGINE = InnoDB;

Also, create the table in the database to store the user accounts.

CREATE TABLE `postfix_accounts`.`accounts_table` ( 
    `AccountId` INT NOT NULL AUTO_INCREMENT,  
    `DomainId` INT NOT NULL,  
    `password` VARCHAR(300) NOT NULL,  
    `Email` VARCHAR(100) NOT NULL,  
    PRIMARY KEY (`AccountId`),  
    UNIQUE KEY `Email` (`Email`),  
    FOREIGN KEY (DomainId) REFERENCES domains_table(DomainId) ON DELETE CASCADE 
) ENGINE = InnoDB;

Create a table to store the email aliases data.

CREATE TABLE `postfix_accounts`.`alias_table` (
    `AliasId` INT NOT NULL AUTO_INCREMENT, 
    `DomainId` INT NOT NULL, 
    `Source` varchar(100) NOT NULL, 
    `Destination` varchar(100) NOT NULL, 
    PRIMARY KEY (`AliasId`), 
    FOREIGN KEY (DomainId) REFERENCES domains_table(DomainId) ON DELETE CASCADE
) ENGINE = InnoDB;

To the created tables, we will add records. For demonstration, I will add some accounts and alias.

INSERT INTO `postfix_accounts`.`domains_table` (DomainName) VALUES ('example.com');  
INSERT INTO `postfix_accounts`.`accounts_table` (DomainId, password, Email) VALUES (1, ENCRYPT('Password', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'tech@example.com');  
INSERT INTO `postfix_accounts`.`accounts_table` (DomainId, password, Email) VALUES (1, ENCRYPT('Password', CONCAT('$6$', SUBSTRING(SHA(RAND()), -16))), 'klinsmann@example.com');  
INSERT INTO `postfix_accounts`.`alias_table` (DomainId, Source, Destination) VALUES (1, 'talktous@example.com', 'sales@example.com');

You can use your win usernames and passwords for the postfix_admin user and postfix_accounts database name.

Also, create a database for Roundcube:

create database roundcube;
grant all on roundcube.* to roundcube_admin@localhost identified by 'StrongPassw0rd';
flush privileges;
quit;

Step 4 – Configure Postfix MTA on Rocky Linux 8

We now need to configure the Postfix MTA to be able to send and receive emails. The default configuration files are located at /etc/postfix

Open the master config file for editing;

sudo vim /etc/postfix/master.cf

In the files, you need to uncomment the below lines and ensure the indentation is maintained.

......
submission inet n       -       n       -       -       smtpd
  -o syslog_name=postfix/submission
  -o smtpd_tls_security_level=encrypt   ## Comment this if you have no SSL(not recommended)
  -o smtpd_tls_auth_only=yes            ## Comment this if you have no SSL(not recommended)
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_recipient_restrictions=permit_sasl_authenticated,reject
  -o milter_macro_daemon_name=ORIGINATING
  -o smtpd_reject_unlisted_recipient=no
....

At the bottom of the file, add the dovecot-related configs below:

dovecot   unix  -       n       n       -       -       pipe
    flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${recipient}

Save the file and open the main Postfix config:

sudo vim /etc/postfix/main.cf

In this file, you need to make several configurations that include:

  • Hostname
myhostname = mail.example.com
  • Domain
mydomain = example.com   ## Input your unique domain here

Also, uncomment the below lines:

myorigin = $myhostname
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost
smtpd_recipient_restrictions = permit_mynetworks
home_mailbox = Maildir/

In the same file, add the below lines. Some of the lines define SSL certificate files, which you may need to copy to the specified paths. If you do not have the SSL certificates, comment out the specific lines:

append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
dovecot_destination_recipient_limit = 1
message_size_limit = 4194304
smtpd_tls_cert_file = /etc/postfix/ssl/fullchain.pem  ##SSL Cert
smtpd_tls_key_file = /etc/postfix/ssl/privkey.pem       ##SSL Key
smtpd_use_tls=yes
smtpd_tls_security_level = may

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
virtual_transport = dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

To give Postfix access to the account-related data stored on the database, add the following lines:

virtual_mailbox_domains = mysql:/etc/postfix/database-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/database-users.cf
virtual_alias_maps = mysql:/etc/postfix/database-alias.cf

Save the file and open another config file to define the database details for domains:

sudo vim /etc/postfix/database-domains.cf

In the file, provide the database credentials;

user = postfix_admin
password = StrongPassw0rd
hosts = 127.0.0.1
dbname = postfix_accounts
query = SELECT 1 FROM domains_table WHERE DomainName='%s'

For user accounts:

sudo vim /etc/postfix/database-users.cf

Add the below lines:

user = postfix_admin
password = StrongPassw0rd
hosts = 127.0.0.1
dbname = postfix_accounts
query = SELECT 1 FROM accounts_table WHERE Email='%s'

For email aliases:

sudo vim /etc/postfix/database-alias.cf

Add the lines below:

user = postfix_admin
password = StrongPassw0rd
hosts = 127.0.0.1
dbname = postfix_accounts
query = SELECT Destination FROM alias_table WHERE Source='%s'

Now set the permissions of the created files:

sudo chmod 640 /etc/postfix/database-domains.cf
sudo chmod 640 /etc/postfix/database-users.cf
sudo chmod 640 /etc/postfix/database-alias.cf

Set the ownership:

sudo chown root:postfix /etc/postfix/database-domains.cf
sudo chown root:postfix /etc/postfix/database-users.cf
sudo chown root:postfix /etc/postfix/database-alias.cf

For the made changes to apply, restart Postfix:

sudo systemctl restart postfix

Check the status of the service:

$ systemctl status postfix
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-10-02 08:32:28 UTC; 11s ago
  Process: 6763 ExecStart=/usr/sbin/postfix start (code=exited, status=0/SUCCESS)
  Process: 6761 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 6755 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=0/SUCCESS)
  Process: 6753 ExecStartPre=/usr/sbin/restorecon -R /var/spool/postfix/pid/master.pid (code=exited, status=0/SUCCESS)
 Main PID: 6831 (master)
    Tasks: 3 (limit: 48239)
   Memory: 4.8M
   CGroup: /system.slice/postfix.service
           ├─6831 /usr/libexec/postfix/master -w
           ├─6832 pickup -l -t unix -u
           └─6833 qmgr -l -t unix -u

Before we proceed, let’s test if Postfix is working as desired. We should see 1 if successful or an email address for the last one.

sudo postmap -q example.com mysql:/etc/postfix/database-domains.cf
sudo postmap -q tech@example.com mysql:/etc/postfix/database-users.cf
sudo postmap -q klinsmann@example.com mysql:/etc/postfix/database-users.cf
sudo postmap -q talktous@example.com mysql:/etc/postfix/database-alias.cf

Step 5 – Install and Configure Dovecot on Rocky Linux 8

Dovecot will be used as the open-source IMAP and POP3 email server. These protocols are used to get emails from the server to local machines.

To install Dovecot, use the command:

sudo dnf install dovecot dovecot-mysql -y

Once complete, add a user and group to handle the mails;

sudo groupadd -g 6000 vmail 
sudo useradd -g vmail -u 6000 vmail -d /home/vmail -m

We will now begin the configuration. There are quite a number of configurations to make here.

Let’s begin with the main config file.

$ sudo vim /etc/dovecot/dovecot.conf
protocols = imap pop3 lmtp
listen = *, ::
!include conf.d/*.conf
!include_try local.conf
log_path = /var/log/dovecot.log  ##Add this for logs

Create the log path with the required permissions;

sudo touch /var/log/dovecot.log
sudo chmod 775 /var/log/dovecot.log

Next, edit the below file and comment on the lines below;

$ sudo vim /etc/dovecot/conf.d/10-auth.conf
disable_plaintext_auth = yes
auth_mechanisms = plain login
!include auth-sql.conf.ext     ## Only enable authentication through SQL and leave all other authentication methods disabled

Now we need to define the variables in the auth-sql.conf.ext specified. The variables here include:

  • %u: username
  • %n; user part in user@domain, same as %u if there’s no domain
  • %d: domain part in user@domain, empty if there’s no domain
  • %h: home directory

Create the file with the required variables as shown;

$ sudo vim /etc/dovecot/conf.d/auth-sql.conf.ext
passdb {
  driver = sql
  args = /etc/dovecot/dovecot-sql.conf.ext
}
#userdb {
#  driver = sql
#  args = /etc/dovecot/dovecot-sql.conf.ext
#}

userdb {
  driver = static     ## Don't forget to change this
  args = uid=vmail gid=vmail home=/home/vmail/%d/%n/Maildir
}

Now we will create the directory;

sudo mkdir /home/vmail/example.com

Add the database creds for Postfix

$ sudo vim /etc/dovecot/dovecot-sql.conf.ext
driver = mysql
connect = "host=127.0.0.1 dbname=postfix_accounts user=postfix_admin password=StrongPassw0rd"
default_pass_scheme = SHA512-CRYPT
password_query = SELECT Email as User, password FROM accounts_table WHERE Email='%u';

Next, configure the mailbox locations and namespaces by editing the files below:

$ sudo vim /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:/home/vmail/%d/%n/Maildir

namespace inbox {
  inbox = yes
}

mail_privileged_group = mail

Finally, open the /etc/dovecot/conf.d/10-master.conf and make the changes below.

$ sudo vim /etc/dovecot/conf.d/10-master.conf 
service imap-login {
  inet_listener imap {
    port = 143
  }
  inet_listener imaps {
    port = 993
    ssl = yes
  }
}
service pop3-login {
  inet_listener pop3 {
    port = 110
  }
  inet_listener pop3s {
    port = 995
    ssl = yes
  }
}
service submission-login {
  inet_listener submission {
    #port = 587
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
   mode = 0600
   user = postfix
   group = postfix
  }
}
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
    user = postfix
    group = postfix
  }
  unix_listener auth-userdb {
   mode = 0600
   user = vmail
  }
  user = dovecot
}
service auth-worker {
  user = vmail
}
service dict {
  unix_listener dict {
  }
}

To be able to receive emails from Postfix, add the below lines at the bottom of the file:

service stats {
    unix_listener stats-reader {
        user = vmail
        group = vmail
        mode = 0660
    }

    unix_listener stats-writer {
        user = vmail
        group = vmail
        mode = 0660
    }
}

Set the required permissions for the created directory;

sudo chown -R vmail:vmail /home/vmail
chmod -R 775 /home/vmail

Set other required permissions for the user:

sudo chown -R vmail:dovecot /etc/dovecot 
sudo chmod -R o-rwx /etc/dovecot 

You can make the below configurations for Dovecot SSL.

$ sudo vim /etc/dovecot/conf.d/10-ssl.conf
ssl = no

##If you want to use SSL here use ssl = required then add the files like:

ssl = required

ssl_cert = </etc/postfix/ssl/fullchain.pem
ssl_key = </etc/postfix/ssl/privkey.pem

You can choose to set it as no if you do not need any intention of using SSL. If you need to, then make the adjustments as shown above.

Restart the Dovecot service:

sudo systemctl restart dovecot

Verify if the service is running:

$ systemctl status dovecot
● dovecot.service - Dovecot IMAP/POP3 email server
   Loaded: loaded (/usr/lib/systemd/system/dovecot.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2022-10-02 08:52:31 UTC; 2s ago
     Docs: man:dovecot(1)
           https://doc.dovecot.org/
  Process: 7709 ExecStartPre=/usr/libexec/dovecot/prestartscript (code=exited, status=0/SUCCESS)
 Main PID: 7716 (dovecot)
    Tasks: 4 (limit: 48239)
   Memory: 4.6M
   CGroup: /system.slice/dovecot.service
           ├─7716 /usr/sbin/dovecot -F
           ├─7717 dovecot/anvil
           ├─7718 dovecot/log
           └─7719 dovecot/config

Step 6 – Install and Configure Roundcube on Rocky Linux 8

Now we need to set up a web-based client to manage the emails. First, pull the latest stable Roundcube release from the official Roundcube page.

You can also use the script below to pull the latest version.

VER="$(curl -s https://api.github.com/repos/roundcube/roundcubemail/releases/latest|grep tag_name|cut -d '"' -f 4|sed 's/v//')"
wget https://github.com/roundcube/roundcubemail/releases/download/$VER/roundcubemail-$VER-complete.tar.gz

Once downloaded, extract the archive.

sudo dnf install tar -y
tar xvzf roundcubemail-$VER-complete.tar.gz

Rename and move the file to the Apache webroot directory;

mv roundcubemail-$VER roundcube
sudo mv roundcube /var/www/html/

Allow apache to access the files:

sudo chown -R apache:apache /var/www/html/

Enable the HTTPS module on Apache

sudo dnf install mod_ssl -y

For the changes to apply, restart the Apache service:

sudo systemctl restart httpd

Allow the service through the firewall:

sudo firewall-cmd --permanent --add-port=80/tcp
sudo firewall-cmd --reload

Now access Roundcube from the web using the URL https://domain_name/roundcube/installer

Ensure that all the PHP checks are passed and click Next. Configure the database credentials.

Once done, click on “Create config”. You will have a config created at /var/www/html/roundcube/config

Click on Continue and proceed to initialize the database.

Now set the required permissions for the config and modify it accordingly.

sudo chown apache:apache /var/www/html/roundcube/config/config.inc.php
sudo vim /var/www/html/roundcube/config/config.inc.php

Provide the SMTP hosts, ports, and method of logging in as shown.

// IMAP
.....
#$config['imap_host'] = 'localhost:143'; ## If SSL is configured, use: 
$config['default_host'] = 'ssl://mail.example.com';

#$config['smtp_host'] = 'localhost';   ## If SSL is confgured, use: 
$config['smtp_host'] = 'tls://mail.example.com';

$config['support_url'] = '';

$config['default_port'] = 993;
$config['smtp_port'] = 587;
$config['smtp_user'] = '%u';
$config['smtp_pass'] = '%p';
$config['smtp_auth_type'] = 'LOGIN';
$config['debug_level'] = 1;
$config['smtp_debug'] = true;
$config['auto_create_user'] = true;
$config['plugins'] = array('virtuser_query'); 
$config['virtuser_query'] = "SELECT Email FROM postfix_accounts.accounts_table WHERE Email = '%u'"; ## Enables Roundcube to use authentication for virtual users for outgoing mail

On the web, all checks should pass as shown below.

Now remove the installer directory as advised at the bottom of the page.

Step 7 – Testing the Mail server

Now we need to allow all the required ports through the firewall. These ports include:

  • HTTPS: 443
  • IMAP: 143
  • IMAP Secure: 993
  • POP3: 110
  • POP3 Secure: 995
  • SMTP: 25
  • SMTP Secure: 465
  • MSA: 587

The command used for this task is:

sudo firewall-cmd --permanent --add-port={443,25,110,143,465,587,993,995}/tcp
sudo firewall-cmd --reload

Now to test if everything is working, we will load Roundcube from the web browser with the URL http://domain_name/roundcube

To log in, use any account configured before with the username. For example:

Once logged in, you are set to send and receive emails from the local and remote servers.

Create a sample email by clicking on Compose and proceed as shown.

Once sent, the message should appear under sent as shown;

From the inbox, you can be able to see received messages on the Mail server

Verdict

That marks the end of this guide on how to set up a mail Server on Rock Linux 8 With Postfix, Dovecot, MySQL, and RoundCube. At this point, you should be able to send and receive emails with the Mail Exchange records well configured on Rocky Linux 8.

See more:

Cart

Your Cart is Empty

Back To Shop