• YouTube
  • LinkedIn
  • Google

Archives for : postfixadmin

Servidor de Email –; Part 2 ; MariaDB

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.

Servidor de Email –; Part 1 ; Necessary facilities

I have my own mail server using Postfix, Dovecot, MariaDB, SpamAssassin, ClamAV, Amavisd-new, fail2ban, nginx, postfixadmin and RoundCube under CentOS 7.
Although it has several recipes for how to configure this package, It took me many hours to figure out how to keep the service running correctly, each setting in and and in order to achieve in reducing the flood of spam that arrives every minute.
And anti-spam is the focus of this publication. I have suffered and still suffer with the constant attempts to use my services as a zombie or shedding of viruses, fraud and everything else you can.

I lost count of how many times my DNS service stopped by excess of connection attempts to entupiam the memory and forced the s.. cutting processes to conserve resources and the named was chosen for being the weakest link.
So, This article has focus in the proper configuration for private mail services, a few users and few domains. Certainly a lot of what is in this short manual serves to world-class services, but I believe that for these cases the use of tools or dedicated and specialized services should always be taken into consideration.

Continue Reading >>

Error when starting Amavisd-new

Two days ago I'm trying to install the software for my new server that will host this blog, my personal projects and my e-mail server.
I'm using as a base this HOWTO.

I had a lot of problems in installation and in particular an error when starting Amavisd-new

Googando I saw different ways to solve and no work. That's when I realized something silly, but that's making perfect sense. The packages mentioned, Perl-Mail-DKIM and perl-Crypt-OpenSSL-RSA., pointed to EL5 while the package Amavis pointed to EL6.
Checked that the DAG of rpmforge was using EL5 and correct for my Centos 6.3 was to use the DAG EL6. To correct this item and update packages, VOI-la. Everything worked beautifully.

Follow the steps to the fix

first import the key for the repository
rpm --import
Then uninstall the current (use yum search rpmforge-release to find out the correct name of the package), Download the RPM file and make the installation.

> yum remove rpmforge-release-0.5.2-2.el5.rf.x86_64
> wget
> rpm -i rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

The last step is to synchronize the distribution, that will cause the packages to be replaced by existing in EL5 EL6.
> yum distribution-synchronization

From this point, If there is already done the installation of all packages previously, they should not show this error.

I hope it helped you.

Useful links