[Mailman-Users] Moderation requests flood after migrating from MM2 to MM3 on Debian

2022-10-14 Thread grmpf
Dear all,

this may be of course related to Debian version of Mailman3 (currently 3.3.3, 
Debian 11 Bullseye), but I hope someone may point me towards a direction in 
which i should start digging in order to resolve this issue.

I have recently migrated two lists from perfectly working MM2  to MM3 using the 
migration approach outlines in the documentation 
(https://docs.mailman3.org/en/latest/migration.html), i.e.

a) mailman create foo-l...@example.com
b) mailman import21 foo-l...@example.com /path/to/mailman2/foo-list/config.pck
c) python manage.py hyperkitty_import -l foo-l...@example.com 
$var_prefix/archives/private/foo-list.mbox/foo-list.mbox
d) python manage.py update_index_one_list foo-l...@example.com

I do not have the hyperkitty working properly, but that is not important as for 
now. What is however important, is that for both lists mailman3 generates 
approximately every minute a message that it tries to send to the list and the 
message is catched by the mailman and requires moderation. As a result, I have 
some 1000 moderation requests for each of the list every day. The requests are 
mostly of the type

Sender: foo-list-ow...@example.com
Subject: 
foo-list@example.com_post_from_foo-list-owner@example.com_requires_approval
Reason: The message is not from a list member

I can see also some weird handling of bounced messages (if we try to send an 
e-mail that bounces, in my opinion it should be silently discarded or sent to 
foo-list-ow...@example.com).

Sender: 
microsoftexchange329e71ec88ae4615bbc36ab6ce411...@exampledomain.onmicrosoft.com
Subject: Undeliverable:_[FOO]_Meeting
Reason: The message is not from a list member

I have a strong feeling that I misconfigured MM3 somewhere or that I did not do 
my homework properly and failed to read relevant parts of the documentation. 
Any ideas where to start?

Thanks a lot!

Jan
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Moderation requests flood after migrating from MM2 to MM3 on Debian

2022-10-14 Thread Mark Sapiro

On 10/13/22 13:33, gr...@mm.st wrote:


What is however important, is that for both lists mailman3 generates 
approximately every minute a message that it tries to send to the list and the 
message is catched by the mailman and requires moderation. As a result, I have 
some 1000 moderation requests for each of the list every day. The requests are 
mostly of the type

 Sender: foo-list-ow...@example.com
 Subject: 
foo-list@example.com_post_from_foo-list-owner@example.com_requires_approval
 Reason: The message is not from a list member



There is something misconfigured here. What are the settings for the 
list's owners and moderators?


The above message is a notice to the owners and moderators about the 
held post. It should not be sent to the list.




I can see also some weird handling of bounced messages (if we try to send an 
e-mail that bounces, in my opinion it should be silently discarded or sent to 
foo-list-ow...@example.com).



There have been some small changes in bounce processing since 3.3.3 (see 
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/NEWS.html), 
but they shouldn't affect this.


The envelope sender of messages from a list is 
listname-bounces@list.domain. Thus bounces should be returned to that 
address and processed by Mailman's bounce runner. There are several list 
settings that control this that are similar to MM 2.1. If the list's 
process_bounces setting is False, the bounce is ignored. If true, 
bounces are scored and delivery to the bouncing user is ultimately 
disabled and the user ultimately unsubscribed as in MM 2.1


I'm just guessing here, but your issues could be explained if your MTA 
is somehow dropping the -xxx part of the recipient when delivering a 
message to listname-...@example.com so all messages get delivered to the 
list. This can happen for example if your MTA is exim and your exim 
mailman transport does not have `rcpt_include_affixes = true`.


--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Martin Lorenz
Now I will start over ...

First of all: do you recommend the debian package install or the manual one?

