Search results for query "sapiro"
- 5812 messages

[MM3-users] Re: converting bulk accept_these_nonmembers in migration from mailman 2 to 3
by Lucio Chiappetti
Dear Mark, thanks for your interest.
On Fri, 11 Feb 2022, Mark Sapiro wrote:
> This may actually be a bug. I'll have to think about that. I've filed
> https://gitlab.com/mailman/mailman/-/issues/978 on this.
> This is https://gitlab.com/mailman/mailman/-/issues/794 (still open)
Given the time needed to solve the issues (I will anyhow notify the site
administrators, hopting they would update mailman when/if resolved), this
means we have to find a workaround.
> And those non-members all have there moderation action set to Defer
> which means their posts will be accepted but the additional checks such
> as too big, etc. will still be applied.
not sure what you mean by "defer". The non-member options I see are called
List default -- follow the list's default member action.
Hold -- This holds the message for approval by the list moderators.
Reject -- this automatically rejects the message by sending a bounce
notice to the post's author. The text of the bounce notice can be
configured by you.
Discard -- this simply discards the message, with no notice sent to the
post's author.
Accept -- accepts any postings without any further checks.
Default Processing -- run additional checks and accept the message.
> If they are nonmembers, you can accept the post and set moderation
> action in one operation in Postorius, but the regexps in
> hold_these_nonmembers will still take precedence.
OK, I've found where to do it, it requires to select the held message and
scroll to the bottom then set Moderation from a menu.
But if hold_these_nonmembers takes priority this will be uselesws in the
current setting.
> I'm not sure what you are looking at here. Imported nonmembers should
> all have moderation action set according to which *_these_nonmembers
> they came from. Imported members should have their moderation action set
> to Defer if they were unmoderated and if they were moderated, it should
> be set based on the 2.1 list's member_moderation_action.
I go to the non-member list, select non-member options and at the bottom
see an item Administration options Moderation. The possible values are
those I pasted above.
The actual value for most of the imported non-members is "Default
processing" while it is "List default" for thoase automatically added
afresh, It is "Discard" for a number of imported non-members with
spam-looking addresses (I guess they were in some other *_not_members part
of the standard 2.1 antispam ... I can't recall me doing something on
those)
Side question: is there a way to operate IN BULK on non-members ? Like it
is for members (I exported them to CSV).
>> - if so, how can we do it automatically for all 189 entries ?
>> - or move back the 189 addresses to accept_these_nonmembers ?
> Yes, move them back.
I am not so concerned of these 189 (or better of the 189 minus the discard
ones which should stay) ... anyhow moving them back will be uncomfortable
if there is not a bulk operation tool.
I am more concerned of the new cases automatically added.
Our member list includes 1043 addresses. Of these less than 20 use an
external address (say gmail), so they post "from home" and will pass.
194 addresses are of the form name.surname(a)inaf.it (these are likely to be
recently hired staff, who have and use onlyu the organization-wide
address).
All the rest (so still more than 800, can't really ask all of them to
re-register (*)) are of the form username(a)institute.inaf.it (and it won't
be easy also to bulk-delete and bulk-resubscribe because of the
inhomogeneous mapping of username to name.surname.
Of these about 800 some are lurkers and are no problem. Some are frequent
posters and remember to post from username(a)institute.inaf.it and are no
problem. Other may post from an alternate address (maybe even the old
address exists as a receiving-only alias), and in this case with
the current arrangement they will bo on hold every time.
I guess we should wait for the solution of issue 794
(*) by the way do you confirm that if one is subscribed to a list with an
address (be it bulk subscription, import or new fast subscription), this
person CANNOT change their settings (or address) unless one does a "sign
in" to a (Postorius) account ?
> It is because all the legacy *_these_nonmember actions are applied
> before nonmember moderation checks, so if an address matches a regex in
> hold_these_nonmembers, the post will be held regardless of the
> nonmember's moderation action.
> Addresses still work, and accept_these_nonmembers takes precedence over
> hold_these_nonmembers just as in MM 2.1.
This was not my impression when I ran a thorough test of 12 cases. Except
the obvious case of the subscriber posting from the subscription address,
all messages went on hold.
Whatever the non-member moderation would be (even if set to reject ! ...
but that makes sense if *_these_nonmembers prevail on non-member options),
and even if the address was set explicitly in accept_these_nonmembers
(should I delete it from the non-member list ?)
What is the actual order (or flow chart) of choices ?
*_these_nonmembers in the order listed in the page (within each in the
order of occurrence of regexp's) then non-member options ?
If I have Name.Surname(a)inaf.it in accept_these_nonmembers, then
hold_these_nonmembers set to
^.+@.+\.it
^.+@.+\.tng\.iac\.es
what do you foresee ?
And for different regexps, will processing terminate at the first
non-matching one, will they be ANDed or ORed, or what ?
I am reluctant to accept inconditionally ^.+\..+(a)inaf\.it (they may be
falsified, only the check on their presence in the other list (issue 794)
I guess I should remove the ^.+@.+\.it regexp AND AT THE SAME TIME change
the Default action to take when a non-member posts to the list to Hold
instead of Discard.
This way we'll have to check spam (instead of having it auto-discarded),
but if people with alternate addresses post, once they are entered in the
Non-member list they can be authorized to pass for the future ...
.. would it work ?
--
Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html
3 years, 6 months

[MM3-users] Re: Migrating mailman3 to latest ubuntu lts
by Helio Loureiro
And using the module manually works...
(venv) mailman@new-server ~ (v3.3.9) [0|127]> *ipython3*
/usr/lib/python3/dist-packages/IPython/core/interactiveshell.py:949:
UserWarning: Attempting to work in a virtualenv. If you encounter problems,
please install IPython inside the virtualenv.
warn(
Python 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0]
Type 'copyright', 'credits' or 'license' for more information
IPython 7.31.1 -- An enhanced Interactive Python. Type '?' for help.
In [1]: *import MySQLdb*
(venv) mailman@new-sever ~ (v3.3.9)> *fg*
Send job 1, 'ipython3' to foreground
In [3]: *con = MySQLdb.connect("localhost", "mailman3web",
"*****************", "mailman3web")*
In [4]:
*cursor = con.cursor()*
In [5]: *cursor.execute("show tables")*
Out[5]: 34
In [6]: *print(cursor.fetchall())*
(('account_emailaddress',), ('account_emailconfirmation',),
('auth_group',), ('auth_group_permissions',), ('auth_permission',),
('auth_user',), ('auth_user_groups',), ('auth_user_user_permissions',),
('django_admin_log',), ('django_content_type',),
('django_mailman3_maildomain',), ('django_mailman3_profile',),
('django_migrations',), ('django_q_ormq',), ('django_q_schedule',),
('django_q_task',), ('django_session',), ('django_site',),
('hyperkitty_attachment',), ('hyperkitty_email',),
('hyperkitty_favorite',), ('hyperkitty_lastview',),
('hyperkitty_mailinglist',), ('hyperkitty_profile',),
('hyperkitty_sender',), ('hyperkitty_tag',), ('hyperkitty_tagging',),
('hyperkitty_thread',), ('hyperkitty_threadcategory',),
('hyperkitty_vote',), ('socialaccount_socialaccount',),
('socialaccount_socialapp',), ('socialaccount_socialapp_sites',),
('socialaccount_socialtoken',))
In [7]: *cursor.execute("select * from account_emailaddress")*
Out[7]: 2530
In [8]: *print(cursor.fetchall())*
So what can I do? Is there a way to troubleshoot the root cause of this
issue?
Best Regards,
Helio Loureiro
https://helio.loureiro.eng.br
https://github.com/helioloureiro
https://mastodon.social/@helioloureiro
On Tue, 19 Dec 2023 at 11:11, Helio Loureiro <helio(a)loureiro.eng.br> wrote:
> Hi,
>
> No luck :(
>
> (venv) mailman@new-server ~ (v3.3.9)> *pip freeze | egrep
> "mailman-web|django-mailman3|django-allauth"*
> django-allauth==0.59.0
> django-mailman3==1.3.11
> mailman-web==0.0.8
> (venv) mailman@new-server ~ (v3.3.9)> *pip install -U
> django-allauth==0.58.0*
> Collecting django-allauth==0.58.0
> Downloading django-allauth-0.58.0.tar.gz (861 kB)
> ---------------------------------------- 861.7/861.7 KB 9.4 MB/s eta
> 0:00:00
> Installing build dependencies ... done
> Getting requirements to build wheel ... done
> Installing backend dependencies ... done
> Preparing metadata (pyproject.toml) ... done
> Requirement already satisfied: requests-oauthlib>=0.3.0 in
> ./venv/lib/python3.10/site-packages (from django-allauth==0.58.0) (1.3.1)
> Requirement already satisfied: Django>=3.2 in
> ./venv/lib/python3.10/site-packages (from django-allauth==0.58.0) (4.1.13)
> Requirement already satisfied: pyjwt[crypto]>=1.7 in
> ./venv/lib/python3.10/site-packages (from django-allauth==0.58.0) (2.8.0)
> Requirement already satisfied: requests>=2.0.0 in
> ./venv/lib/python3.10/site-packages (from django-allauth==0.58.0) (2.31.0)
> Requirement already satisfied: python3-openid>=3.0.8 in
> ./venv/lib/python3.10/site-packages (from django-allauth==0.58.0) (3.2.0)
> Requirement already satisfied: asgiref<4,>=3.5.2 in
> ./venv/lib/python3.10/site-packages (from
> Django>=3.2->django-allauth==0.58.0) (3.7.2)
> Requirement already satisfied: sqlparse>=0.2.2 in
> ./venv/lib/python3.10/site-packages (from
> Django>=3.2->django-allauth==0.58.0) (0.4.4)
> Requirement already satisfied: cryptography>=3.4.0 in
> ./venv/lib/python3.10/site-packages (from
> pyjwt[crypto]>=1.7->django-allauth==0.58.0) (41.0.7)
> Requirement already satisfied: defusedxml in
> ./venv/lib/python3.10/site-packages (from
> python3-openid>=3.0.8->django-allauth==0.58.0) (0.7.1)
> Requirement already satisfied: urllib3<3,>=1.21.1 in
> ./venv/lib/python3.10/site-packages (from
> requests>=2.0.0->django-allauth==0.58.0) (2.1.0)
> Requirement already satisfied: charset-normalizer<4,>=2 in
> ./venv/lib/python3.10/site-packages (from
> requests>=2.0.0->django-allauth==0.58.0) (3.3.2)
> Requirement already satisfied: idna<4,>=2.5 in
> ./venv/lib/python3.10/site-packages (from
> requests>=2.0.0->django-allauth==0.58.0) (3.6)
> Requirement already satisfied: certifi>=2017.4.17 in
> ./venv/lib/python3.10/site-packages (from
> requests>=2.0.0->django-allauth==0.58.0) (2023.11.17)
> Requirement already satisfied: oauthlib>=3.0.0 in
> ./venv/lib/python3.10/site-packages (from
> requests-oauthlib>=0.3.0->django-allauth==0.58.0) (3.2.2)
> Requirement already satisfied: typing-extensions>=4 in
> ./venv/lib/python3.10/site-packages (from
> asgiref<4,>=3.5.2->Django>=3.2->django-allauth==0.58.0) (4.9.0)
> Requirement already satisfied: cffi>=1.12 in
> ./venv/lib/python3.10/site-packages (from
> cryptography>=3.4.0->pyjwt[crypto]>=1.7->django-allauth==0.58.0) (1.16.0)
> Requirement already satisfied: pycparser in
> ./venv/lib/python3.10/site-packages (from
> cffi>=1.12->cryptography>=3.4.0->pyjwt[crypto]>=1.7->django-allauth==0.58.0)
> (2.21)
> Building wheels for collected packages: django-allauth
> Building wheel for django-allauth (pyproject.toml) ... done
> Created wheel for django-allauth:
> filename=django_allauth-0.58.0-py3-none-any.whl size=1157319
> sha256=a430c552101d1ad47bc00b16d1c1d6df728afacdd13823927b4cbfb02c35dbfc
> Stored in directory:
> /local/mailman/.cache-ubuntu-22.04/pip/wheels/55/0a/79/e199827a18f310906c2a90b0e92b89c41daf21d2a502db6710
> Successfully built django-allauth
> Installing collected packages: django-allauth
> Attempting uninstall: django-allauth
> Found existing installation: django-allauth 0.59.0
> Uninstalling django-allauth-0.59.0:
> Successfully uninstalled django-allauth-0.59.0
> Successfully installed django-allauth-0.58.0
> (venv) mailman@new-server ~ (v3.3.9)> *mailman-web migrate*
> System check identified some issues:
>
> WARNINGS:
> account.EmailAddress: (models.W036) MariaDB does not support unique
> constraints with conditions.
> HINT: A constraint won't be created. Silence this warning if you don't
> care about it.
> account.EmailAddress: (models.W043) MariaDB does not support indexes on
> expressions.
> HINT: An index won't be created. Silence this warning if you don't care
> about it.
> Operations to perform:
> Apply all migrations: account, admin, auth, contenttypes,
> django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
> socialaccount
> Running migrations:
> Applying account.0004_alter_emailaddress_drop_unique_email...Traceback
> (most recent call last):
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
> line 89, in _execute
> return self.cursor.execute(sql, params)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
> line 75, in execute
> return self.cursor.execute(query, args)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
> 179, in execute
> res = self._query(mogrified_query)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
> 330, in _query
> db.query(q)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
> line 257, in query
> _mysql.connection.query(self, query)
> MySQLdb.OperationalError: (2013, 'Lost connection to MySQL server during
> query')
>
> The above exception was the direct cause of the following exception:
>
> Traceback (most recent call last):
> File "/local/mailman/venv/bin/mailman-web", line 8, in <module>
> sys.exit(main())
> File
> "/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py",
> line 90, in main
> execute_from_command_line(sys.argv)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py",
> line 446, in execute_from_command_line
> utility.execute()
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py",
> line 440, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
> line 402, in run_from_argv
> self.execute(*args, **cmd_options)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
> line 448, in execute
> output = self.handle(*args, **options)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
> line 96, in wrapped
> res = handle_func(*args, **kwargs)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/core/management/commands/migrate.py",
> line 349, in handle
> post_migrate_state = executor.migrate(
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py",
> line 135, in migrate
> state = self._migrate_all_forwards(
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py",
> line 167, in _migrate_all_forwards
> state = self.apply_migration(
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/executor.py",
> line 252, in apply_migration
> state = migration.apply(state, schema_editor)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/migration.py",
> line 130, in apply
> operation.database_forwards(
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/migrations/operations/fields.py",
> line 235, in database_forwards
> schema_editor.alter_field(from_model, from_field, to_field)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py",
> line 788, in alter_field
> self._alter_field(
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py",
> line 858, in _alter_field
> self.execute(self._delete_unique_sql(model, constraint_name))
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/base/schema.py",
> line 199, in execute
> cursor.execute(sql, params)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
> line 67, in execute
> return self._execute_with_wrappers(
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
> line 80, in _execute_with_wrappers
> return executor(sql, params, many, context)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
> line 84, in _execute
> with self.db.wrap_database_errors:
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/utils.py", line
> 91, in __exit__
> raise dj_exc_value.with_traceback(traceback) from exc_value
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
> line 89, in _execute
> return self.cursor.execute(sql, params)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
> line 75, in execute
> return self.cursor.execute(query, args)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
> 179, in execute
> res = self._query(mogrified_query)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
> 330, in _query
> db.query(q)
> File
> "/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
> line 257, in query
> _mysql.connection.query(self, query)
> django.db.utils.OperationalError: (2013, 'Lost connection to MySQL server
> during query')
> (venv) mailman@new-server ~ (v3.3.9) [0|1]> *more
> /etc/mailman3/settings.py*
> # Mailman Web configuration file.
> # /etc/mailman3/settings.py
>
> # Get the default settings.
> from mailman_web.settings.base import *
> from mailman_web.settings.mailman import *
>
> # Settings below supplement or override the defaults.
>
> #: Default list of admins who receive the emails from error logging.
> ADMINS = (
> ('Mailman Suite Admin', 'root@localhost'),
> )
>
> # Postgresql database setup.
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql',
> 'NAME': 'mailman3web',
> 'USER': 'mailman3web',
> # TODO: Replace this with the password.
> 'PASSWORD': '***********',
> 'HOST': 'localhost',
> # PORT: set to empty string for default.
> 'PORT': '3306',
> # OPTIONS: Extra parameters to use when connecting to the database.
> #'OPTIONS': {
> # Set sql_mode to 'STRICT_TRANS_TABLES' for MySQL. See
> # https://docs.djangoproject.com/en/1.11/ref/
> # databases/#setting-sql-mode
> # 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'",
> # 'charset': 'utf8mb4',
> #},
>
> }
> }
>
> # 'collectstatic' command will copy all the static files here.
> # Alias this location from your webserver to `/static`
> STATIC_ROOT = '/local/mailman/web/static'
>
> # enable the 'compress' command.
> COMPRESS_ENABLED = True
>
> # Make sure that this directory is created or Django will fail on start.
> LOGGING['handlers']['file']['filename'] =
> '/local/mailman/web/logs/mailmanweb.log'
>
> #: See https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
> ALLOWED_HOSTS = [
> "localhost", # Archiving API from Mailman, keep it.
> "127.0.0.1",
> # "lists.your-domain.org",
> # Add here all production domains you have.
> "*"
> ]
>
> #: See
> https://docs.djangoproject.com/en/dev/ref/settings/#csrf-trusted-origins
> (venv) mailman@new-server ~ (v3.3.9)> *mysql -umailman3web -p -h
> localhost mailman3web*
> Enter password:
> Reading table information for completion of table and column names
> You can turn off this feature to get a quicker startup with -A
>
> Welcome to the MariaDB monitor. Commands end with ; or \g.
> Your MariaDB connection id is 32
> Server version: 10.6.12-MariaDB-0ubuntu0.22.04.1 Ubuntu 22.04
>
> Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
>
> Type 'help;' or '\h' for help. Type '\c' to clear the current input
> statement.
>
> MariaDB [mailman3web]> show tables;
> +-------------------------------+
> | Tables_in_mailman3web |
> +-------------------------------+
> | account_emailaddress |
> | account_emailconfirmation |
> | auth_group |
> | auth_group_permissions |
> | auth_permission |
> | auth_user |
> | auth_user_groups |
> | auth_user_user_permissions |
> | django_admin_log |
> | django_content_type |
> | django_mailman3_maildomain |
> | django_mailman3_profile |
> | django_migrations |
> | django_q_ormq |
> | django_q_schedule |
> | django_q_task |
> | django_session |
> | django_site |
> | hyperkitty_attachment |
> | hyperkitty_email |
> | hyperkitty_favorite |
> | hyperkitty_lastview |
> | hyperkitty_mailinglist |
> | hyperkitty_profile |
> | hyperkitty_sender |
> | hyperkitty_tag |
> | hyperkitty_tagging |
> | hyperkitty_thread |
> | hyperkitty_threadcategory |
> | hyperkitty_vote |
> | socialaccount_socialaccount |
> | socialaccount_socialapp |
> | socialaccount_socialapp_sites |
> | socialaccount_socialtoken |
> +-------------------------------+
> 34 rows in set (0.000 sec)
>
> Best Regards,
> Helio Loureiro
> https://helio.loureiro.eng.br
> https://github.com/helioloureiro
> https://mastodon.social/@helioloureiro
>
>
> On Mon, 18 Dec 2023 at 17:11, Mark Sapiro <mark(a)msapiro.net> wrote:
>
>> On 12/18/23 6:24 AM, Helio Loureiro wrote:
>> > Hi,
>> >
>> > Indeed it was the configuration. It was placed into
>> > /etc/mailman3/mailman-web.py. After a I changed to
>> > /etc/mailman3/settings.py a few things advanced a little bit more.
>> >
>> > I had to figure out how to fix mysqlclient installation since there
>> isn't a
>> > mention about it and the simple "pip install mysqclient" was breaking
>> with
>> > pkg-config issues. But it did work at the end.
>> >
>> > Now I can see further messages on mailman3-web than before.
>> >
>> > (venv) mailman@new-server ~ (v3.3.9)> mailman-web migrate
>> > System check identified some issues:
>> >
>> > WARNINGS:
>> > account.EmailAddress: (models.W036) MariaDB does not support unique
>> > constraints with conditions.
>> > HINT: A constraint won't be created. Silence this warning if you don't
>> care
>> > about it.
>> > account.EmailAddress: (models.W043) MariaDB does not support indexes on
>> > expressions.
>> > HINT: An index won't be created. Silence this warning if you don't care
>> > about it.
>> > Operations to perform:
>> > Apply all migrations: account, admin, auth, contenttypes,
>> > django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
>> > socialaccount
>> > Running migrations:
>> > Applying
>> account.0004_alter_emailaddress_drop_unique_email...Traceback
>> > (most recent call last):
>>
>>
>> I'm not sure why there would be an issue with this migration, but there
>> is a possible compatibility issue depending on how you installed things.
>>
>> django-mailman3<=1.3.11 is not compatible with django-allauth>=0.58.
>>
>> In your venv, try
>> ```
>> pip install django-allauth\<0.58
>> ```
>>
>> --
>> Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
>> San Francisco Bay Area, California better use your sense - B. Dylan
>>
>> _______________________________________________
>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>> Archived at:
>> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
>>
>> This message sent to helio(a)loureiro.eng.br
>>
>
1 year, 8 months

[MM3-users] Re: Creating users via RestAPI / User-Management - a bunch of questions
by Stephen J. Turnbull
Mark Sapiro writes:
> On 6/20/25 06:39, Christian Schneider wrote:
> > What I stumble upon is the RestAPI calls to create a "working"
> > user (with the ability to login via WebUI).
> > When I follow the manual (from the url above) I create a user
> > (including password) that appears in the PostgreSQL database.
If you mean you create a User with password via the REST API, this
password is useless. It is not visible to the Django user management
code, and there is no way for a user to log in to Mailman via the REST
API -- the only one who can log in via REST is the superuser.
> > Even when I (via WebUI) set the user as "approved" this user is
> > not able to log in...
I'm not sure how this works, exactly, but I think what you need to do
via REST API is
1. Create the User.
2. Give it an email Address (this probably is automatic, I don't know
if you can create a "bare" user without an email address at all).
3. (probably optional) Set that address as verified.
Then through the Postorius interface you should be able to look up
that user via the email address. That should create a Django user if
one doesn't exist for that email address. I don't recall if Postorius
allows you to set the user's password. You may have to go via the
Django admin interface (the /admin location which is sibling to
/mailman3 and /archives). I'm not sure how to find that user (I don't
know what the user's account name in Django is, hopefully you can look
up the user via the email).
> > I assume this restriction is in accordance to the fact that there
> > is not equivalent Django user.
I don't think there can be a Postorius access to a Mailman user
without a Django user.
> > (There was a mail in the archive of the MM3 user group...stating
> > that one has to use the Django RestAPI to create the appropriate
> > user)
>
> The above is correct. The Mailman REST API only deals with Mailman
> core. Mailman core knows nothing about Django.
Right, if you want to do the whole thing in a script you'll have to
access Django.
> > How will a social account provider (like oidc) linkage (in
> > Django) fit in this concept?
> > Will oidc-accounts be copied to the Django's user database (or
> > PostgreSQL db) or is it an on-the-fly check against the
> > oidc-provider? (I assume second option)
> > What are the status-flags (staff status/superuser status/active
> > status) of the linked oidc-accounts? (Can I specify the status
> > flags?)
>
> I don't offhand know the answers to that, but I think logging in
> via a social account provider creates a Django user..
I can't speak for generic social accounts, but it definitely did that
for a Shibboleth-based SSO setup. Just pass the login credentials
provided by Shibboleth through to the social account stuff (verrrry
carefully :-), and everything just works.
Social auth gets the bare minimum information from the idP as far as I
know (didn't look into it carefully). At least in my case all we got
from Shibboleth was a display name (the personal name) and an email
address (not even an verifiable auth token, they trusted their network
that much). Users could set passwords but they didn't work (Django
could only be accessed by users logged in to the network, and if you
logged out, the request triggered by the redirect back to the login
page would log you right back in again! Freaky...).
> > A conceptual thought:
> > When "user1" (with email user1(a)example.com) is known to django
> > via oidc linkage and I create "user1" (also with email
> > user1(a)example.com) via RestAPI calls (following the url
> > https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/…)
> > do I have a "complete" user then?
That depends on how the social auth is set up. Most likely the
account is linked to the email, Django trusts that email if validated
by the idP, and it will create a Django user to manage it if one
doesn't already exist. If you are accessing Postorius or HyperKitty,
that app will trust the email because it trusts Django, and it will
create a Mailman user as Mark described if one doesn't already exist.
(I don't think the Django and Mailman user-ids need to match, even.)
I'm not sure what happens if you create the Mailman user and assign it
that email address independently of creating the Django user. I think
it should "just work" to log in via Django as long as the idP vouches
that the email is authentic.
Note that there's one glitch remaining -- I'm pretty sure[1] that if
you have an existing Mailman user, and the email address is in the
unconfirmed state in Mailman, you'll have to confirm it to subscribe
to lists and probably to do any other work with that user logged in by
that address. You can do that via "one-time key" email dance, or via
the Mailman REST API though. (It may be possible to do that via the
Django admin API as well, but obviously you can't do that with
Postorius, or anybody could claim any address.)
Short version:
> > I mean a user who is able to login and who can be assigned to a
> > list as admin (e.g.) (In this case I would not have to care
> > about the Django user database... ;-))
>
> If the user can log in to the web UI with an associated email
> address, if that address is an admin of a list, the logged in user
> can admin the list.
Footnotes:
[1] Actually, I'm not sure at all but you *should* have to confirm!
--
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
2 months

[MM3-users] Re: using SSH/TLS with external MTA
by Roland Giesler
On 2024/07/28 15:26, Roland Giesler via Mailman-users wrote:
> On 2024/07/28 00:39, Mark Sapiro wrote:
>> On 7/27/24 15:16, Roland Giesler via Mailman-users wrote:
>>>
>>> The server runs power-mailinabox, which uses Postfix indeed. All my
>>> mail, and quite a few others' mail is sent from the using SMTP-Auth
>>> on port 465. Actually, this message is sent via that server too.
>>> So it's clear to me that MM3 is not authenticating for some reason.
>>
>> What do you see in Mailman's smtp.log and in the mail.log on the mail
>> server?
>
> The smtp log is in syslog...
I also see this in /var/log/mailman3/web/mailman-web.log
*** Starting uWSGI 2.0.20-debian (64bit) on [Sun Jul 28 15:27:48 2024] ***
compiled with version: 11.2.0 on 21 March 2022 11:00:44
os: Linux-5.15.108-1-pve #1 SMP PVE 5.15.108-2 (2023-07-20T10:06Z)
nodename: mailman
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 1
current working directory: /
detected binary path: /usr/bin/uwsgi-core
setgid() to 33
setuid() to 33
chdir() to /usr/share/mailman3-web
your processes number limit is 513922
your memory page size is 4096 bytes
detected max file descriptor number: 1024
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to UNIX address /run/mailman3-web/uwsgi.sock fd 4
Python version: 3.10.12 (main, Mar 22 2024, 16:50:05) [GCC 11.4.0]
Python main interpreter initialized at 0x561ce813d1d0
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 166752 bytes (162 KB) for 2 cores
*** Operational MODE: threaded ***
/usr/lib/python3/dist-packages/django_q/conf.py:139: UserWarning: Retry
and timeout are misconfigured. Set retry larger than timeout,
failure to do so will cause the tasks to be retriggered before
completion.
See
https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
warn(
WSGI app 0 (mountpoint='') ready in 5 seconds on interpreter
0x561ce813d1d0 pid: 113 (default app)
*** uWSGI is running in multiple interpreter mode ***
spawned uWSGI master process (pid: 113)
spawned uWSGI worker 1 (pid: 339, cores: 2)
[uwsgi-daemons] spawning "python3 manage.py qcluster" (uid: 33 gid: 33)
/usr/lib/python3/dist-packages/django_q/conf.py:139: UserWarning: Retry
and timeout are misconfigured. Set retry larger than timeout,
failure to do so will cause the tasks to be retriggered before
completion.
See
https://django-q.readthedocs.io/en/latest/configure.html#retry for details.
warn(
System check identified some issues:
WARNINGS:
django_mailman3.MailDomain: (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
DjangoMailman3Config.default_auto_field attribute to point to a subclass
of AutoField, e.g. 'django.db.models.BigAutoField'.
django_mailman3.Profile: (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
DjangoMailman3Config.default_auto_field attribute to point to a subclass
of AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Attachment: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Email: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Favorite: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.LastView: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.MailingList: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Profile: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Tag: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Tagging: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Thread: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.ThreadCategory: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Vote: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
postorius.EmailTemplate: (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
PostoriusConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
15:27:55 [Q] INFO Q Cluster low-vermont-harry-fillet starting.
15:27:55 [Q] INFO Process-1 guarding cluster low-vermont-harry-fillet
15:27:55 [Q] INFO Q Cluster low-vermont-harry-fillet running.
15:27:55 [Q] INFO Process-1:3 pushing tasks at 386
15:27:55 [Q] INFO Process-1:2 monitoring at 385
15:27:55 [Q] INFO Process-1:1 ready for work at 384
1 year

[MM3-users] Re: Newbie question 2: Rewriting issue for bounced emails
by William Oliver
On Sat, 2021-12-25 at 21:32 -0800, Mark Sapiro wrote:
>
>
> Have you added an Alias Domain for your domain?
>
> After doing that did you run `mailman aliases` or restart mailman to
> (re)generate the files.
>
> postfix_domains postfix_lmtp postfix_vmap
> postfix_domains.db postfix_lmtp.db postfix_vmap.db
>
>
> --
>
First, thanks for your patience. Two steps forward and one step back,
here. I have the interface running and I can create a list which
*does* send messages to my test recipients.
To answer your question, yes, I did all that, and that generates
postfix_domains and postfix_lmtp, but not postfix_vmap. Here's what I
got:
$more postfix_domains
# AUTOMATICALLY GENERATED BY MAILMAN ON 2021-12-26 22:29:27
#
# This file is generated by Mailman, and is kept in sync with the
binary hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what
you're
# doing, and can keep the two files properly in sync. If you screw it
up,
# you're on your own.
libertyfp.org libertyfp.org
$more postfix_lmtp
# AUTOMATICALLY GENERATED BY MAILMAN ON 2021-12-26 22:29:27
#
# This file is generated by Mailman, and is kept in sync with the
binary hash
# file. YOU SHOULD NOT MANUALLY EDIT THIS FILE unless you know what
you're
# doing, and can keep the two files properly in sync. If you screw it
up,
# you're on your own.
# Aliases which are visible only in the @libertyfp.org domain.
testlist(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-bounces(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-confirm(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-join(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-leave(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-owner(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-request(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-subscribe(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
testlist-unsubscribe(a)libertyfp.org lmtp:[mail.libertyfp.org]:8024
But no postfix_vmap.
However, let me ask another question first:
When running mailman3, do I need to set up a completely different
virtual domain for it to run in? My "real" domain name is
libertyfp.org, and I'm trying to make mailman work on that domain, e.g.
"testlist(a)libertyfp.org." I'm starting to get the idea that I need to
stick a completely different domain in there for the mailinglist.
Which I can do -- I've got another two or three domain names to play
with. Is it a problem to run the mailinglist on the same domain that
the machine sits on for its regular business? A lot of the errors I'm
getting seem to be from trying to do regular mail *and* the mailinglist
on the same domain.
Now that I've installed all this stuff a couple of times, I can easily
re-install for a second virtual domain, if that's what I should be
doing.
But, on to what's not working now...
Unfortunately, I seem to have completely screwed the pooch on getting
postfix/dovecot to play nicely with respect to *receiving* mail.
First, adding "virtual_alias_domains" (and putting libertyfp.org in it)
and commenting out "virtual_mailbox_domains" resulted in postfix
ignoring all my virtual mailboxes. Mail still worked, but mail is now
being sent to /home/<user>/Maildir instead of
/home/vmail/libertyfp/<user>/Maildir -- which means that dovecot, which
looks in the virtual mailboxes, is now unaware of new mail. I suppose
I could link /home/<user>/Maildir to
/home/vmail/libertyfp.org/<user>/Maildir, but I suspect there will be
problems and it's not a real fix. But.. .a problem for another day.
Except... the same thing is happening with the mailinglist.
In mailman3:
I set up a test list (testlist(a)libertyfp.org) and added two test users
(one local and one on a different domain). They added just fine, and
both received the welcome message.
However, when I replied, both messages bounced with the error that
"testlist(a)libertyfp.org" was "user unknown in virtual alias table."
No problem, I thought. So I added:
testlist(a)libertyfp.org testlist
to /etc/postfix/virtual, and
testlist libertyfp.org/testlist/Maildir
to /etc/postfix/virtual-mailbox,
and I added testlist as a user:
$ adduser -m testlist
So, now mail from my list members goes to /home/testlist/Maildir, but
not to the mailinglist.
I also have managed to get another *different* warning, and the "there
ain't no vmap, newbie" error as well:
Dec 26 17:33:11 libertyfp systemd[1]: certbot.service: Consumed 1.041s
CPU time.
Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: error: open database
/opt/mailman/mm/var/data/postfix_vmap.db: No such file or directory
Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: error: unsupported
dictionary type: #hash
Dec 26 17:33:12 libertyfp postfix/smtpd[46453]: connect from
billoblog.com[162.144.108.19]
Dec 26 17:33:16 libertyfp postfix/trivial-rewrite[46479]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
relay_domains
Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: warning:
hash:/opt/mailman/mm/var/data/postfix_vmap is unavailable. open
database /opt/mailman/mm/var/data/postfix_vmap.db: No such file or
directory
Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: warning:
hash:/opt/mailman/mm/var/data/postfix_vmap lookup error for
"fplist(a)libertyfp.org"
Dec 26 17:33:16 libertyfp postfix/smtpd[46453]: NOQUEUE: reject: RCPT
from billoblog.com[162.144.108.19]: 451 4.3.0 <fplist(a)libertyfp.org>:
Temporary lookup failure; from=<billo(a)billoblog.com>
to=<fplist(a)libertyfp.org> proto=ESMTP helo=<billoblog.com>
That "you can't have both virtual_alias_domains" and "relay_domains"
seems like it should be a clue. But I don't' know what for. Adding
virtual_alias_domains really changed things...
Anyway, here's the part of the /etc/postfix/main.cf that I think is
likely important. Note that I comments out "virtual_mailbox_domains".
myorigin = localhost
mydestination = localhost, localhost.$mydomain
alias_maps = /etc/aliases (which, by the way, just contains
"postmaster: root")
home_mailbox= Maildir
# add to the end (add ssl support)
smtpd_use_tls = yes
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_cert_file = /etc/letsencrypt/live/libertyfp.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/libertyfp.org/privkey.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
# add to the end (add virtual users)
# if specify multiple domains, specify comma or space separated
#virtual_mailbox_domains = libertyfp.org
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox
virtual_uid_maps = static:20000
virtual_gid_maps = static:20000
# mailman3 changes
owner_request_special = no
always_add_missing_headers = yes
transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
hash:/opt/mailman/mm/var/data/postfix_lmtp
relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
default_destination_recipient_limit = 30
default_destination_concurrency_limit = 15
virtual_alias_domains = hash:/etc/postfix/domains
virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
#hash:/etc/postfix/virtual
Here's the postfix maps:
/etc/postfix/domains:
libertyfp.org #
/etc/postfix/virtual:
fp145(a)libertyfp.org fp145
mailman(a)libertyfp.org mailman
testlist(a)libertyfp.org testlist
/etc/postfix/virtual-mailbox:
mailman libertyfp.org/mailadmin/Maildir/
fp145@localhost libertyfp.org/fp145/Maildir/
testlist libertyfp.org/testlist/Maildir
3 years, 7 months

[MM3-users] Re: error changed after restart
by Guillermo Hernandez (Oldno7)
On 6/2/21 21:19, Abhilash Raj wrote:
>
>
> On Sat, Feb 6, 2021 at 19:44, Guillermo Hernandez (Oldno7) via
> Mailman-users <mailman-users(a)mailman3.org> wrote:
>> On 6/2/21 18:08, Abhilash Raj wrote:
>>
>> On Sat, Feb 6, 2021, at 3:04 AM, Guillermo Hernandez (Oldno7) via
>> Mailman-users wrote:
>>
>> I restarted de server and the error changed. Now the log
>> shows "KeyError: 'subscription_mode'":
>>
>> Did you also restart Mailman Core after the upgrade?
>>
>> Yes, indeed: I stopped mailman core and all the processes related.
>> Did the upgrades. Started all again. Find the errors in the web user
>> interface. Stopped all again. Looked for errors in the log. Restarted
>> the complete server. Found the second error that this second mail is
>> about to. It happens when, in the main page that shows all the lists
>> you click to see one of them. It seems to me that it has been
>> database structure changes in django that the upgrade is not aware...
>> but it's a very long shot from my side.
> `subscription_mode` was added in Mailman Core 3.3.2 and it is actually
> a derived atrribute and not stored in Database. Mailman's API should be
> returning this attribute for each Member, but for some reason it seems
> to me like it isn't doing that even though do have Mailman 3.3.3 running
> like you said.
> If you have Curl installed, can you send me the output of:
> $ curl -u <user>:<pass> http://localhost:8001/3.1/members?count=5&page=1
This is the output you asked for (it's the same you can see when you try
to interact with one list):
/usr/local/mailman3 # curl -u XXXXXX:XXXXXX
http://localhost:8001/3.1/members?count=5&page=1
/usr/local/mailman3 # <html>
<head>
<title>Internal Server Error</title>
</head>
<body>
<h1><p>Internal Server Error</p></h1>
</body>
</html>
No log entry has been produced...
TIA.
> It should ideally return an output that looks something like shown
> here[1]. You
> can put the username/password of Core's API server in the above command.
> [1]:
> https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/…
>
> Abhilash
>> I'm using sqlite as django database and mysql for mailman.
>>
>> ERROR 2021-02-06 11:47:49,015 26798 django.request Internal
>> Server Error:
>> /mailman3/mailman3/lists/name_and_domain.of.the.list
>> Traceback (most recent call last): File
>> "/usr/local/lib/python3.7/site-packages/mailmanclient/restbase/base.py",
>> line 119, in __getattr__ return self._get(name) File
>> "/usr/local/lib/python3.7/site-packages/mailmanclient/restbase/base.py",
>> line 86, in _get raise KeyError(key) KeyError:
>> 'subscription_mode' During handling of the above exception,
>> another exception occurred: Traceback (most recent call
>> last): File
>> "/usr/local/lib/python3.7/site-packages/django/core/handlers/exception.py",
>> line 34, in inner response = get_response(request) File
>> "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py",
>> line 115, in _get_response response =
>> self.process_exception_by_middleware(e, request) File
>> "/usr/local/lib/python3.7/site-packages/django/core/handlers/base.py",
>> line 113, in _get_response response =
>> wrapped_callback(request, *callback_args, **callback_kwargs)
>> File
>> "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py",
>> line 71, in view return self.dispatch(request, *args,
>> **kwargs) File
>> "/usr/local/lib/python3.7/site-packages/postorius/views/generic.py",
>> line 74, in dispatch return super(MailingListView,
>> self).dispatch(request, *args, **kwargs) File
>> "/usr/local/lib/python3.7/site-packages/django/views/generic/base.py",
>> line 97, in dispatch return handler(request, *args,
>> **kwargs) File
>> "/usr/local/lib/python3.7/site-packages/postorius/views/list.py",
>> line 295, in get member.subscription_mode == File
>> "/usr/local/lib/python3.7/site-packages/mailmanclient/restbase/base.py",
>> line 124, in __getattr__ self.__class__.__name__, name))
>> AttributeError: 'Member' object has no attribute
>> 'subscription_mode' *********************** some info about
>> the installed versions via pip list: pip list | grep django
>> django-allauth 0.44.0
>> django-appconf 1.0.4
>> django-compressor 2.4
>> django-extensions 3.1.0
>> django-gravatar2 1.4.4
>> django-haystack 3.0
>> django-mailman3 1.3.5
>> django-picklefield 3.0.1
>> django-q 1.3.4
>> djangorestframework 3.12.2 pip list | grep mailman
>> django-mailman3 1.3.5
>> mailman 3.3.3
>> mailman-hyperkitty 1.1.0
>> mailmanclient 3.3.2 pip list | grep postorius
>> postorius 1.3.4 On 6/2/21 11:12,
>> Guillermo Hernandez (Oldno7) via Mailman-users wrote:
>>
>> I've just upgrade mailman 3 installation following Mr.
>> Sapiro advice: did a pip install --upgrade
>> django-mailman3 hyperkitty mailman mailmanclient
>> mailman-hyperkitty postorius I did a "python3 manage.py
>> migrate" after, too. And all seemed to run well. All the
>> lists showed in postorius via web, but when I try to
>> accesss into one of them the browser shows an error. In
>> the log you can see: *-*-*-*-*-*-* Traceback (most recent
>> call last): File
>> "/usr/local/lib/python3.7/site-packages/mailmanclient/restbase/base.py",
>> line 119, in __getattr__ return self._get(name)
>> File
>> "/usr/local/lib/python3.7/site-packages/mailmanclient/restbase/base.py",
>> line 86, in _get raise KeyError(key) KeyError:
>> 'get_requests_count' .. (And after all the traceback
>> lines) AttributeError: 'MailingList' object has no
>> attribute 'get_requests_count' *-*-*-*-*-*-*-* The lists
>> seem to be distributing messeages well.. but I cannot
>> acces via web administration (django/postorius) Can
>> anyone point me in the right direction to solve this,
>> please? _______________________________________________
>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>> <mailto:mailman-users@mailman3.org> To unsubscribe send
>> an email to mailman-users-leave(a)mailman3.org
>> <mailto:mailman-users-leave@mailman3.org>
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>> <https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3org/>
>>
>>
>> _______________________________________________ Mailman-users
>> mailing list -- mailman-users(a)mailman3.org
>> <mailto:mailman-users@mailman3.org> To unsubscribe send an
>> email to mailman-users-leave(a)mailman3.org
>> <mailto:mailman-users-leave@mailman3.org>
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>> <https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3org/>
>>
>>
>> _______________________________________________ Mailman-users mailing
>> list -- mailman-users(a)mailman3.org
>> <mailto:mailman-users@mailman3.org> To unsubscribe send an email to
>> mailman-users-leave(a)mailman3.org
>> <mailto:mailman-users-leave@mailman3.org>
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>> <https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3org/>
4 years, 6 months

[MM3-users] Re: A little stuck with installation of MM3 - ModuleNotFoundError: No module named 'flufl.lock'
by Odhiambo Washington
On Wed, 29 Jul 2020 at 02:58, Mark Sapiro <mark(a)msapiro.net> wrote:
> On 7/28/20 2:34 AM, Odhiambo Washington wrote:
> >
> > So, now I remember why I had to chown -R mailman3 /opt/mailman
> > Then now it seems like I have been doing things incorrectly, because I
> have
> > been doing
> > a lot of operations as root by simply:
> > cd /opt/mailman/mm
> > virtualenv venv
> > source venv/bin/activate
> > Looks like the correct way is to start with su - mailman3
>
>
> Yes. All those things should be done as the Mailman user.
>
>
> >>> PS: There is the issue with qcluster, which doesn't seem to have been
> ...
> > I have run it from supervisord. It has forked 30 processes and refuses to
> > kill them when I stop supervisord.
> > I will look for options around it.
>
>
> I know nothing about supervisord, but there should be a parent process.
> E.g., here
>
> > msapiro@mail:~$ ps -fwwu mailman|grep qcluster
> > mailman 2885 1 0 Jul18 ? 00:00:00 /bin/bash
> /opt/mailman/mm/bin/mailman-web-django-admin qcluster
> > mailman 2889 2885 0 Jul18 ? 00:01:57
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 2930 2889 0 Jul18 ? 01:21:03
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 2944 2930 0 Jul18 ? 00:04:17
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 2945 2930 3 Jul18 ? 07:11:14
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 6467 2930 0 15:39 ? 00:00:03
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 12337 2930 0 15:00 ? 00:00:07
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 12639 2930 0 11:08 ? 00:00:11
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 14658 2930 0 Jul27 ? 00:00:22
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 15860 2930 0 01:41 ? 00:00:21
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > mailman 19205 2930 0 Jul27 ? 00:00:29
> /opt/mailman/mm/venv/bin/python /opt/mailman/mm/venv/bin/django-admin
> qcluster
> > msapiro@mail:~$
>
> pid 2885 is the parent which forked 2889 which in turn forked 2930 which
> forked all the others. stopping (sigterm) 2885 in this case will stop
> them all.
>
> I have seen an issue on one server where some of the qcluster workers
> become orphaned and their parent pid is 1. These are left when I stop
> the upstart service so I have this script.
>
> #! /bin/bash
> if echo `status qcluster` | grep -q 'running' ; then
> echo qcluster is running
> exit
> fi
> ps -fwwu mailman|grep '[a]dmin qcluster'|awk '{print $2}'|xargs kill
>
> to kill them.
>
I found some obscure option for supervisord that enabled the killing of the
process(es).
Obscure because it's not documented in the sample configuration for
supervisord, but it's out there in the wild.
> > PS: Did you by any chance find time to look into the issue about wsgi.py
> > that you had mentioned - the one that has me
> > stuck using it??
>
> If you're referring to the issue at the end of
> <
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
> >,
> I think that was caused by your not having the __init__.py file in
> /opt/mailman/mm/.
>
> If not, I probably need more information.
>
Yes, the same problem.
I created the file __init__.py in /opt/mailman/mm
However, when I run using the wsgi.py I ended up (still do!) with the error:
[Wed Jul 29 10:08:51.869144 2020] [wsgi:info] [pid 79132] [remote
197.232.81.246:64709] mod_wsgi (pid=79132, process='mailman-web',
application='mm3-lists.server.name|/mm3'): Loading Python script file
'/opt/mailman/mm/wsgi.py'.
[Wed Jul 29 10:08:51.872461 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] mod_wsgi (pid=79132): Failed to exec Python script
file '/opt/mailman/mm/wsgi.py'.
[Wed Jul 29 10:08:51.872507 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] mod_wsgi (pid=79132): Exception occurred processing
WSGI script '/opt/mailman/mm/wsgi.py'.
[Wed Jul 29 10:08:51.872754 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] Traceback (most recent call last):
[Wed Jul 29 10:08:51.872827 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File "/opt/mailman/mm/wsgi.py", line 38, in <module>
[Wed Jul 29 10:08:51.872835 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] application = get_wsgi_application()
[Wed Jul 29 10:08:51.872847 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File
"/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-3.0.8-py3.7.egg/django/core/wsgi.py",
line 12, in get_wsgi_application
[Wed Jul 29 10:08:51.872852 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] django.setup(set_prefix=False)
[Wed Jul 29 10:08:51.872862 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File
"/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-3.0.8-py3.7.egg/django/__init__.py",
line 19, in setup
[Wed Jul 29 10:08:51.872868 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] configure_logging(settings.LOGGING_CONFIG,
settings.LOGGING)
[Wed Jul 29 10:08:51.872878 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File
"/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-3.0.8-py3.7.egg/django/conf/__init__.py",
line 76, in __getattr__
[Wed Jul 29 10:08:51.872884 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] self._setup(name)
[Wed Jul 29 10:08:51.872893 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File
"/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-3.0.8-py3.7.egg/django/conf/__init__.py",
line 63, in _setup
[Wed Jul 29 10:08:51.872899 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] self._wrapped = Settings(settings_module)
[Wed Jul 29 10:08:51.872909 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File
"/opt/mailman/mm/venv/lib/python3.7/site-packages/Django-3.0.8-py3.7.egg/django/conf/__init__.py",
line 142, in __init__
[Wed Jul 29 10:08:51.872914 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] mod =
importlib.import_module(self.SETTINGS_MODULE)
[Wed Jul 29 10:08:51.872923 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File
"/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
[Wed Jul 29 10:08:51.872929 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] return _bootstrap._gcd_import(name[level:],
package, level)
[Wed Jul 29 10:08:51.872938 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File "<frozen importlib._bootstrap>", line 994, in
_gcd_import
[Wed Jul 29 10:08:51.872949 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File "<frozen importlib._bootstrap>", line 971, in
_find_and_load
[Wed Jul 29 10:08:51.872960 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] File "<frozen importlib._bootstrap>", line 953, in
_find_and_load_unlocked
[Wed Jul 29 10:08:51.872984 2020] [wsgi:error] [pid 79132] [remote
197.232.81.246:64709] ModuleNotFoundError: No module named 'settings'
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
5 years

[MM3-users] Re: Apache+mod_wsgi issue
by Odhiambo Washington
On Sat, Dec 24, 2022 at 1:51 AM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 12/22/22 22:26, Odhiambo Washington wrote:
> > On Fri, Dec 23, 2022 at 9:21 AM Odhiambo Washington <odhiambo(a)gmail.com>
> > wrote:
> >
> >> And now I am having a problem with mod_wsgi.
> >> First, the URL displayed when I load the page looks bogus to me.
> >> While I expect the URL to be
> >> https://mm3-lists.kictanet.or.ke/mailman3/domains/, mod_wsgi give me
> >> https://mm3-lists.kictanet.or.ke/mailman3/mailman3/domains/ - there is
> an
> >> extra /mailman3!
>
>
> See below:
>
>
> >> So I have;
> >> 1. https://mm3-lists.kictanet.or.ke/mailman3/mailman3/lists/ -
> working,
> >> or appears to.
> >> 2. https://mm3-lists.kictanet.or.ke/mailman3/mailman3/domains/ -
> working,
> >> or appears to.
> >> 3. https://mm3-lists.kictanet.or.ke/mailman3/mailman3/bans/ - working,
> or
> >> appears to
> >> 4. https://mm3-lists.kictanet.or.ke/mailman3/mailman3/users - working,
> or
> >> appears to
> >> 5.
> >>
> https://mm3-lists.kictanet.or.ke/mailman3/mailman3/lists/kictanet.lists.kic…
> >> - This throws an exception error when I click "Manage Subscription".
> >>
> >> -> https://pastebin.ubuntu.com/p/RkKH793Jgw/
>
>
> messages like these
>
> [Fri Dec 23 09:10:55.393386 2022] [wsgi:error] [pid 74857] [remote
> 197.232.81.246:14181] File
> "/opt/mailman/mm/venv/lib/python3.9/site-packages/mailmanclient/restbase/connection.py",
>
> line 160, in call
> [Fri Dec 23 09:10:55.393390 2022] [wsgi:error] [pid 74857] [remote
> 197.232.81.246:14181] raise HTTPError(params.get('url'),
> response.status_code,
> [Fri Dec 23 09:10:55.393394 2022] [wsgi:error] [pid 74857] [remote
> 197.232.81.246:14181] urllib.error.HTTPError: HTTP Error 500: {"title":
> "500 Internal Server Error"}
>
> Indicate an uncaught exception in Mailman core. What's in mailman.log?
>
A good catch here!
mailman.log was mostly having a complaint about a missing config file -
/etc/mailman3/mailman-hyperkitty.cfg
I then just did a symlink: ln -s /opt/mailman/mm /etc/mailman3, which then
made things start working.
And I don't like this, so I think I will put all my configs into
/opt/mailman/mm/etc/ and link /etc/mailman3 to this path instead.
What bite me is probably related to this experience by Turnbull:
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
I am on FreeBSD where user applications should have config files in
/usr/local/etc/ and not /etc/ so having /etc/mailman3 and
not /usr/local/etc/mailman3 kinda makes me feel weird.
>> And while I do not quite understand the error itself, there is also one
> >> particular line that I also saw that has left me baffled:
> >> [Fri Dec 23 08:53:18.290411 2022] [core:info] [pid 91236] [client
> >> 197.232.81.246:13865] AH00128: File does not exist:
> >> /usr/local/www/apache24/data/archives/list/
> >> kictanet(a)lists.kictanet.or.ke/thread/VIHCC6MSXZSNHY7YPEJ3D2US4N7MHJEC/,
> >> referer:
> >>
> https://mm3-lists.kictanet.or.ke/archives/list/kictanet@lists.kictanet.or.ke
>
> This is because something is doing an HTTP GET for
> `/archives/list/
> kictanet(a)lists.kictanet.or.ke/thread/VIHCC6MSXZSNHY7YPEJ3D2US4N7MHJEC/`
> <http://kictanet@lists.kictanet.or.ke/thread/VIHCC6MSXZSNHY7YPEJ3D2US4N7MHJE…>
> and the URL is not recognized as one handled by mod_wsgi so apache tries
> to get it from its DocumentRoot.
>
> mod_wsgi has to serve a number of URLs. Look in /opt/mailman/mm/urls.py
> for urlpatterns. You will probably see things like
>
> url(r'^accounts/', include('allauth.urls')),
> # Django admin
> url(r'^admin/', admin.site.urls),
> url(r'^mailman3/', include('postorius.urls')),
> url(r'^archives/', include('hyperkitty.urls')),
>
> Those are all things that need to be handled by mod_wsgi
>
> In your apache config, you only have a WSGIScriptAlias for /mailman3.
> Thus paths need to be prefixed with /mailman3 in order to be handled by
> mod_wsgi. I'm not sure what is doing this prefixing, but without it
> paths that don't begin with /mailman3 don't work unless you also have
> things like
>
> WSGIScriptAlias /accounts /opt/mailman/mm/wsgi.py
> WSGIScriptAlias /admin /opt/mailman/mm/wsgi.py
> WSGIScriptAlias /archives /opt/mailman/mm/wsgi.py
>
> in your apache config.
>
These are my files:
1. urls.py
<CUT >
from django.conf.urls import include
from django.urls import re_path
from django.contrib import admin
from django.urls import reverse_lazy
from django.views.generic import RedirectView
urlpatterns = [
re_path(r'^$', RedirectView.as_view(
url=reverse_lazy('list_index'),
permanent=True)),
re_path(r'^postorius/', include('postorius.urls')),
re_path(r'^hyperkitty/', include('hyperkitty.urls')),
re_path(r'', include('django_mailman3.urls')),
re_path(r'^accounts/', include('allauth.urls')),
# Django admin
re_path(r'^admin/', admin.site.urls),
re_path(r'^mailman3/', include('postorius.urls')),
re_path(r'^archives/', include('hyperkitty.urls')),
]
</CUT>
2. apache.conf
<CUT>
...
Alias /static "/opt/mailman/mm/static"
<Directory "/opt/mailman/mm/static">
Require all granted
</Directory>
# WSGIScriptAlias /mailman3 /opt/mailman/mm/wsgi.py
# WSGIScriptAlias /accounts /opt/mailman/mm/wsgi.py
# WSGIScriptAlias /admin /opt/mailman/mm/wsgi.py
# WSGIScriptAlias /archives /opt/mailman/mm/wsgi.py
# WSGIScriptAlias /user-profile /opt/mailman/mm/wsgi.py
# WSGIScriptAlias /hyperkitty /opt/mailman/mm/wsgi.py
# WSGIScriptAlias /postorius /opt/mailman/mm/wsgi.py
WSGIScriptAlias / /opt/mailman/mm/wsgi.py
<Directory "/opt/mailman/mm/">
<Files wsgi.py>
Order deny,allow
Allow from all
Require all granted
</Files>
WSGIProcessGroup mailman-web
</Directory>
<CUT>
> > I also need to add the fact that at the point where I am clicking "Manage
> > Subscription", the URL has changed to
> >
> https://mm3-lists.kictanet.or.ke/mailman3/archives/list/kictanet@lists.kict…
> > (just a single /mailman3).
> >
>
>
> Something is adding mailman3/ to URLs. In the above the URL should be
>
> https://mm3-lists.kictanet.or.ke/archives/list/kictanet@lists.kictanet.or.k…,
>
> but an extra /mailman3 is added. The others are like
> https://mm3-lists.kictanet.or.ke/mailman3/lists/ and an extra /mailman3
> is added.
>
I have tested with creating all those commented out aliases and that ended
up still giving me /mailman3/mailman3/* which I did not
like, although everything appeared to work.
I then ended up with only "WSGIScriptAlias / /opt/mailman/mm/wsgi.py"
and now when I type https://mm3-lists.kictanet.or.ke I end
up at https://mm3-lists.kictanet.or.ke/mailman3/lists/. Of course something
has appended "/mailman3"
So this has resulted in all URLs having /mailman3/ appended, except for the
/archives link.
Now my question is about what could be adding the /mailman3. Is it possible
that I installed something out of the ordinary?
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
2 years, 8 months

[MM3-users] Re: Error 500 on held_messages page
by Stephan Krinetzki
Hi Mark,
Mark Sapiro wrote:
> On 2/3/22 08:01, Stephan Krinetzki wrote:
> > Hello all,
> > we now have at least one mailing list (there may be more affected) that generates a 500 error when calling the held_messages page. After looking at the held messages via the mailman shell, we have identified three mails that have neither a subject nor a message body. How can we remove these three mails from the database?
> > This shouldn't be an issue, at least with Mailman core 3.3.5, unless I
> don't understand.
> Note that there are 3 tables involved. The request (IListRequests), the
> pendings (IPended and IPendedKeyValue), and the held message
> (IMessageStore).
> > This is the mailman shell command we used:
> > mailman shell -l listname(a)lists.example.com
> > <removed>
> > Welcome to the GNU Mailman shell
> > Use commit() to commit changes.
> > Use abort() to discard changes since the last commit.
> > Exit with ctrl+D does an implicit commit() but exit() does not.
> > Die Variable 'm' ist die listname(a)lists.example.com Mailingliste
> > >>> msg_db = getUtility(IMessageStore)
> > >>> req_db = IListRequests(m)
> > >>> reqs = list(req_db.held_requests)
> > >>> for req in reqs:
> > ... print('{}: {}'.format(req.id, req.request_type))
> > ...
> > 32598: 1
> > [...]
> > 107656: 1
> > 107737: 1
> > 107758: 1
> >
> > OK, you have requests.
> > >>> from mailman.app.moderator import handle_message
> > >>> handle_message(m, 107758, Action.discard)
> > >>> reqs = list(req_db.held_requests)
> > >>> for req in reqs:
> > ... print('{}: {}'.format(req.id, req.request_type))
> > ...
> > 32598: 1
> > [...]
> > 107656: 1
> > 107737: 1
> >
> > OK, you discarded the message held with request id 107758.
> > >>> handle_message(m, 92927, Action.discard)
> > Traceback (most recent call last):
> > File "<console>", line 1, in <module>
> > File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/app/moderator.py", line 112, in handle_message
> > key, msgdata = requestdb.get_request(id)
> > TypeError: 'NoneType' object is not iterable
> > >>>
> >
> > There is no request with id 92927. Why do you think there should be?
Well, i truncated the list above (marked by [...]) but this message is there:
32598: 1
107788: 1
22449: 1
95736: 1
108279: 1
66937: 1
108367: 1
68261: 1
108379: 1
108411: 1
108587: 1
108596: 1
108723: 1
107881: 1
107891: 1
108814: 1
92927: 1
107963: 1
106486: 1
106488: 1
106526: 1
106577: 1
106682: 1
106818: 1
106857: 1
108076: 1
106926: 1
107044: 1
107146: 1
107152: 1
107153: 1
107204: 1
108199: 1
107210: 1
107329: 1
107394: 1
107447: 1
107531: 1
107562: 1
107594: 1
107656: 1
107737: 1
> If by remove them from the database, you mean just from the
> messagestore, you can do (using your above)
> msg_db.delete_message('the_message_id')
Ok, thanks. With this code lines the message is deleted, right?
> To delete a pending request for which there is no request id, e.g. the
> id 92927 above, you could do
> pendings = getUtility(IPendings)
> for token, data in pendings.find(pend_type='held message'):
> if data and data['id'] == 92927:
> pendings.confirm(token, expunge=True)
>
That didn't helped:
mailman shell -l list(a)lists.example.com
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
Die Variable 'm' ist die list(a)lists.example.com Mailingliste
>>> msg_db = getUtility(IMessageStore)
>>> req_db = IListRequests(m)
>>> reqs = list(req_db.held_requests)
>>> for req in reqs:
... print('{}: {}'.format(req.id, req.request_type))
...
32598: 1
107788: 1
22449: 1
95736: 1
108279: 1
66937: 1
108367: 1
68261: 1
108379: 1
108411: 1
108587: 1
108596: 1
108723: 1
107881: 1
107891: 1
108814: 1
92927: 1
107963: 1
106486: 1
106488: 1
106526: 1
106577: 1
106682: 1
106818: 1
106857: 1
108076: 1
106926: 1
107044: 1
107146: 1
107152: 1
107153: 1
107204: 1
108199: 1
107210: 1
107329: 1
107394: 1
107447: 1
107531: 1
107562: 1
107594: 1
107656: 1
107737: 1
>>> for req in reqs:
... print(req.key)
... for line in str(msg_db.get_message_by_id(req.key)).split("\n"):
... print(line)
... print('\n')
...
<1b35d982.85b92.16abbe857a6.Coremail.lusong(a)lsec.cc.ac.cn>
None
<08539546582c0560693f58ab0101bd83(a)airotrader.com>
<Mail Content, shorted out>
<1545090824.237969198(a)f452.i.mail.ru>
None
<tencent_41D5C02D27CAA4DD59BDF1A2(a)qq.com>
<Mail Content, shorted out>
<292716975.841376.1597725820301.JavaMail.zimbra(a)rri.res.in>
<Mail Content, shorted out>
<5d74c171c32303e88c9d8b86ac60ba48(a)blackroseradio.com>
<Mail Content, shorted out>
<DM6PR04MB38208B40539F3861A613098DB1260(a)DM6PR04MB3820.namprd04.prod.outlook.com>
<Mail Content, shorted out>
<eaefd169fb428442d9e3ce31b72bfdb4(a)wordenonwine.com>
<Mail Content, shorted out>
<2108728073.11037004.1643524877756.JavaMail.zimbra(a)caxias.rs.gov.br>
<Mail Content, shorted out>
<CANvwqssiPV7HgupqrYkgxGoFsKph=TW-mwNucs+NBwxs3Uw1bQ(a)mail.gmail.com>
<Mail Content, shorted out>
<c0b951ee190727163bce555a3a030f9f(a)optiboxes.com>
<Mail Content, shorted out>
<144a5727a850fea01910dfe9c427427e(a)licensedappraisal.com>
<Mail Content, shorted out>
<61ef2070.1c69fb81.f2f7e.23fc(a)mx.google.com>
<Mail Content, shorted out>
<b037941f4318324ab23a3ee7efcbf970(a)hollymillrun.com>
<Mail Content, shorted out>
<929ad585ea426a3835cf63058c22782c(a)airotrader.com>
<Mail Content, shorted out>
<180a36ee.2b.17afe0b825e.Coremail.carmark3(a)163.com>
None
<24abca1072b83535bbf2e39b6a825fc8(a)optiboxes.com>
<Mail Content, shorted out>
<CAK69=c9mFvOZq9ro7HavgYdOeo-oJ2_6h8SjQsBfcrxnpf_etA(a)mail.gmail.com>
<Mail Content, shorted out>
<5d7b548ab086bb47c0c6caacbff92c54(a)licensedappraisal.com>
<Mail Content, shorted out>
<062dfa1a2deb3ac136ecdfde1b4c6d74(a)optiboxes.com>
<Mail Content, shorted out>
<d517a99e8e9db94ddc8ecd1c6d226788(a)spiritsestates.com>
<Mail Content, shorted out>
<043051c1d7a64c04ce8c83c7a5e54eec(a)krswim.com>
<Mail Content, shorted out>
<2c42b1d628a43b1fc78471e873a0691d(a)totallyneat.com>
<Mail Content, shorted out>
<CALQ9jAcqu9yRj=EYn=DgA8unYRWkfUgFiL54bMiLxovc+JXcBw(a)mail.gmail.com>
<Mail Content, shorted out>
<1ffa446361bfdf49a71b8669165e6350(a)wordenonwine.com>
<Mail Content, shorted out>
<b9afc5d32f87320a8333093ffd0635f5(a)infnitsolutions.com>
<Mail Content, shorted out>
<f486ea12a6bcecec1b1e4a51f1be0719(a)penshaver.com>
<Mail Content, shorted out>
<CAPOYRqVmrwcdRQXwm56sM+0Ov1bcLqxFXFCrx5Rf3gVqj9nOgA(a)mail.gmail.com>
<Mail Content, shorted out>
<1412096130.6666950.1642348478679.JavaMail.zimbra(a)gorontaloprov.go.id>
<Mail Content, shorted out>
<40f51428847f7874d06b8b5ad50c745d(a)wordenonwine.com>
<Mail Content, shorted out>
<2a82c4a5e577658efc189f02fc13f520(a)nutriholding.com>
<Mail Content, shorted out>
[And a lot of more messages]
As you can see, there a some messages, that have no message body and i think that's the issue.
In the httpd.log of mailman:
2022-02-04 10:01:09 [FALCON] [ERROR] GET /3.1/lists/list(a)lists.example.com/held?count=10&page=1 => Traceback (most recent call last):
File "falcon/app.py", line 361, in falcon.app.App.__call__
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/rest/post_moderation.py", line 182, in on_get
resource = self._make_collection(request)
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/rest/helpers.py", line 182, in _make_collection
entries = [as_dict(resource) for resource in collection]
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/rest/helpers.py", line 182, in <listcomp>
entries = [as_dict(resource) for resource in collection]
File "/opt/mailman/mailman-venv/lib64/python3.6/site-packages/mailman/rest/post_moderation.py", line 173, in _resource_as_dict
assert resource is not None, resource
AssertionError: None
[04/Feb/2022:10:01:09 +0100] "GET /3.1/lists/list(a)lists.example.com/held?count=10&page=1 HTTP/1.1" 500 38 "-" "GNU Mailman REST client v3.3.3"
Maybe that helps to identify the issue.
> Mailman core 3.3.5 has a lot of changes to address this issue.
> Also see https://gitlab.com/mailman/mailman/-/issues/946
3 years, 6 months

[MM3-users] Re: Migration from old server to new server failed
by Helio Loureiro
Hi,
I repeated the steps today.
First I waited to end the errors raised because the mailman3-web wasn't
running.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py",
line 793, in urlopen
response = self._make_request(
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py",
line 496, in _make_request
conn.request(
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py",
line 400, in request
self.endheaders()
File "/usr/lib/python3.10/http/client.py", line 1278, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "/usr/lib/python3.10/http/client.py", line 1038, in _send_output
self.send(msg)
File "/usr/lib/python3.10/http/client.py", line 976, in send
self.connect()
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py",
line 238, in connect
self.sock = self._new_conn()
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/connection.py",
line 213, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection
object at 0x7f0fdc2f72b0>: Failed to establish a new connection: [Errno
111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File
"/local/mailman/venv/lib/python3.10/site-packages/requests/adapters.py",
line 486, in send
resp = conn.urlopen(
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/connectionpool.py",
line 847, in urlopen
retries = retries.increment(
File
"/local/mailman/venv/lib/python3.10/site-packages/urllib3/util/retry.py",
line 515, in increment
raise MaxRetryError(_pool, url, reason) from reason # type:
ignore[arg-type]
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.0.1',
port=8000): Max retries exceeded with url: /archives/api/mailman/archive
(Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at
0x7f0fdc2f72b0>: Failed to establish a new connection: [Errno 111]
Connection refused'))
Which seems to keep forever. So eventually I gave up and moved forward.
And I changed to use the uwsgi socket instead of the direct port.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|SIGINT]> mailman-web migrate
System check identified some issues:
WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique
constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you
don't care about it.
account.EmailAddress: (models.W043) MariaDB does not support indexes on
expressions.
HINT: An index won't be created. Silence this warning if you don't
care about it.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
Applying account.0003_alter_emailaddress_create_unique_verified_email...
OK
Applying account.0004_alter_emailaddress_drop_unique_email... OK
Applying account.0005_emailaddress_idx_upper_email... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying django_mailman3.0003_sessions... OK
Applying django_q.0010_auto_20200610_0856... OK
Applying django_q.0011_auto_20200628_1055... OK
Applying django_q.0012_auto_20200702_1608... OK
Applying django_q.0013_task_attempt_count... OK
Applying django_q.0014_schedule_cluster... OK
Applying hyperkitty.0016_auto_20180309_0056... OK
Applying hyperkitty.0017_file_attachments... OK
Applying hyperkitty.0018_threadcategory_color... OK
Applying hyperkitty.0019_auto_20190127_null_description... OK
Applying hyperkitty.0020_auto_20190907_1927... OK
Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call
last):
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 87, in _execute
return self.cursor.execute(sql)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
line 75, in execute
return self.cursor.execute(query, args)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
179, in execute
res = self._query(mogrified_query)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
330, in _query
db.query(q)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
line 261, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators'
already exists")
Then dropping table hyperkitty_mailinglist_moderators.
(venv) mailman@new-mailman3 ~ (v3.1.1)> mailman-web migrate
System check identified some issues:
WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique
constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you
don't care about it.
account.EmailAddress: (models.W043) MariaDB does not support indexes on
expressions.
HINT: An index won't be created. Silence this warning if you don't
care about it.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call
last):
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 87, in _execute
return self.cursor.execute(sql)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
line 75, in execute
return self.cursor.execute(query, args)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
179, in execute
res = self._query(mogrified_query)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
330, in _query
db.query(q)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
line 261, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_owners'
already exists")
After dropping table hyperkitty_mailinglist_owners.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate
System check identified some issues:
WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique
constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you
don't care about it.
account.EmailAddress: (models.W043) MariaDB does not support indexes on
expressions.
HINT: An index won't be created. Silence this warning if you don't
care about it.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
Applying hyperkitty.0021_add_owners_mods...Traceback (most recent call
last):
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 87, in _execute
return self.cursor.execute(sql)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
line 75, in execute
return self.cursor.execute(query, args)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
179, in execute
res = self._query(mogrified_query)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
330, in _query
db.query(q)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
line 261, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1050, "Table 'hyperkitty_mailinglist_moderators'
already exists")
After dropping table hyperkitty_mailinglist_moderators.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate
System check identified some issues:
WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique
constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you
don't care about it.
account.EmailAddress: (models.W043) MariaDB does not support indexes on
expressions.
HINT: An index won't be created. Silence this warning if you don't
care about it.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
Applying hyperkitty.0021_add_owners_mods... OK
Applying hyperkitty.0022_mailinglist_archive_rendering_mode... OK
Applying hyperkitty.0023_alter_mailinglist_name... OK
Applying postorius.0004_create_email_template...Traceback (most recent
call last):
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/utils.py",
line 87, in _execute
return self.cursor.execute(sql)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/db/backends/mysql/base.py",
line 75, in execute
return self.cursor.execute(query, args)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
179, in execute
res = self._query(mogrified_query)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/cursors.py", line
330, in _query
db.query(q)
File
"/local/mailman/venv/lib/python3.10/site-packages/MySQLdb/connections.py",
line 261, in query
_mysql.connection.query(self, query)
MySQLdb.OperationalError: (1050, "Table 'postorius_emailtemplate' already
exists")
After dropping table postorius_emailtemplate.
(venv) mailman@new-mailman3 ~ (v3.1.1) [0|1]> mailman-web migrate
System check identified some issues:
WARNINGS:
account.EmailAddress: (models.W036) MariaDB does not support unique
constraints with conditions.
HINT: A constraint won't be created. Silence this warning if you
don't care about it.
account.EmailAddress: (models.W043) MariaDB does not support indexes on
expressions.
HINT: An index won't be created. Silence this warning if you don't
care about it.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
Applying postorius.0004_create_email_template... OK
Applying postorius.0005_auto_20180707_1107... OK
Applying postorius.0006_auto_20180711_1359... OK
Applying postorius.0007_auto_20180712_0536... OK
Applying postorius.0008_auto_20190310_0717... OK
Applying postorius.0009_auto_20190508_1604... OK
Applying postorius.0010_auto_20190821_0621... OK
Applying postorius.0011_auto_20191109_1219... OK
Applying postorius.0012_auto_20200420_2136... OK
Applying postorius.0013_auto_20201116_0058... OK
Applying postorius.0014_auto_20210329_2248... OK
Applying postorius.0015_auto_20210619_0509... OK
Applying postorius.0016_auto_20210810_2157... OK
Applying postorius.0017_alter_emailtemplate_language... OK
Applying postorius.0018_alter_emailtemplate_language... OK
Applying socialaccount.0004_app_provider_id_settings... OK
Applying socialaccount.0005_socialtoken_nullable_app... OK
Applying socialaccount.0006_alter_socialaccount_extra_data... OK
At this point the errors remains about not reaching web part. So I started
mailman3-web.
Then I see these errors on var/log/mailman.log
Feb 19 15:35:14 2024 (543890) Traceback (most recent call last):
File
"/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py",
line 158, in _archive_message
url = self._send_message(mlist, msg)
File
"/local/mailman/venv/lib/python3.10/site-packages/mailman_hyperkitty/__init__.py",
line 228, in _send_message
raise ValueError(result.text)
ValueError: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address>
</body></html>
Feb 19 15:35:14 2024 (543890) HyperKitty failure on
http://127.0.0.1/archives/api/mailman/archive: <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address>
</body></html>
(404)
Feb 19 15:35:14 2024 (543890) Could not archive the message with id <
ff1707bb-d105-4f37-b3f8-9766b3563127(a)SESAMR604.domain.com>
Feb 19 15:35:14 2024 (543890) archiving failed, re-queuing (mailing-list
mylist.new-mailman.domain.com, message <
ff1707bb-d105-4f37-b3f8-9766b3563127(a)machine.domain.com>)
Feb 19 15:35:14 2024 (543890) Exception in the HyperKitty archiver:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>404 Not Found</title>
</head><body>
<h1>Not Found</h1>
<p>The requested URL was not found on this server.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at 127.0.0.1 Port 80</address>
</body></html>
And I can't get access to the hyperkitty at all.
On var/logs/uwsgi-error.log:
--- Logging error ---
Traceback (most recent call last):
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 356, in pusher
task = SignedPackage.loads(task[1])
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/signing.py",
line 25, in loads
return signing.loads(
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py",
line 35, in loads
base64d = force_bytes(TimestampSigner(key, salt=salt).unsign(s,
max_age=max_age))
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py",
line 70, in unsign
result = super(TimestampSigner, self).unsign(value)
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py",
line 55, in unsign
raise BadSignature('Signature "%s" does not match' % sig)
django.core.signing.BadSignature: Signature "48do9gGvueBxakX_a4uNmSwD7cs"
does not match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.10/logging/__init__.py", line 1100, in emit
msg = self.format(record)
File "/usr/lib/python3.10/logging/__init__.py", line 943, in format
return fmt.format(record)
File "/usr/lib/python3.10/logging/__init__.py", line 678, in format
record.message = record.getMessage()
File "/usr/lib/python3.10/logging/__init__.py", line 368, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "/local/mailman/venv/bin/mailman-web", line 8, in <module>
sys.exit(main())
File
"/local/mailman/venv/lib/python3.10/site-packages/mailman_web/manage.py",
line 90, in main
execute_from_command_line(sys.argv)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py",
line 446, in execute_from_command_line
utility.execute()
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/__init__.py",
line 440, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
line 402, in run_from_argv
self.execute(*args, **cmd_options)
File
"/local/mailman/venv/lib/python3.10/site-packages/django/core/management/base.py",
line 448, in execute
output = self.handle(*args, **options)
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/management/commands/qcluster.py",
line 22, in handle
q.start()
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 78, in start
self.sentinel.start()
File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/lib/python3.10/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in
__init__
self._launch(process_obj)
File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in
_launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in
_bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 168, in __init__
self.start()
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 172, in start
self.spawn_cluster()
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 248, in spawn_cluster
self.pusher = self.spawn_pusher()
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 201, in spawn_pusher
return self.spawn_process(pusher, self.task_queue, self.event_out,
self.broker)
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 197, in spawn_process
p.start()
File "/usr/lib/python3.10/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.10/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/lib/python3.10/multiprocessing/context.py", line 281, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 19, in
__init__
self._launch(process_obj)
File "/usr/lib/python3.10/multiprocessing/popen_fork.py", line 71, in
_launch
code = process_obj._bootstrap(parent_sentinel=child_r)
File "/usr/lib/python3.10/multiprocessing/process.py", line 314, in
_bootstrap
self.run()
File "/usr/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 358, in pusher
logger.error(e, traceback.format_exc())
Message: BadSignature('Signature "48do9gGvueBxakX_a4uNmSwD7cs" does not
match')
Arguments: ('Traceback (most recent call last):\n File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/cluster.py",
line 356, in pusher\n task = SignedPackage.loads(task[1])\n File
"/local/mailman/venv/lib/python3.10/sit
e-packages/django_q/signing.py", line 25, in loads\n return
signing.loads(\n File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py",
line 35, in loads\n base64d = force_bytes(TimestampSigner(key, salt=sa
lt).unsign(s, max_age=max_age))\n File
"/local/mailman/venv/lib/python3.10/site-packages/django_q/core_signing.py",
line 70, in unsign\n result = super(TimestampSigner,
self).unsign(value)\n File "/local/mailman/venv/lib/python3.10
/site-packages/django_q/core_signing.py", line 55, in unsign\n raise
BadSignature(\'Signature "%s" does not match\' %
sig)\ndjango.core.signing.BadSignature: Signature
"48do9gGvueBxakX_a4uNmSwD7cs" does not match\n',)
I'm using uwsgi via apache:
(venv) mailman@new-mailman3 ~ (v3.1.1)> more
/etc/apache2/conf-enabled/mailman3.conf
Alias /mailman3/favicon.ico /local/mailman/web/static/favicon.ico
Alias /mailman/favicon.ico /local/mailman/web/static/favicon.ico
Alias /favicon.ico /local/mailman/web/static/favicon.ico
Alias /mailman3/static /local/mailman/web/static
Alias /mailman/static /local/mailman/web/static
Alias /static /local/mailman/web/static
<Directory "/local/mailman/web/static">
Require all granted
</Directory>
<IfModule mod_proxy_uwsgi.c>
ProxyPass /mailman3/favicon.ico !
ProxyPass /mailman/favicon.ico !
ProxyPass /favicon.ico !
ProxyPass /mailman3/static !
ProxyPass /mailman/static !
ProxyPass /static !
ProxyPass /mailman3
unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/
ProxyPass /mailman
unix:/local/mailman/var/uwsgi.sock|uwsgi://localhost/
#ProxyPass /mailman3 http://localhost:8000/ timeout=180
#ProxyPass /mailman http://localhost:8000/ timeout=180
#ProxyPass / http://localhost:8000/ timeout=180
</IfModule>
Best Regards,
Helio Loureiro
https://helio.loureiro.eng.br
https://github.com/helioloureiro
https://mastodon.social/@helioloureiro
On Fri, 16 Feb 2024 at 22:39, Mark Sapiro <mark(a)msapiro.net> wrote:
> On 2/16/24 07:12, Helio Loureiro wrote:
>
> > - start mailman3 and mailman-3web
> > - run mailman3-web migrate
>
> You should run mailman3-web migrate when mailman-3web is not running.
>
> > django.db.utils.OperationalError: (1050, "Table
> > 'hyperkitty_mailinglist_moderators' already exists")
> >
> > I tried to drop the table, but then it complained about another one. I
> > dropped all the complained tables and as result hypperkitty never
> > started. So I went back to see why the first error happened.
>
> The errors occurred because you had recently added tables in your
> database so they couldn't be added by the migrations. Dropping the
> tables was the correct thing to do.
>
> Did you ultimately successfully run all the migrations?
>
> When you say `hypperkitty never started`, what exactly does that mean?
> What happens when you try to access the archives? Can you access
> postorius? Are any errors logged in mailman3-web's log?
>
> --
> Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
>
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
> Archived at:
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
>
> This message sent to helio(a)loureiro.eng.br
>
1 year, 6 months