On 4/1/22 12:27, Guillermo Hernandez (Oldno7) via Mailman-users wrote:
First of all, best wishes and Happy New Year for everybody.
Two days ago I had to reinstall all mailman3 related apps in a mailman 3 server (I tried to upgrade just hipperkitty, but it went bad). At first, all seemed running as before, but I just noted that the messages are not being archived.
I've found some information that can be related to the problem I had:
In https://docs.mailman3.org/projects/hyperkitty/en/latest/news.html yo can see that in the security notes for 1.3.5
"Pass the secret archiver key in a HTTP Authorization header instead of a GET query parameter so it doesn’t appear in logs. (CVE-2021-35058, Closes #387)"
As the lack of any clue persists on how to solve the problem, I've just reproduced step by step upgrade process.
I've just executed a (being "mailman3" the user configured for all of this)
pip install --upgrade --force-reinstall --no-deps --no-cache-dir django-mailman3 mailman mailman-hyperkitty mailmanclient postorius django hyperkitty
su -m mailman3 -c "python3 manage.py collectstatic" su -m mailman3 -c "python3 manage.py migrate"
In this last point I've received some warnings of this kind:
*-*-*-*-*-*-*
WARNINGS: account.EmailAddress: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'. HINT: Configure the DEFAULT_AUTO_FIELD setting or the AccountConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'. account.EmailConfirmation: (models.W042) Auto-created primary key used when not defining a primary key type, by default 'django.db.models.AutoField'.
...
HINT: Configure the DEFAULT_AUTO_FIELD setting or the SocialAccountConfig.default_auto_field attribute to point to a subclass of AutoField, e.g. 'django.db.models.BigAutoField'.
Operations to perform: Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount Running migrations: No migrations to apply. Your models in app(s): 'postorius' have changes that are not yet reflected in a migration, and so won't be applied. Run 'manage.py makemigrations' to make new migrations, and then re-run 'manage.py migrate' to apply them.
*-*-*-*-*-*-*
Running a 'su -m mailman3 -c "python3 manage.py makemigrations" shows the same warning listed before and some new errors:
*-*-*-*-*-*-*
Migrations for 'postorius': /usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py - Alter field name on emailtemplate Traceback (most recent call last): File "manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line utility.execute() File "/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py", line 413, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 354, in run_from_argv self.execute(*args, **cmd_options) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 398, in execute output = self.handle(*args, **options) File "/usr/local/lib/python3.7/site-packages/django/core/management/base.py", line 89, in wrapped res = handle_func(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/makemigrations.py", line 190, in handle self.write_migration_files(changes) File "/usr/local/lib/python3.7/site-packages/django/core/management/commands/makemigrations.py", line 228, in write_migration_files with open(writer.path, "w", encoding='utf-8') as fh: PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py'
*-*-*-*-*-*-*
The file '/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py' does not exist at all
Despite the error, I did a 'su -m mailman3 -c "python3 manage.py compress"' and the subsequent "django-admin compilemessages" in
/usr/local/lib/python3.7/site-packages/postorius, ../hyperkitty and ../django_mailman3
And the log continues showing the same error when trying archive a new message.
ERROR 2022-01-05 12:27:31,406 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:31,418 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:31,685 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:32,045 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:32,070 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-05 12:27:32,093 6988 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
The odd thing is that you can see the archived messages previous to a few days ago, when I tried to upgrade hyperkitty. Only the new messages are "disappearing" (but they are being distributed).
Some guide on what to look for, please?
This server manages just a few lists with very low traffic, but I don't want to screw it all when upgrading other servers with normal traffic and much more lists.
TIA
I did not change any config. Now the log is showing
ERROR 2022-01-03 12:22:15,654 7165 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-03 12:22:15,674 7165 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-03 12:22:15,791 7165 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-03 12:22:16,208 7165 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header. ERROR 2022-01-04 11:44:55,644 30518 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header ERROR 2022-01-04 11:44:55,664 30518 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header ERROR 2022-01-04 11:44:56,478 30518 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header ERROR 2022-01-04 11:44:56,620 30518 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header ERROR 2022-01-04 11:44:56,647 30518 hyperkitty.views.mailman The MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header
(it's a very low traffic list: just two messages in two days)
I do believe I did the upgrade/reinstall procedure as in previous upgrades (using pip: it's a system wide installation, not using dockers or venv), but seems that I did something wrong
The messages are being delivered normally, but it fails archiving
Before I make a bigger hole for myself, where to look for?
Versions installed:
HyperKitty 1.3.5
mailman 3.3.5 mailman-hyperkitty 1.2.0 mailmanclient 3.3.3
postorius 1.3.6
uWSGI 2.0.19.1
Mailman Core Version GNU Mailman 3.3.5 (Tom Sawyer) Mailman Core API Version 3.1 Mailman Core Python Version 3.7.9 (default, Nov 30 2020, 10:49:53) [Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611a
--
Mailman's content filtering has removed the following MIME parts from this message.
Content-Type: image/png Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.