1 (edited by mike175de 2020-03-14 17:44:30)

Topic: AMAVIS: ERROR sql_storage: too many retries on storing final

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.1
- Deployed with iRedMail Easy or the downloadable installer? Installer
- Linux/BSD distribution name and version: Buster
- 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.
====

Hey there,

I found a few entries in my mail.warn-log which maybe affecting other users of iRedMail as well:

Mar 14 06:07:11 mbox amavis[3562]: (03562-04) (!)WARN save_info_final: sql exec: err=1366, 22007, DBD::mysql::st execute failed: Incorrect string value: '\\xF0\\x9F\\x9A\\xB4\\xF0\\x9F...' for column `amavisd`.`msgs`.`subject` at row 1 at (eval 108) line 173.
Mar 14 06:07:12 mbox amavis[3562]: (03562-04) (!)WARN save_info_final: sql exec: err=1366, 22007, DBD::mysql::st execute failed: Incorrect string value: '\\xF0\\x9F\\x9A\\xB4\\xF0\\x9F...' for column `amavisd`.`msgs`.`subject` at row 1 at (eval 108) line 173.
Mar 14 06:07:14 mbox amavis[3562]: (03562-04) (!)WARN save_info_final: sql exec: err=1366, 22007, DBD::mysql::st execute failed: Incorrect string value: '\\xF0\\x9F\\x9A\\xB4\\xF0\\x9F...' for column `amavisd`.`msgs`.`subject` at row 1 at (eval 108) line 173.
Mar 14 06:07:17 mbox amavis[3562]: (03562-04) (!)WARN save_info_final: sql exec: err=1366, 22007, DBD::mysql::st execute failed: Incorrect string value: '\\xF0\\x9F\\x9A\\xB4\\xF0\\x9F...' for column `amavisd`.`msgs`.`subject` at row 1 at (eval 108) line 173.
Mar 14 06:07:18 mbox amavis[3562]: (03562-04) (!)WARN save_info_final: sql exec: err=1366, 22007, DBD::mysql::st execute failed: Incorrect string value: '\\xF0\\x9F\\x9A\\xB4\\xF0\\x9F...' for column `amavisd`.`msgs`.`subject` at row 1 at (eval 108) line 173.
Mar 14 06:07:18 mbox amavis[3562]: (03562-04) (!!)ERROR sql_storage: too many retries on storing final, info not saved

A Online-search found no results.

Cause it is only a warning, the system should work fine, but maybe it is worth a deeper look into?

Greets, mike

----

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

2

Re: AMAVIS: ERROR sql_storage: too many retries on storing final

It says "incorrect string value", might be caused by unsupported characters in current SQL column types.
Could you share the mail subject, sender, recipient of these emails?

3

Re: AMAVIS: ERROR sql_storage: too many retries on storing final

Hey ZhangHuangbin,

thx for your reply.

The mail was a newsletter:

To: <michael@lehner-online.net>
Subject: =?utf-8?q?=E2=9C=A8SANTA_CRUZ_Bikes_2020_=F0=9F=9A=B4=F0=9F=8F=BD?= =?utf-8?q?=E2=80=8D=E2=99=82=EF=B8=8F_%?=
Content-Type: multipart/alternative; boundary="-------?=_35938-4487542413269"
Date: Sat, 14 Mar 2020 05:07:00 +0000
Feedback-ID: 213.32.187.117:1697684_1003:1697684:Sendinblue
From: biker-boarder.de News <news@biker-boarder.de>
List-Id: MTY5NzY4NC00NjgxNTAtNDE= <MTY5NzY4NC00NjgxNTAtNDE=.list-id.sib2.biker-boarder.de>
List-Unsubscribe: <mailto:unsubscribe@sib2.biker-boarder.de?subject=unsub-miw9bnwioh4b7j&body=miw9bnwioh4b7j>,<http://r.sib2.biker-boarder.de/mk/un/li/uUG-nguDzhXHLisIur8WTUBMtUfvud3ektlojQhaC1sKN7BONRwhGUNridrmZA5-zU_jNCTtcfRISssSYOdoT7OEwAlr-2dPbW6oPHwIwAlEZDqkD8Ssi47rvDE8ilOh5m-S3IVvJPQ-_deleted>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
MIME-Version: 1.0
Message-Id: <202014030507.miw9bnwioh4b7j@sib2.biker-boarder.de>
Precedence: bulk
Reply-To: marketing@biker-boarder.de
X-Mailer: Sendinblue
X-Mailin-Campaign: 1003
X-Mailin-Client: 1697684
X-sib-id: 4AzE6kpM7g7lNMjpyVOBXbIZvR-SsNxC-WgcZaGEPDj1wGK7MwqhH4dWUUJwgAZFAzPbL1HnPj42whl6iHORD-gQf_N04UeqI3o6czS8IM7j-Ze95qM0B0FwnGNwVTa5KamZsRMtoKNAHtp6E2dLxAoedLLFCAg9KCjSmO3Tgc5vg-UL6Q

And in the subject line you can see some emojies see attachment as well).

Greets and thx again, mike

Post's attachments

Bildschirmaufnahme vom 2020-03-19 07:31:27.png
Bildschirmaufnahme vom 2020-03-19 07:31:27.png 8.22 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

4

Re: AMAVIS: ERROR sql_storage: too many retries on storing final

ok, it's clear caused by emojis.
Converting to column "msgs.subject" to VARBINARY type should fix this issue:

USE amavisd;
ALTER TABLE msgs MODIFY COLUMN subject VARBINARY(255) NOT NULL DEFAULT '';

Let me know how it works. smile

5

Re: AMAVIS: ERROR sql_storage: too many retries on storing final

Thx ZhangHuangbin,

seems to be working.

Do I have to use the command everytime when an mail uses emojis in the subject line?

Greets, mike

6

Re: AMAVIS: ERROR sql_storage: too many retries on storing final

Definitely not necessary, after that update, it now supports storing emoji characters. smile