I'm creating a newsletter style mailing list where only one address is allowed to send e-mails, members just receive them, but they shouldn't be able to post to the list. Still I want to send a friendly notification if members accidentally try to post to the list, so I set "Reject (with notification)" as "Default action to take when a member posts to the list", but it doesn't work: my test address didn't receive any notification when I tried to send a message to the list. I tried to define the "list:user:notice:rejected" template for the list, but to no avail.
On 3/24/26 11:30 AM, MegaBrutal via Mailman-users wrote:
I'm creating a newsletter style mailing list where only one address is allowed to send e-mails, members just receive them, but they shouldn't be able to post to the list. Still I want to send a friendly notification if members accidentally try to post to the list, so I set "Reject (with notification)" as "Default action to take when a member posts to the list", but it doesn't work: my test address didn't receive any notification when I tried to send a message to the list.
What is the moderation action for the address you posted from?
I tried to define the "list:user:notice:rejected" template for the list, but to no avail. What do you mean by no avail? Do you mean the template you defined wasn't honored. If so, how did you define it?
Or do you just mean that didn't get you the rejection email?
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro <mark@msapiro.net> ezt írta (időpont: 2026. márc. 24., K, 8:26):
I'm creating a newsletter style mailing list where only one address is allowed to send e-mails, members just receive them, but they shouldn't be able to post to the list. Still I want to send a friendly notification if members accidentally try to post to the list, so I set "Reject (with notification)" as "Default action to take when a member posts to the
On 3/24/26 11:30 AM, MegaBrutal via Mailman-users wrote: list",
but it doesn't work: my test address didn't receive any notification when I tried to send a message to the list.
What is the moderation action for the address you posted from?
I posted if from a member address, and members are set to "Reject (with notification)". The message didn't get to the list (as expected), but no notification was sent either – basically the action was like if I set "Discard (no notification)".
I tried to define the
"list:user:notice:rejected" template for the list, but to no avail. What do you mean by no avail? Do you mean the template you defined wasn't honored. If so, how did you define it?
Or do you just mean that didn't get you the rejection email?
I mean I didn't get a rejection mail. First I assumed that it's because I didn't set a rejection message, but setting one did nothing.
Note that I'm managing my list on the Postorius web interface (/mailman3) and don't really know of any other way of doing it.
Also I created my list as "Announce only", but this didn't seem to have any effect either. I thought it would create a mailing list that's preset to behave like a newsletter, but it just created an ordinary list where all members can post, and I manually needed to set that I don't accept e-mails from members. I'm puzzled why it even asks for a "List style" in the first place.
MegaBrutal via Mailman-users writes
Also I created my list as "Announce only",
I ran mailman for donkeys' years for such a lists. Mailman is not a good tool for such lists. It requires its subscribers to verify their address. This is good policy for a discussion list, as you want to handling of subscribers. But this is added work for subscribers that you don't need them to do. The problem comes at signoff time. Folks forget they registered. They need to find their credentials. If they don't have them, they get annoyed and may mark your email as spam. That's one reason I wrote my own tool for such lists. It's called nitpo, which stands for New Item POster. I was funded 5000 euro by the EU to produce it. I worked on it for about one year. It powers the email subscriptions system in my expertise sharing services NEP https://nep.repec.org and bims Biomed News. Here the same items are packaged into potentially overlapping reports. Nipto features individual emails to present the item only once to a subscriber. This was the main reason why I wrote the tool.
-- Written by Thomas Krichel http://openlib.org/home/krichel on his 22208th day.
Thomas Krichel writes:
MegaBrutal via Mailman-users writes
Also I created my list as "Announce only",
I ran mailman for donkeys' years for such a lists. Mailman is not a good tool for such lists. It requires its subscribers to verify their address. This is good policy for a discussion list, as you want to handling of subscribers.
This is a good policy for *any* mailing list. There's a harassment technique where you sign up the target's email address for many lists, which is annoying at best, and can result in denial of service by overflowing the mailbox. Of course the verification email itself can be abused in the same way with a sufficiently large number of lists, but to the extent that there is not proliferation of list managers, email providers can recognize such attacks and mitigate them.
But this is added work for subscribers that you don't need them to do.
You don't need them to do that work. It's the victims of DOS attacks that need this work to be done.
The problem comes at signoff time. Folks forget they registered. They need to find their credentials. If they don't have them, they get annoyed and may mark your email as spam.
Until RFC 8058, there wasn't a plausible technique to avoid this. (Also, I've seen a lot less bogus spam marking since the big freemail providers stopped making the "this is spam" button easier to find than the "delete" button about 15 years ago.)
That's one reason I wrote my own tool for such lists.
It is undeniable that Mailman is not suitable for a large fraction of announce lists. It's also true that (except for the relatively recent RFC 8058 "Signaling One-Click Unsubscribe" protocol) all of your complaints could have been resolved in Mailman by 2020 (when Mailman 3 became mature and clearly dominant over Mailman 2 feature-wise) -- had someone who cared either done the work or funded its contribution.
repec.org and bims Biomed News. Here the same items are packaged into potentially overlapping reports. Nipto features individual emails to present the item only once to a subscriber.
A good approximation to this using umbrella and sibling lists has been available in Mailman for something like 20 years. It probably also could be done with topics in Mailman 2 (but the topic feature was not implemented in Mailman 3 because there was no perceived demand). It's not easy to configure, but a better configuration tool could have been added to Mailman 2, and I think Mailman 3 could probably implement it as a style.
I wouldn't be surprised if you could come up with a thread or two where such features were requested, and were WONTFIXed by the Mailman developers. They're not part of our core scope, and mostly were requested by people who were clearly interested in direct mail marketing which we don't want to be associated with, and you probably don't either. But if they were contributed or funded, they would very likely have been accepted. Especially if they could be implemented as a style configuring existing mail flow controls in Mailman, they'd almost certainly have been accepted. (And would be today.)
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
On Wed, Mar 25, 2026, at 12:10 AM, Stephen J. Turnbull wrote:
It is undeniable that Mailman is not suitable for a large fraction of announce lists. It's also true that (except for the relatively recent RFC 8058 "Signaling One-Click Unsubscribe" protocol) all of your
Speaking of which, I was wondering why my MUA didn’t put a one-click unsubscribe banner at the top of my mailman lists like it does for lots of other “mailing list” email I get. So I just read RFC 8058, and I realized that while Mailman puts on a List-Unsubscribe: header, it doesn’t have a URI in it, just an email address. It also doesn’t put on a List-Unsubscribe-Post: List-Unsubscribe=One-Click. The requirement for an “opaque identifier” looks hard to do in templates. I realize that it probably hasn’t been implemented due to your separation of Core and Web. But are there plans to provide something?
-- Paul Tomblin
Paul Tomblin via Mailman-users writes:
But are there plans to provide something?
It's on my practically infinite TODO list, but not soon.
I considered putting it in GSoC as a task, but I can't see coding it taking much more than a day or so, so that was out. On the other hand the potential for abuse of a faulty implementation is high, so I'm not going to do it without allocating time to look at it from all sides in 5 dimensions before pushing to trunk.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
On 3/25/26 4:00 AM, MegaBrutal via Mailman-users wrote:
Mark Sapiro <mark@msapiro.net> ezt írta (időpont: 2026. márc. 24., K, 8:26):
What is the moderation action for the address you posted from?
I posted if from a member address, and members are set to "Reject (with notification)". The message didn't get to the list (as expected), but no notification was sent either – basically the action was like if I set "Discard (no notification)".
As the list owner go to Users->Members in Postorius and click the address you posted from. Scroll to the bottom of the page. What is the setting for Moderation?
Also I created my list as "Announce only", but this didn't seem to have any effect either. I thought it would create a mailing list that's preset to behave like a newsletter, but it just created an ordinary list where all members can post, and I manually needed to set that I don't accept e-mails from members. I'm puzzled why it even asks for a "List style" in the first place.
The difference between an ordinary discussion style and an announce only style is the list attribute allow_list_posts is set False rather than True. This only controls whether or not the List-Post: header in outgoing mail contains the list's posting address or the word NO.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro <mark@msapiro.net> ezt írta (időpont: 2026. márc. 25., Sze, 1:16):
On 3/25/26 4:00 AM, MegaBrutal via Mailman-users wrote:
Mark Sapiro <mark@msapiro.net> ezt írta (időpont: 2026. márc. 24., K, 8:26):
What is the moderation action for the address you posted from?
I posted if from a member address, and members are set to "Reject (with notification)". The message didn't get to the list (as expected), but no notification was sent either – basically the action was like if I set "Discard (no notification)".
As the list owner go to Users->Members in Postorius and click the address you posted from. Scroll to the bottom of the page. What is the setting for Moderation?
List Default.
Do you see why it would not work?
MegaBrutal via Mailman-users writes:
Do you see why it would not work?
How do you know it's not working? From what you say so far, you know the post was delivered to Mailman, and you know the rejection notification was not delivered to the poster. It's possible that Mailman did send the notification, but it got hung up at one of the MTAs in between.
If Mailman is working as it should, there should be entries in Mailman's mailman.log showing the moderation action and in smtp.log showing the outgoing mail. There should also be entries in the outgoing MTA's log, and possibly further MTAs downstream.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Stephen J. Turnbull <steve@turnbull.jp> ezt írta (időpont: 2026. márc. 25., Sze, 5:25):
If Mailman is working as it should, there should be entries in Mailman's mailman.log showing the moderation action and in smtp.log showing the outgoing mail.
To be honest, I didn't quote logs because I didn't find anything upon first check. But now I looked again and found interesting entries.
I get different errors depending on whether I define the list:user:notice:rejected template.
When the template is not defined:
Mar 26 01:48:02 2026 (28606) Uncaught runner exception: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128) Mar 26 01:48:02 2026 (28606) Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/runners/incoming.py", line 80, in _dispose process(mlist, msg, msgdata, start_chain) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/chains.py", line 79, in process link.function(mlist, msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/chains/reject.py", line 65, in _process bounce_message(mlist, msg, error) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/app/bounces.py", line 87, in bounce_message txt = MIMEText(notice, _charset=mlist.preferred_language.charset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/email/mime/text.py", line 42, in __init__ self.set_payload(_text, _charset) File "/usr/lib/python3.11/email/message.py", line 342, in set_payload payload = payload.encode(charset.output_charset) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128) Mar 26 01:48:02 2026 (28606) SHUNTING: 1774486082.6627975+afc236d96580c03921fa8a6f172f4a81eb2d20f6
And this is what happens when I define the template:
Mar 26 01:35:55 2026 (28606) Uncaught runner exception: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused')) Mar 26 01:35:56 2026 (28606) Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 198, in _new_conn sock = connection.create_connection( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/util/connection.py", line 85, in create_connection raise err File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/util/connection.py", line 73, in create_connection sock.connect(sa) ConnectionRefusedError: [Errno 111] Connection refused
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 787, in urlopen response = self._make_request( ^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 493, in _make_request conn.request( File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 445, in request self.endheaders() File "/usr/lib/python3.11/http/client.py", line 1277, in endheaders self._send_output(message_body, encode_chunked=encode_chunked) File "/usr/lib/python3.11/http/client.py", line 1037, in _send_output self.send(msg) File "/usr/lib/python3.11/http/client.py", line 975, in send self.connect() File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 276, in connect self.sock = self._new_conn() ^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connection.py", line 213, in _new_conn raise NewConnectionError( urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPConnection object at 0xf46e5910>: 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 "/opt/mailman/venv/lib/python3.11/site-packages/requests/adapters.py", line 667, in send resp = conn.urlopen( ^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/connectionpool.py", line 841, in urlopen retries = retries.increment( ^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/urllib3/util/retry.py", line 519, in increment raise MaxRetryError(_pool, url, reason) from reason # type: ignore[arg-type] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 179, in _one_iteration self._process_one_file(msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/runner.py", line 272, in _process_one_file keepqueued = self._dispose(mlist, msg, msgdata) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/runners/incoming.py", line 80, in _dispose process(mlist, msg, msgdata, start_chain) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/core/chains.py", line 79, in process link.function(mlist, msg, msgdata) File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/chains/reject.py", line 61, in _process template = getUtility(ITemplateLoader).get( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/model/template.py", line 192, in get contents = getUtility(ITemplateManager).get( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/database/transaction.py", line 106, in wrapper return function(args[0], config.db.store, *args[1:], **kws) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/model/template.py", line 114, in get contents = protocols.get(actual_uri, **auth) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/mailman/utilities/protocols.py", line 39, in get response = requests.get(url, timeout=REQUEST_TIMEOUT, **kws) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/api.py", line 73, in get return request("get", url, params=params, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/api.py", line 59, in request return session.request(method=method, url=url, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/sessions.py", line 589, in request resp = self.send(prep, **send_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/sessions.py", line 703, in send r = adapter.send(request, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/mailman/venv/lib/python3.11/site-packages/requests/adapters.py", line 700, in send raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused')) Mar 26 01:35:56 2026 (28606) SHUNTING: 1774485356.0147583+a9648ecc2a0fd3ad96da4826dcad177399e83c42
I have so many questions...
- What is it about the ASCII encoding? "ordinal not in range(128)"? What do we even do with ASCII in 2026? I tried to send a message that only contains ASCII characters, but the result was the same, so it's probably not in the e-mail contents.
- I configured uwsgi to listen on 127.8.0.1:8000, practically because I didn't want to litter the main 127.0.0.1 address with a plethora of ports. Why does it ever want to use localhost:8000 for anything? Grepping through the config files, I'm consistent about 127.8.0.1:8000, where does it get localhost (that is 127.0.0.1) from? All other functionality of Mailman seems to work with my configuration, that's why I wasn't suspicious that any address/port might be misconfigured.
Here's where port 8000 is mentioned:
# grep ":8000" /etc/mailman3/* /etc/mailman3/mailman-hyperkitty.cfg:base_url: http://127.8.0.1:8000/archives/ /etc/mailman3/uwsgi.ini:http-socket = 127.8.0.1:8000
Any ideas how to fix it?
MegaBrutal via Mailman-users writes:
I get different errors depending on whether I define the list:user:notice:rejected template.
When the template is not defined:
Mar 26 01:48:02 2026 (28606) Uncaught runner exception: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128)
The 21st byte of the stock version of the template is interpolated from $listname. It appears to either be (Latin1) LOWERCASE LETTER I WITH ACUTE or the leading byte of a 3-byte UTF-8 character (that appears to be a private use block).
The 'ascii' codec for English is a legacy misfeature. We should be able to use UTF-8 but this can have bad effects on some systems. You can try to use UTF-8 instead by adding
[language.en] charset: utf-8
And this is what happens when I define the template:
How did you define the template? In the file system, or via Postorius? I'm guessing Postorius because of the "port=8000" and the "/mailman3/api/..." path, but please confirm.
Mar 26 01:35:55 2026 (28606) Uncaught runner exception: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused'))
I don't understand this error. The ultimate reason that Mailman core is looking for a template via HTTP at Postorius is that core and the management UI may not be able to access a common file system. So Postorius puts it somewhere, and provides a callback to core to access it. On the Postorius side that is set in settings.py, like this:
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
Each template that is set via Postorius gets an URI starting with that scheme and authority. I think that Postorius then uses the core REST API to send that URI to Mailman core which stores it in the database.
However, I don't understand why connection would be refused, unless Postorius (uswgi) is not running.
I have so many questions...
- What is it about the ASCII encoding? "ordinal not in range(128)"? What do we even do with ASCII in 2026? I tried to send a message that only contains ASCII characters, but the result was the same, so it's probably not in the e-mail contents.
See above. I didn't check thoroughly but I think that for modern Mailman, every language except US English uses UTF-8.
- I configured uwsgi to listen on 127.8.0.1:8000, practically because I didn't want to litter the main 127.0.0.1 address with a plethora of ports.
I don't understand what you mean by "litter the address with a plethora of ports". You need to use two separate ports, one for mailman-web's Django (aka uwsgi in your case, usually 8000) and one for Mailman core's REST API (usually 8001). That's all. Not sure why that is a problem.
Why does it ever want to use localhost:8000 for anything?
See above about the arm's length relation between core and Postorius in template handling. Undoubtedly somebody was incautious about properly handling configuration, and that's the default buried in the fallback configuration.
File a bug (I need to run and pick up my wife at work). Cite this email in it (get the URL from the Archived-At header).
Grepping through the config files, I'm consistent about 127.8.0.1:8000, where does it get localhost (that is 127.0.0.1) from?
You've outsmarted yourself. Try modifying or adding
POSTORIUS_TEMPLATE_BASE_URL = 'http://127.8.0.1:8000'
in /etc/mailman3/settings.py (or wherever your primary settings file is). No promises about getting your templates, but that should at least fix your "can't connect" problem. You may have to edit and save the template to get the core side updated, though.
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
Stephen J. Turnbull <steve@turnbull.jp> ezt írta (időpont: 2026. márc. 26., Cs, 8:37):
MegaBrutal via Mailman-users writes:
I get different errors depending on whether I define the list:user:notice:rejected template.
When the template is not defined:
Mar 26 01:48:02 2026 (28606) Uncaught runner exception: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128)
The 21st byte of the stock version of the template is interpolated from $listname. It appears to either be (Latin1) LOWERCASE LETTER I WITH ACUTE or the leading byte of a 3-byte UTF-8 character (that appears to be a private use block).
Hmm, probably I set "Hírlevél" for the list's title or something (it means "newsletter").
The 'ascii' codec for English is a legacy misfeature. We should be
able to use UTF-8 but this can have bad effects on some systems. You can try to use UTF-8 instead by adding
[language.en] charset: utf-8
Where do I set this? Just append to settings.py?
And this is what happens when I define the template:
How did you define the template? In the file system, or via Postorius? I'm guessing Postorius because of the "port=8000" and the "/mailman3/api/..." path, but please confirm.
In Postorius.
Mar 26 01:35:55 2026 (28606) Uncaught runner exception:
HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused'))
I don't understand this error. The ultimate reason that Mailman core is looking for a template via HTTP at Postorius is that core and the management UI may not be able to access a common file system. So Postorius puts it somewhere, and provides a callback to core to access it. On the Postorius side that is set in settings.py, like this:
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
I don't have this variable defined, so it's probably using the default. I shall add it with 128.8.0.1:8000 then... But it didn't help! Restarted the mailman service, but it still wants to fetch the template from localhost. May it be hardcoded?
See above. I didn't check thoroughly but I think that for modern
Mailman, every language except US English uses UTF-8.
To be fair, in the past I was trying to set my mailing lists to my native language, but then I found that many templates have no translation. In cases like this, most software just falls back to English, which would be fine for my use case. However, Mailman doesn't: I just noticed that empty automatic notifications are being sent out.
- I configured uwsgi to listen on 127.8.0.1:8000, practically
because I didn't want to litter the main 127.0.0.1 address with a plethora of ports.I don't understand what you mean by "litter the address with a plethora of ports". You need to use two separate ports, one for mailman-web's Django (aka uwsgi in your case, usually 8000) and one for Mailman core's REST API (usually 8001). That's all. Not sure why that is a problem.
Yeah, it might not be a big deal, but 8000+ ports are often used for various local HTTP services, I may have another one running on 127.0.0.1:8000. Then true there are many ports being available, so I could just pick a different one, but using a dedicated localhost IP like 127.8.0.1 looked just nicer. I can immediately identify the listen ports belonging to Mailman; and I get to use the default port numbers appearing in the documentation. Alternate port numbers might have caused confusion later. So I just felt I got the best of both worlds with this method, and didn't expect these problems to come along.
Why does it ever want to use localhost:8000 for anything?
See above about the arm's length relation between core and Postorius in template handling. Undoubtedly somebody was incautious about properly handling configuration, and that's the default buried in the fallback configuration.
File a bug (I need to run and pick up my wife at work). Cite this email in it (get the URL from the Archived-At header).
Is this the official bug tracker on Launchpad? https://bugs.launchpad.net/mailman
Would be quite convenient, as I used to file bugs for Ubuntu, so I already have an account there. Surprised that you use Ubuntu's tracker though. I know it's free to use, but I thought you tend towards BugZilla or something.
Hope you succeeded to pick up your wife. My replies are also sporadic because at standard work hours I have a regular job that I must prioritize.
Grepping through the config files, I'm consistent about
127.8.0.1:8000, where does it get localhost (that is 127.0.0.1) from?
You've outsmarted yourself. Try modifying or adding
POSTORIUS_TEMPLATE_BASE_URL = 'http://127.8.0.1:8000'
in /etc/mailman3/settings.py (or wherever your primary settings file is). No promises about getting your templates, but that should at least fix your "can't connect" problem. You may have to edit and save the template to get the core side updated, though.
Yeah, certainly outsmarted. :D Unfortunately it didn't work, as I told above.
MegaBrutal via Mailman-users writes:
Stephen J. Turnbull <steve@turnbull.jp> ezt írta (időpont: 2026. márc. 26., Cs, 8:37):
Hmm, probably I set "Hírlevél" for the list's title or something (it means "newsletter").
Dman, you caught me, off-by-one error there. :-) (That's just a joke, I thought "position 21" refers to the *first* character in the substituted string.)
You can try to use UTF-8 instead by adding
[language.en] charset: utf-8
Where do I set this? Just append to settings.py?
No, that's in mailman.cfg. I need to get with Mark and Abhilash and find out what the "practical problems" are with universal UTF-8. (I think there are probably still Linux systems out there that support only ASCII in server configurations.)
I don't have this variable defined, so it's probably using the default. I shall add it with 128.8.0.1:8000 then... But it didn't help! Restarted the mailman service, but it still wants to fetch the template from localhost. May it be hardcoded?
Mailman depends on at least *four* services if the full suite is active:
mailman: configured in mailman.cfg, handles mail and list database mailmanweb: configured in settings.py, handles web UI and auth stuff qcluster: configured somewhere (sorry! defaults are always good enough as far as I know), handles HyperKitty periodic jobs like re-indexing the archives cron: configured in /etc/cron.d/mailman*, handles other periodic jobs (obviously cron is a generic service)
It's probably a good idea to restart mailman and mailmanweb (might be spelled differently such as mailman-web) at the same time. Changes to mailman.cfg *require* a restart of mailman, changes to settings.py *require* a restart of mailmanweb.
To be fair, in the past I was trying to set my mailing lists to my native language, but then I found that many templates have no translation. In cases like this, most software just falls back to English, which would be fine for my use case. However, Mailman doesn't: I just noticed that empty automatic notifications are being sent out.
Mark explains this, it's basically a problem with how we ingest the output of the translation processing software our volunteers use. We should find a way to fix that.
Yeah, it might not be a big deal, but 8000+ ports are often used for various local HTTP services, I may have another one running on 127.0.0.1:8000. Then true there are many ports being available, so I could just pick a different one, but using a dedicated localhost IP like 127.8.0.1 looked just nicer. I can immediately identify the listen ports belonging to Mailman;
Whatever works for you is good. I stick with default hosts and configure ports and lsof(1) is my friend
root@somehost:~# lsof -i tcp@localhost:8000-8999 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME opendkim 544 opendkim 3u IPv4 17238 0t0 TCP localhost:8891 (LISTEN)
Is this the official bug tracker on Launchpad? https://bugs.launchpad.net/mailman
No, I'm not sure why we left Launchpad (probably because it didn't do git and for quite a while arch/baz/bzr/brz was quite a mess -- and still is in Mac/Homebrew, btw), but the Mailman 3 repos are on GitLab: https://gitlab.com/mailman/ and we use the issue tracker there, such as https://gitlab.com/mailman/mailman/-/issues/.
Steve
-- GNU Mailman consultant (installation, migration, customization) Sirius Open Source https://www.siriusopensource.com/ Software systems consulting in Europe, North America, and Japan
On 3/26/26 10:30 AM, MegaBrutal via Mailman-users wrote:
To be honest, I didn't quote logs because I didn't find anything upon first check. But now I looked again and found interesting entries.
I get different errors depending on whether I define the list:user:notice:rejected template.
When the template is not defined:
Mar 26 01:48:02 2026 (28606) Uncaught runner exception: 'ascii' codec can't encode character '\xed' in position 21: ordinal not in range(128)
I suspect you have a list:user:notice:rejected.txt template other than the default defined in the file system somewhere, probably in the /opt/mailman/mm/var/templates/ hierarchy. I say this because the default template at /opt/mailman/venv/lib/python3.11/site-packages/mailman/templates/en/list:user:notice:rejected.txt doesn't contain a hex ED (lower case i with acute accent) character.
The issue is the list's preferred language is English and the preferred character set for English is ascii and the resultant message built from the template contains that non-ascii character.
And this is what happens when I define the template: ... requests.exceptions.ConnectionError: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /mailman3/api/templates/list/ hirlevel.lista.autistaktol.hu/list:user:notice:rejected (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0xf46e5910>: Failed to establish a new connection: [Errno 111] Connection refused'))
Here you have defined the template in Postorius and Mailman core is attempting to get the template from the Postorius API and the connection is refused.
What is your setting for POSTORIUS_TEMPLATE_BASE_URL and if you prepend that to /mailman3/api/templates/list/hirlevel.lista.autistaktol.hu/list:user:notice:rejected, can you get the resultant URL?
In both cases, the messages are shunted and you can see them, particularly the first one with
mailman qfile /opt/mailman/mm/var/queue/shunt/1774486082.6627975+afc236d96580c03921fa8a6f172f4a81eb2d20f6.pck
I have so many questions...
1. What is it about the ASCII encoding? "ordinal not in range(128)"? What do we even do with ASCII in 2026? I tried to send a message that only contains ASCII characters, but the result was the same, so it's probably not in the e-mail contents.
It's in the template. There are reasons, mostly historical but also practical why the default character set for English is ascii. Also see <https://gitlab.com/mailman/mailman/-/work_items/1268>.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark, thank you too for the answer! Most of the questions are answered on my mail to Stephen, but find the rest below.
Mark Sapiro <mark@msapiro.net> ezt írta (időpont: 2026. márc. 26., Cs, 9:08):
I suspect you have a list:user:notice:rejected.txt template other than the default defined in the file system somewhere, probably in the /opt/mailman/mm/var/templates/ hierarchy. I say this because the default template at /opt/mailman/venv/lib/python3.11/site-packages/mailman/templates/en/list:user:notice:rejected.txt
doesn't contain a hex ED (lower case i with acute accent) character.
Only found this, nothing on the other path:
# cat /opt/mailman/venv/lib/python3.11/site-packages/mailman/templates/en/list:user:notice:rejected.txt Your message to the $listname mailing-list was rejected for the following reasons:
$reasons
The original message as received by Mailman is attached.
The issue is the list's preferred language is English and the preferred
character set for English is ascii and the resultant message built from the template contains that non-ascii character.
OK, well, would be convenient to use my native language, but many templates have no translation. This is an empty file:
# ls -l /opt/mailman/venv/lib/python3.11/site-packages/mailman/templates/hu/list:user:notice:rejected.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 /opt/mailman/venv/lib/python3.11/site-packages/mailman/templates/hu/list:user:notice:rejected.txt
As a matter of fact, most of my templates are empty!
# ls -l /opt/mailman/venv/lib/python3.11/site-packages/mailman/templates/hu total 16 -rw-r--r-- 1 mailman mailman 0 May 3 2025 domain:admin:notice:new-list.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 help.txt -rw-r--r-- 1 mailman mailman 337 May 3 2025 list:admin:action:post.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:action:subscribe.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:action:unsubscribe.txt -rw-r--r-- 1 mailman mailman 212 May 3 2025 list:admin:notice:disable.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:notice:increment.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:notice:pending.txt -rw-r--r-- 1 mailman mailman 96 May 3 2025 list:admin:notice:removal.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:notice:subscribe.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:notice:unrecognized.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:admin:notice:unsubscribe.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:member:digest:header.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:member:digest:masthead.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:member:generic:footer.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:member:regular:header.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:action:invite.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:action:subscribe.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:action:unsubscribe.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:goodbye.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:hold.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:no-more-today.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:post.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:probe.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:refuse.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:rejected.txt -rw-r--r-- 1 mailman mailman 0 May 3 2025 list:user:notice:warning.txt -rw-r--r-- 1 mailman mailman 735 May 3 2025 list:user:notice:welcome.txt
I don't see why it's packaged like this – I know that translations don't come easy. I picked up the maintenance of the SMF forum engine's translations, and it's brutal how many hours it took to get it to a decent state. However, Mailman could use English as a fallback for missing translations; getting the notifications in English is still better than getting empty messages which is confusing.
mailman qfile
/opt/mailman/mm/var/queue/shunt/1774486082.6627975+afc236d96580c03921fa8a6f172f4a81eb2d20f6.pck
Thank you! This is really useful, because at least I can be sure that the moderation action itself worked and it is indeed attempting to send the notification.
'member_moderation_action': 'reject',
'moderation_reasons': ['The message is not from a list member'],
I have so many questions...
1. What is it about the ASCII encoding? "ordinal not in range(128)"? What do we even do with ASCII in 2026? I tried to send a messagethat only contains ASCII characters, but the result was the same, so it's probably not in the e-mail contents.
It's in the template. There are reasons, mostly historical but also practical why the default character set for English is ascii. Also see <https://gitlab.com/mailman/mailman/-/work_items/1268>.
WOW, looks like the same problem, and it's also fairly recent. It must have been something overlooked for years and now suddenly two people noticed around the same time.
On March 27, 2026 4:15:00 AM GMT+09:00, MegaBrutal wrote:
OK, well, would be convenient to use my native language, but many templates have no translation. This is an empty file: ... As a matter of fact, most of my templates are empty! ... I don't see why it's packaged like this – I know that translations don't come easy. I picked up the maintenance of the SMF forum engine's translations, and it's brutal how many hours it took to get it to a decent state. However, Mailman could use English as a fallback for missing translations; getting the notifications in English is still better than getting empty messages which is confusing.
Translations are done on weblate <https://hosted.weblate.org/projects/gnu-mailman/mailman/>. We would welcome your contribution.
A non-existent template will fall back to English, but an empty template will not.
That said, the issue is related to how the templates are handled by weblate. Instead of having a msgid of the English template content with a msgstr of the translation, the msgid is just the template name, and the POT contains that msgid and an empty msgstr which results in an empty template rather than a missing template.
-- Mark Sapiro <mark@msapiro.net> Sent from my Not_an_iThing with standards compliant, open source software.
participants (5)
-
Mark Sapiro -
MegaBrutal -
Paul Tomblin -
Stephen J. Turnbull -
Thomas Krichel