• YouTube
  • LinkedIn
  • Google

Servidor de Email –; Part 2 ; MariaDB

Share in your social media
  •  ;
  •  ;
  •  ;
  •  ;

This is the second part of the process of creating the mail server on a CentOS 7. If you came here by accident, You should read first the previous publication on the Installation of packages

Why use MariaDB/MySQL?

First of all I must clarify that I prefer to use PostgreSQL instead of MariaDB/MySQL for many reasons, However, There is one that weighs against the use of PostgreSQL in a unified server with WordPress and E-mail services is the simple fact that WP does not have native support for PostgreSQL. You can have more information on this topic on the official WordPress documentation This link. How am I basing on personal experience to write this document and also for small services, I'm using the most common and most accessible. If the use of PostgreSQL is of your interest, You can consult this document later where I'll show you how to migrate from MariaDB for PostgreSQL.

Configuring MariaDB/MySQL

Assuming that you are following the steps of this manual, You'll be with an installation of MariaDB still not configured. If you already have a functional installation, You can skip to the next step.

Initially I block any and all access to the database of foreign origin. Only from connections created within the server itself is that they may be made for safety. For that we open the file /etc/my.cnf. d/server.cnf and add the following lines right after [mysqld] existing.

If the intention is to allow remote connections to MariaDB, You must run the following commands to enable remote connections.

Restart the service for the changes to take effect

Creating user for Postfix and the required tables

So we can use the Postfix with the MariaDB we have to create a user for access to and from it the required tables to manage virtual domains and accounts.

First let's create the database.

NOTE: If it was not made any change in MariaDB installation you can connect without the use of password for the user ;root’;@’;localhost’;, otherwise, use the option -p to be requested enter the password.

Then we'll create the user and tables. I'm going to use mypostfixdb as the name for the database and mypostfixdbuser for the user name. Change the information according to what you want, mainly mypostfixdbuser_password. This information will be used in the configuration of Postfix files that use tables created.

These tables will store the accounts and virtual domains and will be accessed by Dovecot (According to the proposal of this tutorial).
And that's all.

Now we're ready to configure the Dovecot.

Share in your social media
  •  ;
  •  ;
  •  ;
  •  ;

Comments (3)

  1. [;] With everything installed we can start the settings. Let's start with MariaDB. [;]

Leave a Reply

Your email address will not be published. Required fields are marked *

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