1

Topic: Error with mariadb (aborted connection) & postfix (lost connection)

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.5.0
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Debian Bullseye
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I upgrade my debian to debian bullseye & upgrade iredmail server but now i have this message in log:

Dec 31 15:13:38 josephine mariadbd[524]: 2021-12-31 15:13:38 5497 [Warning] Aborted connection 5497 to db: 'iredapd' user: 'iredapd' host: 'localhost' (Got an error reading communication packets)
Dec 31 15:13:38 josephine mariadbd[524]: 2021-12-31 15:13:38 5498 [Warning] Aborted connection 5498 to db: 'iredapd' user: 'iredapd' host: 'localhost' (Got an error reading communication packets)
Dec 31 15:13:38 josephine mariadbd[524]: 2021-12-31 15:13:38 5499 [Warning] Aborted connection 5499 to db: 'iredapd' user: 'iredapd' host: 'localhost' (Got an error reading communication packets)
Dec 31 15:13:42 josephine postfix/smtps/smtpd[135410]: warning: unknown[212.70.149.72]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Dec 31 15:13:46 josephine postfix/smtps/smtpd[135410]: lost connection after AUTH from unknown[212.70.149.72]
Dec 31 15:13:46 josephine postfix/smtps/smtpd[135410]: disconnect from unknown[212.70.149.72] ehlo=1 auth=0/1 rset=1 commands=2/3
Dec 31 15:14:14 josephine mariadbd[524]: 2021-12-31 15:14:14 5506 [Warning] Aborted connection 5506 to db: 'vmail' user: 'vmailadmin' host: 'localhost' (Got an error reading communication packets)
Dec 31 15:14:14 josephine mariadbd[524]: 2021-12-31 15:14:14 5524 [Warning] Aborted connection 5524 to db: 'vmail' user: 'vmailadmin' host: 'localhost' (Got an error reading communication packets)
Dec 31 15:14:15 josephine mariadbd[524]: 2021-12-31 15:14:15 5525 [Warning] Aborted connection 5525 to db: 'vmail' user: 'vmailadmin' host: 'localhost' (Got an error reading communication packets)
Dec 31 15:14:27 josephine postfix/smtps/smtpd[135410]: connect from unknown[212.70.14]
Dec 31 15:15:01 josephine postfix/smtps/smtpd[135410]: warning: unknown[212.70.149.72]: SASL LOGIN authentication failed: UGFzc3dvcmQ6
Dec 31 15:15:05 josephine postfix/smtps/smtpd[135410]: lost connection after AUTH from unknown[212.70.149.72]
Dec 31 15:15:06 josephine postfix/smtps/smtpd[135410]: disconnect from unknown[212.70.149.72] ehlo=1 auth=0/1 rset=1 commands=2/3

each minute.

How can i fix it ?

Thank you

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Error with mariadb (aborted connection) & postfix (lost connection)

[mysqld]
max_allowed_packet=256M

try to change this in your mariadb server config file, restart mysqld afterwards

3 (edited by Ange7 2022-01-04 16:30:21)

Re: Error with mariadb (aborted connection) & postfix (lost connection)

Cthulhu wrote:

[mysqld]
max_allowed_packet=256M

try to change this in your mariadb server config file, restart mysqld afterwards

Done

in `/etc/mysql/mariadb.conf/50-server.cnf `

with :

[mysqld]

#
# * Basic Settings
#

user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql
lc-messages             = en_US
skip-external-locking

# Broken reverse DNS slows down connections considerably and name resolve is
# safe to skip if there are no "host by domain name" access grants
#skip-name-resolve

# Instead of skip-networking the default is now to listen only on
# localhost which is more compatible and is not less secure.
bind-address            = 127.0.0.1

#
# * Fine Tuning
#

#key_buffer_size        = 128M
max_allowed_packet     = 1G
                                 

But I still have the same error

4

Re: Error with mariadb (aborted connection) & postfix (lost connection)

In mysql config file, under section "[mysqld]", add this line:

log_warnings = 1

Then restart mysql service.

(My) Explanation:

# MariaDB 10.2.14+ sets this to 2 by default, but we better set it to 1.
# If there's some sql client program doesn't properly handle sql connections,
# it may cause error like this in mariadb log file:
#
# `Aborted connection X to db: ... (Got timeout reading communication packets)`.
#
# If there're too many errors and eventually reaches `max_connect_errors`,
# this sql client host will be blocked from making further connections, which
# means Postfix/Dovecot/... will not be able to connect to SQL server and
# mail services are down.
#
# FYI:
# https://mariadb.com/kb/en/server-system … g_warnings
# https://mariadb.com/kb/en/server-system … rror_count