How can I fix the error: DBD::MariaDB::st execute failed: Incorrect string value?

Overview

This article provides guidance for resolving MariaDB execution errors triggered when processing email messages containing extended Unicode characters, such as emojis or rare symbols.

Error Description

Mar 3 03:46:41 server amavis[1760673]: (1760673-07) (!)WARN save_info_final: sql exec: err=1366, 22007, DBD::MariaDB::st execute failed: Incorrect string value: '\\xF0\\x9F\\x98\\x8E\\xF0\\x9F...' for column `danami_warden`.`msgs`.`subject` at row 1 at /usr/share/perl5/vendor_perl/Amavis/Out/SQL/Connection.pm line 175, <GEN124> line 1923.

Cause

The error occurs when an email subject contains characters that exceed the storage capacity of the current database character set. The danami_warden database is configured to use utf8mb3, which only supports up to three-byte Unicode sequences. Four-byte characters (e.g., emojis) cannot be stored in columns defined with this character set, resulting in a MariaDB execution failure.

Resolution

To resolve this issue, convert the danami_warden database from utf8mb3 to utf8mb4. The utf8mb4 character set supports the complete Unicode standard and accommodates four-byte characters.

  1. Access the following knowledge base article for detailed conversion instructions:
  2. How can I convert the Warden database to use the character set utf8mb4 instead of utf8mb3?
  3. Execute the provided commands to alter the database schema and update configuration parameters.
  4. Restart the Amavis service to apply the changes.

Troubleshooting

If the error persists after performing the conversion, verify the following:

  • The MariaDB server version installed on the system supports utf8mb4.
  • All tables and columns within the danami_warden database have been successfully altered to use the new character set.
  • The Amavis service has been fully restarted to reload updated configuration values.
  • No additional application-level filters are intercepting or rejecting messages containing extended Unicode characters.
  • utf8mb4, utf8mb3, emojis, rare characters
  • 0 Користувачі, які знайшли це корисним
Ця відповідь Вам допомогла?

Схожі статті

How can I fix the error: Host '127.0.0.1' is not allowed to connect to this MariaDB server?

Overview This article provides resolution steps for the MariaDB connection error Host...

How can I fix the error: Parse error at /etc/clamav/clamd.conf Unknown option ScanImage?

Overview The clamav-daemon.service may fail to start due to unrecognized configuration...

How can I fix the error: The domain limit of this license key has been reached?

Overview The Admin and Pro editions of Danami products enforce a maximum domain limit within the...

After upgrading from Centos 7 to AlmaLinux 8 Amavis is treating mail with low scores as spam. How can I fix this?

Overview Following an upgrade from CentOS 7 to AlmaLinux 8, Amavis may incorrectly classify...