On Thu, 2021-01-28 at 12:03 -0800, Mark Sapiro wrote: On 1/28/21 5:33 AM, David Partain via Mailman-users wrote: I wrote: I have the same issue, and have changed the configuration in /etc/mailman3/mailman-web.py to: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailman3web', 'USER': 'mailman3web', 'PASSWORD': 'xxxxxxxxxxxxxxxxxx', 'HOST': 'localhost', 'PORT': '', 'OPTIONS': { 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", 'charset': 'utf8mb4', }, } } and restarted stuff, but I cannot tell that it has changed anything. You responded: That should do it. I think the original message should have been saved as a queue entry in Mailman's var/archives/hyperkitty/spool/ directory. That directory has all of the messages sent to that list: # ls /var/lib/mailman3/archives/hyperkitty/spool/ 1611827925.8030825+925c996b9b6020ee18e9a689ce23384855159f77.pck 1611827926.1923075+e728f3c29c1fe6eeeca641314cdba7007cb6e132.pck 1611827925.8917305+d16b7004bdbbef98ce40fb8ee70e492715d1607d.pck 1611827926.2623458+1aac13b50d8e7f32eb14d13e6559656aa8f3bd10.pck 1611827925.9594557+7ad2a910b5ee9142c88f0bf26c60c6df960d4262.pck 1611827926.3488555+04a540651c5f829751518433e1c54168ab63a38b.pck 1611827926.0404096+a5e745f51a9f7d541aeb770a89604be17019f3c5.pck 1611827926.4206145+de861eec6404d0c8f9f8bdb180e29bff2de7c52b.pck 1611827926.1167526+0aa63639a4ec102bf63522827637e75e6a2b092a.pck This is what's expected since the underlying issue isn't yet fixed. Yes, I'm still seeing the errors. When I send mail to a list with a cute emoji, I see the following in /var/log/mailman3/web/mailman-web.log: ERROR 2021-01-28 10:58:45,708 16923 django.request Internal Server Error: /mailman3/hyperkitty/api/mailman/archive (bunch of python errors omitted) DataError: (1366, u"Incorrect string value: '\\xF0\\x9F\\x98\\x8A\\x0A\\x0A...' for column 'content' at row 1") OK. The issue is with your database it doesn't like '\xF0\x9F\x98\x8A' which is a 4-byte utf-8 encoding for a smiley face emoji. The issue is with MySQL and MariaDB which do not accept 4-byte utf-8 encodings by default. The settings you show above should be sufficient to allow 4-byte utf-8 encodings. I'm not that familiar with how the Debian/Ubuntu package sets things up. Are you sure that /etc/mailman3/mailman-web.py is the settings file used by Django, and if so does it have at the end something like ``` try: from settings_local import * except ImportError: pass ``` and if so is there something there that overrides the DATABASES setting? If all that is OK, you may need to do something like ``` ALTER DATABASE mailman3web CHARACTER SET utf8mb4; ALTER TABLE hyperkitty_email CHARACTER SET utf8mb4; ``` on the database itself. Hi Mark (and others), I'm now looking at this again after having to focus on other stuff. I'm befuddled, and I don't really know what to do now. I did the above. If I send mail to my list with those bleeping emojis, I see the same errors. In /var/log/mailman3/web/mailman-web.log I see DataError: (1366, u"Incorrect string value: '\\xF0\\x9F\\x95\\xB5\\xF0\\x9F... new mail to root, /var/lib/mailman3/archives/hyperkitty/spool/ has a new file, etc. The mail gets delivered, of course. If I then look at the database itself, I see: mysql> use mailman3web; mysql> SELECT @@character_set_database, @@collation_database; +--------------------------+----------------------+ | @@character_set_database | @@collation_database | +--------------------------+----------------------+ | utf8mb4 | utf8mb4_general_ci | +--------------------------+----------------------+ 1 row in set (0.00 sec) mysql> SHOW TABLE STATUS where name like 'hyperkitty_email'; +------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+ | Name | Engine | Version | Row_format | Rows | Avg_row_length | Data_length | Max_data_length | Index_length | Data_free | Auto_increment | Create_time | Update_time | Check_time | Collation | Checksum | Create_options | Comment | +------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+ | hyperkitty_email | InnoDB | 10 | Dynamic | 133 | 11949 | 1589248 | 0 | 196608 | 4194304 | 150 | 2021-01-29 17:23:13 | NULL | NULL | utf8mb4_general_ci | NULL | | | +------------------+--------+---------+------------+------+----------------+-------------+-----------------+--------------+-----------+----------------+---------------------+-------------+------------+--------------------+----------+----------------+---------+ 1 row in set (0.00 sec) So, I go look elsewhere... In /etc/mailman3/mailman.cfg I see: class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://mailman3:NopeNotPastingThat@localhost/mailman3?charset=utf8&use_unicode=1 Should I change the latter to be something like: url: mysql+pymysql://mailman3:NopeNotPastingThat@localhost/mailman3?charset=utf8mb4&use_unicode=1 ? Cheers, David