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.
- Access the following knowledge base article for detailed conversion instructions:
- How can I convert the Warden database to use the character set utf8mb4 instead of utf8mb3?
- Execute the provided commands to alter the database schema and update configuration parameters.
- 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.