[Pkg-mailman-hackers] Bug#1015989: mailman3: NNTP Gatewaying fails if any header is 'too long' and thus wrapped
Athanasius
debian at miggy.org
Sun Jul 24 21:27:45 BST 2022
Package: mailman3
Version: 3.3.3-1
Severity: important
Tags: patch
Dear Maintainer,
I have a mailman3 email list configured to gate all posts to a local
newsgroup. The local news server is Debian packaged INN.
If any of the headers are overly long then the mailman3 3.3.3 code
causes them to get wrapped in an SMTP-valid manner, but INN does not
consider this to be valid.
As a result the NNTP runner code encounters an exception, and this has
been observed to then result in the message not being fully processed,
such that it doesn't go out to list members. The message does appear to
still get properly archived by hyperkitty.
One cause of long header lines *is* hyperkitty, as it causes the
addition of such headers as List-Archive, set to the full URL of the
post. This can easily exceed 80 characters.
I opened an issue about this upstream over a year ago, as it also affected
the buster version of mailman3:
<https://gitlab.com/mailman/mailman/-/issues/750>
That issue includes my workaround, but I note they have implemented a
different code change in the 3.3.5 tag:
<https://gitlab.com/mailman/mailman/-/blob/3.3.5/src/mailman/runners/nntp.py#L85-87>
Either this code change, or if that doesn't work mine, should be
implemented in a Debian 3.3.3 fix ASAP.
The error logged to /var/log/mailman3/mailman.log:
---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<
Jul 24 20:55:47 2022 (578174) <Yt2jwXrGjbepc8ED at fysh.org> NNTP error for <mylist>@<mydomain>
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mailman/runners/nntp.py", line 76, in _di
spose
password=config.nntp.password)
File "/usr/lib/python3.9/nntplib.py", line 907, in post
return self._post('POST', data)
File "/usr/lib/python3.9/nntplib.py", line 900, in _post
return self._getresp()
File "/usr/lib/python3.9/nntplib.py", line 483, in _getresp
raise NNTPTemporaryError(resp)
nntplib.NNTPTemporaryError: 441 Invalid syntax encountered in header (unexpected
byte, no colon-space, or empty content line): List-Archive
---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<
And on the INN side /var/log/news/news.notice has:
---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<
Jul 24 20:55:47 <host> nnrpd[855696]: <host> post failed Invalid syntax encountered in header (unexpected byte, no colon-space, or empty content line): List-Archive
---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<
The auto-generated information below has missed out inn, so here's
`dpkg -l inn\*` output:
---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<
un inn <none> <none> (no description available)
ii inn2 2.6.4-2 amd64 'InterNetNews' news server
un inn2-dev <none> <none> (no description available)
ii inn2-inews 2.6.4-2 amd64 NNTP client news injector, from InterNetNews (INN)
un inn2-lfs <none> <none> (no description available)
un innfeed <none> <none> (no description available)
---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<---o<
-- System Information:
Debian Release: 11.4
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.15.57-fysh-kvmguest (SMP w/8 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages mailman3 depends on:
ii dbconfig-sqlite3 2.0.19
ii debconf [debconf-2.0] 1.5.77
ii init-system-helpers 1.60
ii logrotate 3.18.0-2+deb11u1
ii lsb-base 11.1.0
ii python3 3.9.2-3
ii python3-aiosmtpd 1.2.2-1
ii python3-alembic 1.4.3-1
ii python3-authheaders 0.13.1-1
ii python3-authres 1.2.0-2
ii python3-click 7.1.2-1
ii python3-dateutil 2.8.1-6
ii python3-dnspython 2.0.0-1
ii python3-falcon 2.0.0-2+b1
ii python3-flufl.bounce 3.0.1-1
ii python3-flufl.i18n 3.0.1-1
ii python3-flufl.lock 5.0.1-1
ii python3-gunicorn 20.1.0-1
ii python3-importlib-resources 5.1.0-1
ii python3-lazr.config 2.2.3-1
ii python3-passlib 1.7.4-1
ii python3-psycopg2 2.8.6-2
ii python3-public 0.5-1.1
ii python3-requests 2.25.1+dfsg-2
ii python3-sqlalchemy 1.3.22+ds1-1
ii python3-zope.component 4.3.0-3
ii python3-zope.configuration 4.4.0-1
ii python3-zope.event 4.4-3
ii python3-zope.interface 5.2.0-1
ii ucf 3.0043
Versions of packages mailman3 recommends:
ii exim4-daemon-heavy [mail-transport-agent] 4.94.2-7
Versions of packages mailman3 suggests:
ii chromium [www-browser] 103.0.5060.134-1~deb11u1
ii elinks [www-browser] 0.13.2-1+b1
ii firefox-esr [www-browser] 91.11.0esr-1~deb11u1
ii links [www-browser] 2.21-1+b1
ii links2 [www-browser] 2.21-1+b1
ii lynx [www-browser] 2.9.0dev.6-3~deb11u1
ii mailman3-doc 3.3.3-1
ii mariadb-server-10.5 [virtual-mysql-server] 1:10.5.15-0+deb11u1
ii w3m [www-browser] 0.5.3+git20210102-6
-- debconf information:
mailman3/internal/reconfiguring: false
mailman3/database-type: pgsql
mailman3/remove-error: abort
mailman3/upgrade-backup: true
mailman3/remote/host: localhost
mailman3/config_hyperkitty:
mailman3/pgsql/no-empty-passwords:
mailman3/init_service_failed:
mailman3/pgsql/authmethod-admin: ident
mailman3/pgsql/admin-user: postgres
mailman3/internal/skip-preseed: false
mailman3/remote/newhost:
mailman3/missing-db-package-error: abort
mailman3/pgsql/authmethod-user: ident
mailman3/mysql/authplugin: default
mailman3/db/dbname: mailman3
mailman3/passwords-do-not-match:
mailman3/upgrade-error: abort
mailman3/pgsql/manualconf:
mailman3/db/app-user: mailman3 at localhost
mailman3/db/basepath:
mailman3/dbconfig-remove: true
mailman3/mysql/method: Unix socket
mailman3/purge: false
mailman3/dbconfig-reinstall: false
mailman3/install-error: abort
* mailman3/dbconfig-install: false
mailman3/remote/port:
mailman3/pgsql/method: TCP/IP
mailman3/dbconfig-upgrade: true
mailman3/mysql/admin-user:
mailman3/pgsql/changeconf: false
-- debsums errors found:
debsums: changed file /usr/lib/python3/dist-packages/mailman/runners/nntp.py (from mailman3 package)
More information about the Pkg-mailman-hackers
mailing list