Getting an error for every post made to any list

As mentioned in the subject, I am getting the following error after every post. Any assistance would be much appreciated:
ERROR 2025-04-22 11:21:21,356 11617 django.request Internal Server Error: /archives/api/mailman/archive Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py", line 916, in get_or_create return self.get(**kwargs), False ^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py", line 637, in get raise self.model.DoesNotExist( hyperkitty.models.sender.Sender.DoesNotExist: Sender matching query does not exist.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ psycopg2.errors.StringDataRightTruncation: value too long for type character varying(255)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/handlers/exception.py", line 55, in inner response = get_response(request) ^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/core/handlers/base.py", line 197, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/views/decorators/http.py", line 43, in inner return func(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/hyperkitty/views/mailman.py", line 117, in _decorator return func(request, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/views/decorators/csrf.py", line 56, in wrapper_view return view_func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/hyperkitty/views/mailman.py", line 163, in archive add_to_list(mlist_fqdn, msg) File "/opt/mailman/venv/lib/python3.11/site-packages/hyperkitty/lib/incoming.py", line 95, in add_to_list sender = Sender.objects.get_or_create(address=sender_address)[0] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py", line 923, in get_or_create return self.create(**params), True ^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py", line 658, in create obj.save(force_insert=True, using=self.db) File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/base.py", line 814, in save self.save_base( File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/base.py", line 877, in save_base updated = self._save_table( ^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/base.py", line 1020, in _save_table results = self._do_insert( ^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/base.py", line 1061, in _do_insert return manager._insert( ^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/manager.py", line 87, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/query.py", line 1805, in _insert return query.get_compiler(using=using).execute_sql(returning_fields) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/models/sql/compiler.py", line 1822, in execute_sql cursor.execute(sql, params) File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 67, in execute return self._execute_with_wrappers( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 80, in _execute_with_wrappers return executor(sql, params, many, context) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 84, in _execute with self.db.wrap_database_errors: File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/utils.py", line 91, in __exit__ raise dj_exc_value.with_traceback(traceback) from exc_value File "/opt/mailman/venv/lib/python3.11/site-packages/django/db/backends/utils.py", line 89, in _execute return self.cursor.execute(sql, params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ django.db.utils.DataError: value too long for type character varying(255)

On 4/22/25 1:35 PM, sun zi via Mailman-users wrote:
As mentioned in the subject, I am getting the following error after every post. Any assistance would be much appreciated:
The error is from an attempt to archive a message. Since it fails, the problem message is queued in Mailman's var/archives/hyperkitty/spool/ directory and is retried with each post.
The message is in a Python pickle, *.pck, file in that directory. Yoy
can examine the message by giving it to mailman qfile
.
From the tracebacks you posted, it appears that the issue is that the sender's address is longer than 255 bytes.
Move the .pck file out of the var/archives/hyperkitty/spool/ directory and that will stop the recurring error.
If the message is spam you can ignore it. If you want to archive it you
need to edit the message's sender, but you can't edit the *.pck
directly. You can use mailman shell
and do something like
import pickle
with open('path/to/the/pickle', 'rb') as fp:
msg = pickle.load(fp)
# code here to edit the sender
with open('path/to/the/pickle', 'wb') as fp:
msg = pickle.dump(msg, fp)
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

After using the 'mailman qfile' command to review the email, it turned out to be spam as expected. As such, removed the file and no further errors have been received after posting.
Thank you so much for your help!
participants (2)
-
Mark Sapiro
-
sun zi