```
Package mailman3:
p   3.3.3-1 
   stable   
  
Package mailman3-doc:
p   3.3.3-1 
   stable   
  
Package mailman3-full:
p   3.3.3-1 
   stable   
  
Package mailman3-web:
p   0+20200530-2
   stable   
  
Package python3-django-mailman3:
i   1.3.5-2 
   stable   
  
Package python3-mailman-hyperkitty:
p   1.1.0-10
   stable   
  
Package python3-mailmanclient:
i   3.3.2-1 
   stable   
  

# cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
```
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Mark Sapiro

On 10/14/22 09:56, Martin Lorenz wrote:

Now I will start over ...

First of all: do you recommend the debian package install or the manual one?

```
Package mailman3:
p   3.3.3-1 
   stable   
  
Package mailman3-doc:
p   3.3.3-1 
   stable   
  
Package mailman3-full:
p   3.3.3-1 
   stable
Package mailman3-web:
p   0+20200530-2
   stable
Package python3-django-mailman3:
i   1.3.5-2 
   stable
Package python3-mailman-hyperkitty:
p   1.1.0-10
   stable
Package python3-mailmanclient:
i   3.3.2-1 
   stable

# cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
```



Those Debian packages are mostly quite out of date. If you are willing 
to tolerate that, installation of the packages should be easier, but 
judging from posts on the mailman-us...@mailman3.org list, not everyone 
finds it so.


I definitely suggest installing following 
https://docs.mailman3.org/en/latest/install/virtualenv.html, not only 
because you will get the benefit of bug fixes that aren't in the Debian 
packages, but people who might offer help via the 
mailman-us...@mailman3.org list are usually more familiar with the 
virtualenv install than with the Debian packages.


--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Martin Lorenz
OK 
thanks for the advice.

I started installing following the path ...

the first error I hit is:
```
(venv) mailman@arda:/etc/mailman3$ mailman-web migrate
Traceback (most recent call last):
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/utils.py", line 
66, in __getitem__
return self._engines[alias]
KeyError: 'django'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/backends/django.py",
 line 121, in get_package_libraries
module = import_module(entry[1])
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
  File "", line 1030, in _gcd_import
  File "", line 1007, in _find_and_load
  File "", line 986, in _find_and_load_unlocked
  File "", line 680, in _load_unlocked
  File "", line 790, in exec_module
  File "", line 228, in _call_with_frames_removed
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/hyperkitty/templatetags/decorate.py",
 line 4, in 
from hyperkitty.lib.renderer import markdown_renderer, text_renderer
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py", 
line 6, in 
from mistune.plugins.extra import plugin_url
ModuleNotFoundError: No module named 'mistune.plugins.extra'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/mailman/venv/bin/mailman-web", line 8, in 
sys.exit(main())
  File "/opt/mailman/venv/lib/python3.9/site-packages/mailman_web/manage.py", 
line 30, in main
execute_from_command_line(sys.argv)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/__init__.py",
 line 401, in execute_from_command_line
utility.execute()
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/__init__.py",
 line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/base.py", 
line 328, in run_from_argv
self.execute(*args, **cmd_options)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/base.py", 
line 366, in execute
self.check()
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/base.py", 
line 392, in check
all_issues = self._run_checks(
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/commands/migrate.py",
 line 64, in _run_checks
issues.extend(super()._run_checks(**kwargs))
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/management/base.py", 
line 382, in _run_checks
return checks.run_checks(**kwargs)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/checks/registry.py", 
line 72, in run_checks
new_errors = check(app_configs=app_configs)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/contrib/admin/checks.py", 
line 76, in check_dependencies
for engine in engines.all():
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/utils.py", line 
90, in all
return [self[alias] for alias in self]
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/utils.py", line 
90, in 
return [self[alias] for alias in self]
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/utils.py", line 
81, in __getitem__
engine = engine_cls(params)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/backends/django.py",
 line 25, in __init__
options['libraries'] = self.get_templatetag_libraries(libraries)
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/backends/django.py",
 line 43, in get_templatetag_libraries
libraries = get_installed_libraries()
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/backends/django.py",
 line 108, in get_installed_libraries
for name in get_package_libraries(pkg):
  File 
"/opt/mailman/venv/lib/python3.9/site-packages/django/template/backends/django.py",
 line 123, in get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template library 
specified. ImportError raised when trying to load 
'hyperkitty.templatetags.decorate': No module named 'mistune.plugins.extra'
```
```
(venv) mailman@arda:/etc/mailman3$ pip install mistune
Requirement already satisfied: mistune in 
/opt/mailman/venv/lib/python3.9/site-packages (3.0.0rc1)
```
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https

