message duplication and an NNTP related error
Good day,
I have recently installed mailman3 on a Debian trixie system.
While I managed to set up most of it (the mailing lists, postorius and also a working gateway to our inn2 news server) I'm seeing a weird duplication of messages, that seems to be related to the error messages posted below.
When I switch off gating to nntp the duplication stops. Also only mail messages are duplicated, not the postings on the news server.
Any pointers as to what to look into, or how to remedy this problem are greatly appreciated :)
Thanks,
Laurens
here come the error logs: Feb 23 20:39:08 2026 (2776528) ACCEPT: <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> Feb 23 20:39:10 2026 (2776528) ACCEPT: <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> Feb 23 20:39:12 2026 (2776530) <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> NNTP error for test@grenzland.club Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman/runners/nntp.py", line 94, in _dispose conn.post(fp) ~~~~~~~~~^^^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 916, in post return self._post('POST', data) ~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 909, in _post return self._getresp() ~~~~~~~~~~~~~^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 492, in _getresp raise NNTPTemporaryError(resp) nntplib.NNTPTemporaryError: 441 Can't set system Injection-Info header field
On 2/23/26 13:56, Laurens Kils-Huetten wrote:
I have recently installed mailman3 on a Debian trixie system.
How? By following <https://docs.mailman3.org/en/latest/install/virtualenv.html>, installing Debian packages or ??
While I managed to set up most of it (the mailing lists, postorius and also a working gateway to our inn2 news server) I'm seeing a weird duplication of messages, that seems to be related to the error messages posted below.
What is the result from the command mailman conf -s nntp?
What are all the settings for the list at Settings->Newsgroup Gateway in Postorius?
When I switch off gating to nntp the duplication stops. Also only mail messages are duplicated, not the postings on the news server.
Any pointers as to what to look into, or how to remedy this problem are greatly appreciated :)
Thanks,
Laurens
here come the error logs: Feb 23 20:39:08 2026 (2776528) ACCEPT: <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> Feb 23 20:39:10 2026 (2776528) ACCEPT: <e4938b85cbd75c0b04867514fc0b8ad9@betola.de>
The above duplicate post comes before the following error, so I don't think the error is related to the duplication.
Feb 23 20:39:12 2026 (2776530) <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> NNTP error for test@grenzland.club Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman/runners/nntp.py", line 94, in _dispose conn.post(fp) ~~~~~~~~~^^^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 916, in post return self._post('POST', data) ~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 909, in _post return self._getresp() ~~~~~~~~~~~~~^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 492, in _getresp raise NNTPTemporaryError(resp) nntplib.NNTPTemporaryError: 441 Can't set system Injection-Info header field
This is a response from your nntp server.
Note: the above traceback indicates that this nntplib is standard-nntplib from PyPI which is normally only installed if Python is 3.13. If this is Python 3.13 and you have installed Mailman from other than the head of the gitlab branch, see <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...>
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am Mon, Feb 23, 2026 at 03:59:23PM -0800 schrieb Mark Sapiro:
On 2/23/26 13:56, Laurens Kils-Huetten wrote:
I have recently installed mailman3 on a Debian trixie system.
How? By following <https://docs.mailman3.org/en/latest/install/virtualenv.html>, installing Debian packages or ??
I've used the debian packages:
apt install mailman3-full mailman3-web
While I managed to set up most of it (the mailing lists, postorius and also a working gateway to our inn2 news server) I'm seeing a weird duplication of messages, that seems to be related to the error messages posted below.
What is the result from the command
mailman conf -s nntp?
[nntp] gatenews_every: 5m [nntp] host: localhost [nntp] password: [nntp] port: 119 [nntp] remove_headers: nntp-posting-host nntp-posting-date x-trace x-complaints-to xref date-received posted posting-version relay-version received [nntp] rewrite_duplicate_headers: To X-Original-To CC X-Original-CC Content-Transfer-Encoding X-Original-Content-Transfer-Encoding MIME-Version X-MIME-Version [nntp] user:
What are all the settings for the list at Settings->Newsgroup Gateway in Postorius?
Gateway to mail: yes Gateway to news: yes Linked newsgroup: grenzland.test Newsgroup moderation: Not Moderated NNTP include subject prefix: No
When I switch off gating to nntp the duplication stops. Also only mail messages are duplicated, not the postings on the news server.
Any pointers as to what to look into, or how to remedy this problem are greatly appreciated :)
Thanks,
Laurens
here come the error logs: Feb 23 20:39:08 2026 (2776528) ACCEPT: <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> Feb 23 20:39:10 2026 (2776528) ACCEPT: <e4938b85cbd75c0b04867514fc0b8ad9@betola.de>
The above duplicate post comes before the following error, so I don't think the error is related to the duplication.
makes sense, however when I set both Gateway flags to no I don't get those duplicates anymore. And obviously no error since mailman won't talk to NNTP.
Feb 23 20:39:12 2026 (2776530) <e4938b85cbd75c0b04867514fc0b8ad9@betola.de> NNTP error for test@grenzland.club Traceback (most recent call last): File "/usr/lib/python3/dist-packages/mailman/runners/nntp.py", line 94, in _dispose conn.post(fp) ~~~~~~~~~^^^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 916, in post return self._post('POST', data) ~~~~~~~~~~^^^^^^^^^^^^^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 909, in _post return self._getresp() ~~~~~~~~~~~~~^^ File "/usr/lib/python3/dist-packages/nntplib/__init__.py", line 492, in _getresp raise NNTPTemporaryError(resp) nntplib.NNTPTemporaryError: 441 Can't set system Injection-Info header field
This is a response from your nntp server.
Note: the above traceback indicates that this nntplib is standard-nntplib from PyPI which is normally only installed if Python is 3.13. If this is Python 3.13 and you have installed Mailman from other than the head of the gitlab branch, see <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...>
It's python 3.13.5
I looked at the patch and it seems like the change is already applied to the debian package.
Thank you so much for having a look at this!
Cheers,
lkh
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@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 lkh@grenzland.club
-- https://social.sdf-eu.org/web/@lkh IRC: lkh on Libera.chat and others Discord: lkh#2319
On 2/24/26 09:23, Laurens Kils-Hütten wrote:
I've used the debian packages:
apt install mailman3-full mailman3-web
Then this may be a Debian issue and should be reported there in any case. See <https://wiki.list.org/x/12812344>.
For what it's worth, the lists python-announce-list@python.org, python-list@python.org and python-de@python.org all use the nntp gateway and don't see any message duplication.
Have you looked at your nntp server's logs for clues as to the duplication and the error?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Am Tue, Feb 24, 2026 at 01:16:45PM -0800 schrieb Mark Sapiro:
On 2/24/26 09:23, Laurens Kils-Hütten wrote:
I've used the debian packages:
apt install mailman3-full mailman3-web
Then this may be a Debian issue and should be reported there in any case. See <https://wiki.list.org/x/12812344>.
I will, once I convinced it's really a bug. Right now I'm thinking it's a misconfiguration on inn2's side.
From scrutinising the message headers this is what happens:
mailman sends the message to the newsserver where it get's injected properly receiving an Injection-Information: header field. Then however this new message is sent back to mailman. Now there's a duplicate with identical message ID. Mailman then sends it back to inn2 which refuses to take it and the python nntp client throws an error, thus preventing an endless loop.
Why inn2 even sends the message back to mailman I can't tell right now.
These are the relevant snippets from my inn2 setup:
# this is from /etc/news/news2mail.cf # no surprises, and it basically works. News from the grenzland.test # group is forwarded to the proper list address test-grenzland-club test@grenzland.club
# this is in /etc/news/newsfeeds news2mail!:!*:Ac,Tc,Wn*:/usr/lib/news/bin/news2mail test-grenzland-club/grenzland.club:!*,grenzland.test:Ap,Tm:news2mail! # this last line should do two things: forward messages from the # test@grenzland.club list to the grenzland.test newsgroup, # AND don't send any messages back which have grenzland.club # in their Path header. This last bit seems to fail however, # and I fail to spot the error.
I'll ask about this in the inn2 places I known of.
Cheers,
lkh
-- Laurens Kils-Hütten https://lkh.sdf-eu.org
Laurens Kils-Hütten wrote:
# this is in /etc/news/newsfeeds news2mail!:!*:Ac,Tc,Wn*:/usr/lib/news/bin/news2mail test-grenzland-club/grenzland.club:!*,grenzland.test:Ap,Tm:news2mail! # this last line should do two things: forward messages from the # test@grenzland.club list to the grenzland.test newsgroup,
No, it doesn't. newsfeeds specifies how incoming articles should be distributed to other programs and files on the server. It can't "forward" articles from a mailing list. That's what Mailman does (and has to do).
It will forward messages that are posted to grenzland.test to the news2mail feed and to the test@grenzland.club mailing list, so the other way around. And it will ...
# AND don't send any messages back which have grenzland.club
... or test-grenzland-club ...
# in their Path header. This last bit seems to fail however, # and I fail to spot the error.
Does Mailman submit the message with a Path header containing "grenzland.club" or "test-grenzland-club"?
Does Mailman post the message (via NNRP / nnrpd) or feed it?
If the former, what Path element does your nnrpd add?
Can you show the relevant entries from the news and news.notice logfiles and the Path header from a message from the mailing list to the newsgroup?
(Or we can take that to news.software.nntp or de.comm.software.newsserver, whichever (language) you prefer.)
-thh
Am Wed, Feb 25, 2026 at 08:30:47PM +0100 schrieb Thomas Hochstein:
Laurens Kils-Hütten wrote:
# this is in /etc/news/newsfeeds news2mail!:!*:Ac,Tc,Wn*:/usr/lib/news/bin/news2mail test-grenzland-club/grenzland.club:!*,grenzland.test:Ap,Tm:news2mail! # this last line should do two things: forward messages from the # test@grenzland.club list to the grenzland.test newsgroup,
No, it doesn't. newsfeeds specifies how incoming articles should be distributed to other programs and files on the server. It can't "forward" articles from a mailing list. That's what Mailman does (and has to do).
right, thanks for clarifying. I shouldn't have written "forward" and I mixed it up.
It will forward messages that are posted to grenzland.test to the news2mail feed and to the test@grenzland.club mailing list, so the other way around. And it will ...
# AND don't send any messages back which have grenzland.club
... or test-grenzland-club ...
I think the Ap flag should prevent this.
# in their Path header. This last bit seems to fail however, # and I fail to spot the error.
Does Mailman submit the message with a Path header containing "grenzland.club" or "test-grenzland-club"?
Looking at the Path headers it's the former. test-grenzland-club is just an arbitrary identifier used in the inn2 configuration.
I'm not sure mailman is even generating the Path header itself.
Does Mailman post the message (via NNRP / nnrpd) or feed it?
nnrpd
If the former, what Path element does your nnrpd add?
see below
Can you show the relevant entries from the news and news.notice logfiles and the Path header from a message from the mailing list to the newsgroup?
Path headers always look like this, whether I post a message as news or email:
Path: grenzland.club!.POSTED.localhost!not-for-mail
So the exclusion pattern should match on the first part.
This is what shows up in /var/log/news/news.notice: # I've added some comments ... # first mailman's nnrp client connects ... 2026-02-25T22:49:31.966611+01:00 grenzland innd: localhost connected 21 streaming allowed 2026-02-25T22:49:32.006079+01:00 grenzland innd: localhost:21 NCmode "MODE READER" received 2026-02-25T22:49:32.006427+01:00 grenzland innd: localhost:21 checkpoint seconds 1 accepted 0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0 rejected size 0 2026-02-25T22:49:32.006490+01:00 grenzland innd: localhost:21 closed seconds 1 accepted 0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0 rejected size 0 2026-02-25T22:49:32.015322+01:00 grenzland nnrpd[2990705]: localhost (127.0.0.1) connect - port 119 2026-02-25T22:49:32.059569+01:00 grenzland nnrpd[2990705]: SERVER perl filtering enabled 2026-02-25T22:49:32.059711+01:00 grenzland innd: localhost connected 21 2026-02-25T22:49:32.061392+01:00 grenzland innd: localhost:21 checkpoint seconds 0 accepted 1 refused 0 rejected 0 duplicate 0 accepted size 1338 duplicate size 0 rejected size 0 2026-02-25T22:49:32.061463+01:00 grenzland innd: localhost:21 closed seconds 0 accepted 1 refused 0 rejected 0 duplicate 0 accepted size 1338 duplicate size 0 rejected size 0 # and posts successfully: 2026-02-25T22:49:32.061498+01:00 grenzland nnrpd[2990705]: localhost post ok <20260225214930.E77531412C1@grenzland.club> 2026-02-25T22:49:32.062568+01:00 grenzland nnrpd[2990705]: localhost posts received 1 rejected 0 2026-02-25T22:49:32.062771+01:00 grenzland nnrpd[2990705]: localhost times user 0.006 system 0.004 idle 0.000 elapsed 0.048 2026-02-25T22:49:32.062895+01:00 grenzland nnrpd[2990705]: localhost time 48 idle 43(6) nntpwrite 1(24) # with a notable delay I sea the same connection procedure 2026-02-25T22:49:33.070321+01:00 grenzland innd: localhost connected 21 streaming allowed 2026-02-25T22:49:33.110111+01:00 grenzland innd: localhost:21 NCmode "MODE READER" received 2026-02-25T22:49:33.111092+01:00 grenzland innd: localhost:21 checkpoint seconds 0 accepted 0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0 rejected size 0 2026-02-25T22:49:33.111186+01:00 grenzland innd: localhost:21 closed seconds 0 accepted 0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0 rejected size 0 2026-02-25T22:49:33.124001+01:00 grenzland nnrpd[2990714]: localhost (127.0.0.1) connect - port 119 # but now it fails, presumably because an Injection-Info header field # has already been set. At the same time I see the error message given # in my original email in /var/log/mailman3/mailman.log 2026-02-25T22:49:33.165116+01:00 grenzland nnrpd[2990714]: localhost post failed Can't set system Injection-Info header field 2026-02-25T22:49:33.165765+01:00 grenzland nnrpd[2990714]: localhost posts received 0 rejected 1 2026-02-25T22:49:33.165832+01:00 grenzland nnrpd[2990714]: localhost times user 0.005 system 0.004 idle 0.000 elapsed 0.043 2026-02-25T22:49:33.165876+01:00 grenzland nnrpd[2990714]: localhost time 43 idle 42(6) nntpwrite 0(24) 2026-02-25T22:49:33.173419+01:00 grenzland innd: localhost connected 21 streaming allowed 2026-02-25T22:49:33.213944+01:00 grenzland innd: localhost:21 NCmode "MODE READER" received 2026-02-25T22:49:33.214300+01:00 grenzland innd: localhost:21 checkpoint seconds 0 accepted 0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0 rejected size 0 2026-02-25T22:49:33.214368+01:00 grenzland innd: localhost:21 closed seconds 0 accepted 0 refused 0 rejected 0 duplicate 0 accepted size 0 duplicate size 0 rejected size 0 2026-02-25T22:49:33.221243+01:00 grenzland nnrpd[2990715]: localhost (127.0.0.1) connect - port 119 2026-02-25T22:49:33.261359+01:00 grenzland nnrpd[2990715]: localhost post failed Can't set system Injection-Info header field 2026-02-25T22:49:33.262391+01:00 grenzland nnrpd[2990715]: localhost posts received 0 rejected 1 2026-02-25T22:49:33.263326+01:00 grenzland nnrpd[2990715]: localhost times user 0.005 system 0.002 idle 0.000 elapsed 0.042 2026-02-25T22:49:33.263816+01:00 grenzland nnrpd[2990715]: localhost time 43 idle 41(6) nntpwrite 1(24)
(Or we can take that to news.software.nntp or de.comm.software.newsserver, whichever (language) you prefer.)
I don't have direct access to either group on this here machine. But news.software.nntp might actually be more on topic. Follow-up wherever you think is more apropriate.
Thanks in any case!
lkh
-thh
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@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 lkh@grenzland.club
-- ~lkh (Laurens Kils-Hütten)
Hi,
another question about gating. What's the proper way to set things up from mailman3's point of view.
I understand mailman will send messages via NNTP. But how about the other way round? What I'm trying is setting up INN so it sends messages for the list to the respective list address. But could mailman also pull news from nntp? And is that what the "News to Mail" flag is supposed to do?
Thanks,
lkh
--
Have this adventurer for your next game:
Samo has a club and a helmet
STR 4 INT 3 WIS 12 DEX 10 CON 10 CHA 16
HP 3 70 gp
Laurens Kils-Hütten writes:
I understand mailman will send messages via NNTP. But how about the other way round?
Mailman will function as an NNTP client on behalf of a list in both directions.
What I'm trying is setting up INN so it sends messages for the list to the respective list address.
I would not do that.
Asymmetric paths are usually headaches to deal with. For example, I seem to recall that there were news clients that had a "post and mail" operation. Mailman does not deduplicate across messages (the subscriber "no dups" setting is used to keep an explicitly addressed subscriber in To or CC from receiving both a direct mail copy and the list copy, not keeping Mailman from receiving and distributing the same message twice), so in that case without a custom rule to discard duplicate messages, Mailman might receive and distribute the exact same message twice, once received via NNTP and once via LMTP.
But could mailman also pull news from nntp? And is that what the "News to Mail" flag is supposed to do?
Yes and yes,
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Am Fri, Feb 27, 2026 at 11:47:04PM +0900 schrieb Stephen J. Turnbull:
Laurens Kils-Hütten writes:
I understand mailman will send messages via NNTP. But how about the other way round?
Mailman will function as an NNTP client on behalf of a list in both directions.
Right, that's the way I have it set up right now.
What I'm trying is setting up INN so it sends messages for the list to the respective list address.
I would not do that.
Asymmetric paths are usually headaches to deal with.
yep ... headaches ...
So thanks a lot for clarifying. There's only one issue left I'm seeing right now. Mailman does not rewrite the Newsgroups: header. Thus mua's like Thunderbird which also talk NNTP offer to reply to the newsgroup instead of to the list. Arguably this might be called a bug in thunderbird, but I think it would be reasonable if mailman would change "Newsgroups:" to "X-Newsgroups:" to avoid these kinds of pitfalls.
Cheers,
lkh
-- https://grenzland.club/~lkh email/xmpp: lkh@grenzland.club
On 2/27/26 07:17, Laurens Kils-Hütten wrote:
So thanks a lot for clarifying. There's only one issue left I'm seeing right now. Mailman does not rewrite the Newsgroups: header. Thus mua's like Thunderbird which also talk NNTP offer to reply to the newsgroup instead of to the list. Arguably this might be called a bug in thunderbird, but I think it would be reasonable if mailman would change "Newsgroups:" to "X-Newsgroups:" to avoid these kinds of pitfalls.
Mailman has a couple of settings in the [nntp] section that control this. See <https://gitlab.com/mailman/mailman/-/blob/master/src/mailman/config/schema.c...>. You can't use rewrite_duplicate_headers to do this because it onle rewrites the duplicates and not the original, but you can use remove_headers to remove the Newsgroups header. If you want to do this you could add
[nntp]
remove_headers:
nntp-posting-host nntp-posting-date x-trace
x-complaints-to xref date-received posted
posting-version relay-version received
newsgroups
to your mailman.cfg to continue to remove the defaults and also remove the Newsgroups header.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Laurens Kils-Hütten writes:
So thanks a lot for clarifying. There's only one issue left I'm seeing right now. Mailman does not rewrite the Newsgroups: header. Thus mua's like Thunderbird which also talk NNTP offer to reply to the newsgroup instead of to the list.
To be quite honest, I think that's correct default behavior for multiprotocol MUAs. It's of course your choice as to whether the mailing list or the newsgroup is primary. If the mailing list, I think you should remove, not rewrite, the Newsgroups header.[1]
Steve
Footnotes: [1] Modulo the problem that there might be multiple groups there, but that would also make rewriting it a bad idea, since those other groups are probably not among the addressees, even if they have mailing lists.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
participants (5)
-
Laurens Kils-Huetten -
Laurens Kils-Hütten -
Mark Sapiro -
Stephen J. Turnbull -
Thomas Hochstein