[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Mark Sapiro

On 10/14/22 13:59, Martin Lorenz wrote:

OK
thanks for the advice.

I started installing following the path ...

the first error I hit is:
```

...

   File "/opt/mailman/venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py", 
line 6, in 
 from mistune.plugins.extra import plugin_url
ModuleNotFoundError: No module named 'mistune.plugins.extra'



Sorry, that's https://gitlab.com/mailman/hyperkitty/-/issues/437

It is also not clear if you will also encounter 
https://gitlab.com/mailman/hyperkitty/-/issues/431


If your HyperKitty is version 1.3.5 installed from PyPI, the simplest 
solution is to downgrade mistune to 2.0.0rc1 in your venv

```
pip install mistune==2.0.0rc1
```

Alternatively you can downgrade to mistune<3.0
```
pip install mistune<3.0
```
But then you also need to ensure that line 7 in 
/opt/mailman/venv/lib/python3.9/site-packages/hyperkitty/lib/renderer.py is

```
from mistune.util import escape_html, escape_url
```
and not
```
from mistune.scanner import escape_html, escape_url
```

--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Martin Lorenz
thanks, that one did the trick

I think I kint of got ist up and running now.
this ist how the site looks:
https://list.poc.im/mailman3/lists/

I don't think, it should be like that.
I already added 
```
location /static/ {
 alias /opt/mailman/web/static;
}
```
to my nginx config, but without a change ...
what am I missing?
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Martin Lorenz
heureka!

added two lines to the nginx config and now it seems up and running ...

_location_ now looks like this:
```
location / {
   proxy_pass http://127.0.0.1:8000;
   proxy_set_header Host $host;
   proxy_set_header X-Forwarded-For $remote_addr;

   proxy_set_header X-Forwarded-Proto $scheme;
   proxy_set_header X-Forwarded-Host $host;
   }

```

will test nor and try to import my old lists tomorrow (it's already way past 
midnight here)
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Martin Lorenz
i think, I hit a bug 

I had mailman up and running, sent testmails to a testlist, used the 
webinterface ...
but than I played around with the domains.
I had added one of my domains for the test list but in the archive interface I 
still had "example.com" as a header. so I switched over to the domain admin 
panel and deleted example.com

and now everything is broken ...

I only get errors from django and the mailman process runs amok whenever it 
gets work to do.
very strange 
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Martin Lorenz
everything is nice and silky again ...

that's what I finally did to the database:
```
sudo -u postgres psql
postgres=# \connect mailmanweb 
mailmanweb=# insert into django_site(id, domain, name) values (1, 
'example.com', '');
INSERT 0 1
mailmanweb=# insert into django_mailman3_maildomain(id, mail_domain, site_id) 
values (0, 'example.com', 1);
INSERT 0 1
```
--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
https://mail.python.org/archives/list/mailman-users@python.org/


[Mailman-Users] Re: Hevy resource footprint forces backdrop to mailman 2.1

2022-10-14 Thread Mark Sapiro

On 10/14/22 16:42, Martin Lorenz wrote:

everything is nice and silky again ...



And your site looks good to me.

If you have further questions about this, please join the 
mailman-us...@mailman3.org list at 
https://lists.mailman3.org/mailman3/lists/mailman-us...@mailman3.org/ 
and post there. Mailman3 issues are really off topic for the 
mailman-users@python.org list.


--
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list -- mailman-users@python.org
To unsubscribe send an email to mailman-users-le...@python.org
https://mail.python.org/mailman3/lists/mailman-users.python.org/
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: https://www.mail-archive.com/mailman-users@python.org/
   https://mail.python.org/archives/list/mailman-users@python.org/