Yep, one of my tasks for this week is to write up some information about What Will Change for list subscribers and administrators. I’ll post a draft to this list when it’s ready for comment. I’ve already posted a heads up to the Kingdom Officers.
I can’t see any way of subscribing users from the command line but Mailman has a REST API for such things: https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/r....
The base URL is http://localhost:8001 but can be changed if necessary. The credentials are in /etc/mailman3/mailman-web.py (not posted to the list because the archives are public).
Alternatively, sending e-mails to listname-request@lochac.sca.org might work: https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/commands/do...
There’s probably also a way of doing it through the Mailman shell (sudo -u list mailman shell) but that would require connecting the Registry to Python.
Ælfred
From: nico@jeremygregson.com
Sent: Thursday, 10 March 2022 9:08 AM
To: 'Lochac Masonry Deputy'
Subject: RE: [Selenetest] Welcome to Mailman3
Okay - a question/observation. I'm getting the test emails successfully, because a couple of my email addresses are in that list. But when I go to the web interface to try to sign in, I discovered that I don't have a user account with Mailman3. I had to create one, with my already-subscribed address linked to it.
Now, if this only affects people who want to go to the web interface and administer a list, or browse the archives, it is not a huge deal for the majority of the population. Most people subscribed to lochac-announce will never know or care. But it is a concept which will need to be explained to list admins, at least. Ideally, modifying the template on the web home page to explain what's going on would be nice.
Meanwhile - I need to check whether mailman3 supports the same command-line process for adding a subscriber to a list. At the moment, when someone joins the SCA, the membership form includes a tickbox asking if they want to be subscribed to lochac-announce. And if they do, it gets done for them automatically behind the scenes, without them having to go through a separate manual process. I'd like to keep doing that, if I can.
So - small-scale testing on lesser lists progresseth nicely, but I think some change management for the one big list is probably in order.
Cheers,
Nico
-----Original Message-----
From: Lochac Masonry Deputy via Selenetest
Sent: Wednesday, 9 March 2022 7:26 AM
To: nico--- via Selenetest
Subject: [Selenetest] Welcome to Mailman3
Greetings Selene Test Team. Here are some notes about this list to get us started.
General information:
• The web interface is at https://mailman.lochac.sca.org • The Mailman site administrator is mailman3@lochac.sca.org, which is currently an alias for my personal address • The Selenetest list administrators are mailman3@lochac.sca.org and masonry@lochac.sca.org
How It Works:
Mailman3 is made up of two systemd services, mailman3 and mailman3-web, with configuration in /etc/mailman3/mailman.cfg and /etc/mailman3/mailman-web.py, respectively.
I have configured mailman3 so that it starts only the two essential ‘runners’: the one that accepts mail from postfix (‘lmtp’) and the one that implements the REST API (‘rest’). The other runners, which process mail, are run from cron jobs defined in /etc/cron.d/mailman3:
• The ‘in’, ‘pipeline’, and ‘out’ queues are cleared every ten minutes. These check incoming mail, perform any necessary transformations on it, and send it out again, respectively.
• The ‘command’ and ‘virgin’ queues are also cleared every ten minutes. The first processes requests sent to listname-join@lochac, listname-leave@lochac, etc., while the second is where Mailman inserts its own messages (moderation requests, etc.) into the system.
• The ‘retry’ and ‘task’ queues are cleared every hour • The ‘archive’, ‘bounces’ and ‘digest’ queues are cleared every evening • I have disabled the ‘nntp’ runner altogether since no one is using NNTP as far as I know A homebrewed Python script in /var/lib/mailman3/bin/cron-runner.py processes the queues. The script only starts the runner if mail is actually in the queue, and then only makes one pass over the queue. I wrote this script because Mailman’s own ‘runner’ script can only run indefinitely (which uses huge amounts of memory) or process one message at each invocation (which is painful).
One upshot of this for ordinary people is that mail to a list may take up to 10-15 minutes to be sent out again, and archives are only updated once per day. This can of course be changed by changing the cron configuration.
Log files are in /var/log/mailman3. The main log is mailman3.log. The web service has another log /var/log/mailman3/web/mailman3-web.log, which is different to the Apache log. The Apache logs are /var/log/apache/mailman.*.log..
Manual operation:
Mailman3 has a single command-line tool, called ‘mailman’ (no 3), that performs more or less the functions of the scripts in /usr/lib/mailman/bin in Mailman2. For most purposes, it should be run as the ‘list’ user, otherwise it may create files or processes owned by root that other Mailman3 processes can’t work with, e.g.
$ sudo -u list mailman info # displays version information
To process a queue manually, invoke /var/lib/mailman/bin/cron-runner with the queue’s name as the first argument, e.g.
$ sudo -u list /var/lib/mailman/bin/cron-runner in # process all incoming mail
If mail cannot be processed due to an error (e.g. Python throws an exception), Mailman3 puts it in the ‘shunt’ queue. Once the error has been fixed, use the ‘unshunt’ command to get the mail going again:
$ sudo -u list mailman unshunt
Other resources:
• https://www.list.org
• https://mailman.readthedocs.io
Ælfred
Yep, = one of my tasks for this week is to write up some information about
What Wi= ll Change for list subscribers and administrators. I=E2=80=99ll post
a draf= t to this list when it=E2=80=99s ready for comment. I=E2=80=99ve
already po= sted a heads up to the Kingdom Officers.
&nbs;= p;
I can=E2=80=99t see any way of subscribing= users from the command line but
Mailman has a REST API for such things:
https://docs.mailman3.org/projects/mailman/en/latest/sr=
c/mailman/rest/docs/rest.html.
The base URL is [http://localhost:8001](3D"http://localhost:8001"=) but can be
changed if necessary. The credentials= are in /etc/mailman3/mailman-web.py
(not posted to the list because the ar= chives are public).
Alternatively, sending e-mails to listname-request@lochac.sca.= org might
work: [https://docs.mailman3.org/pro=
jects/mailman/en/latest/src/mailman/commands/docs/commands.html](3D"https://docs.mailman3.org/projects/mailman/en/la=)
There=E2=80=99s= probably also a way of doing it through the Mailman shell
(sudo -u list ma= ilman shell) but that would require connecting the Registry
to Python.
<= p class=3DMsoNormal>
=C2=A0=C2=A0=C2=A0=C2=A0=C3= =86lfred
**F= rom:**[nico@jeremygregson.com
**Sent:** Thursday, 10 March 2022 9:08 AM
**To:**['Lochac Masonry Deputy'](3D=)
**Subject: =** RE: [Selenetest] Welcome to Mailman3
Okay - a question/observation.=C2=A0 = I'm getting the test emails
successfully, because a couple of my email addr= esses are in that list.=C2=A0
But when I go to the web interface to try to = sign in, I discovered that I
don't have a user account with Mailman3.=C2=A0= I had to create one, with my
already-subscribed address linked to it.
<= p class=3DMsoNormal>
Now, if this = only affects people who want to go to the web interface and
administer a li= st, or browse the archives, it is not a huge deal for the
majority of the p= opulation.=C2=A0 Most people subscribed to lochac-announce
will never know = or care.=C2=A0 But it is a concept which will need to be
explained to list = admins, at least.=C2=A0 Ideally, modifying the template on
the web home pag= e to explain what's going on would be nice.
&n;= bsp;
Meanwhile - I need to check whether mail= man3 supports the same command-line
process for adding a subscriber to a li= st.=C2=A0 At the moment, when someone
joins the SCA, the membership form in= cludes a tickbox asking if they want to
be subscribed to lochac-announce.= =C2=A0 And if they do, it gets done for
them automatically behind the scene= s, without them having to go through a
separate manual process.=C2=A0 I'd l= ike to keep doing that, if I can.
=
So - small-scale testing on lesser lists progresse= th nicely, but I think
some change management for the one big list is proba= bly in order.
Cheers,
Nico
&nbs;= p;
= \-----Original Message-----
From: Lochac Masonry Dep= uty via Selenetest
Sent: Wednesday, 9 March 2022 7:26 AM
To: nico--= \- via Selenetest
= Subject: [Selenetest] Welcome to Mailman3
&nbs;= p;
Greetings Selene Test Team. Here are some = notes about this list to get us
started.
= ;
General information:
=E2=80=A2 The web interface is at https://mailman.lochac.sca.org =E2=80= =A2
The Mailman site administrator is mailman3@lochac.sca.org, which is cur=
rently an alias for my personal address =E2=80=A2 The Selenetest list admin=
istrators are mailman3@lochac.sca.org and masonry@lochac.sca.org
How It Works:
<= p class=3DMsoNormal>
Mailman3 is m= ade up of two systemd services, mailman3 and mailman3-web, with
configurati= on in /etc/mailman3/mailman.cfg and /etc/mailman3/mailman-web.py,
respectiv= ely.
I ha= ve configured mailman3 so that it starts only the two essential
=E2=80=98ru= nners=E2=80=99: the one that accepts mail from postfix
(=E2=80=98lmtp=E2=80= =99) and the one that implements the REST API
(=E2=80=98rest=E2=80=99). The= other runners, which process mail, are run from
cron jobs defined in /etc/= cron.d/mailman3:
=E2=80=A2 The =E2=80=98in=E2=80=99= , =E2=80=98pipeline=E2=80=99, and
=E2=80=98out=E2=80=99 queues are cleared = every ten minutes. These check
incoming mail, perform any necessary transfo= rmations on it, and send it out
again, respectively.
=E2=80=A2 The =E2=80=98command=E2=80=99 and =E2=80=98virgin=E2=80=99 queu= es
are also cleared every ten minutes. The first processes requests sent to=
listname-join@lochac, listname-leave@lochac, etc., while the second is whe= re
Mailman inserts its own messages (moderation requests, etc.) into the sy=
stem.
=E2=80=A2 The =E2=80=98retry=E2=80=99 and =E2= =80=98task=E2=80=99 queues are
cleared every hour =E2=80=A2 The =E2=80=98ar= chive=E2=80=99,
=E2=80=98bounces=E2=80=99 and =E2=80=98digest=E2=80=99 queu= es are cleared
every evening =E2=80=A2 I have disabled the =E2=80=98nntp=E2= =80=99 runner
altogether since no one is using NNTP as far as I know A home= brewed Python
script in /var/lib/mailman3/bin/cron-runner.py processes the = queues. The
script only starts the runner if mail is actually in the queue,= and then only
makes one pass over the queue. I wrote this script because M= ailman=E2=80=99s
own =E2=80=98runner=E2=80=99 script can only run indefinit= ely (which uses
huge amounts of memory) or process one message at each invo= cation (which is
painful).
One upshot of this for ordinary people is that mail to a = list may take up to
10-15 minutes to be sent out again, and archives are on= ly updated once per
day. This can of course be changed by changing the cron= configuration.
Log files are in /var/log/mailman3. The main log is mailman3.log. Th= e web
service has another log /var/log/mailman3/web/mailman3-web.log, which= is
different to the Apache log. The Apache logs are /var/log/apache/mailma=
n.*.log..
Manual operation:
Mailman3 has a single command-line tool, called =E2=80=98mailman= =E2=80=99
(no 3), that performs more or less the functions of the scripts i= n
/usr/lib/mailman/bin in Mailman2. For most purposes, it should be run as = the
=E2=80=98list=E2=80=99 user, otherwise it may create files or processes= owned
by root that other Mailman3 processes can=E2=80=99t work with, e.g.<= /p>
$ sudo -u= list mailman info=C2=A0=C2=A0 # displays version information
To process a queue m= anually, invoke /var/lib/mailman/bin/cron-runner with
the queue=E2=80=99s n= ame as the first argument, e.g.
$ sudo -u list /var/lib/mailman/bin/cron-runner in= =C2=A0=C2=A0=C2=A0=C2=A0 #
process all incoming mail
If mail cannot be processed due= to an error (e.g. Python throws an
exception), Mailman3 puts it in the =E2= =80=98shunt=E2=80=99 queue. Once the
error has been fixed, use the =E2=80= =98unshunt=E2=80=99 command to get the
mail going again:
$ sudo -u list mailman unsh= unt
Other= resources:
=E2=80=A2 https://www.list.org
=E2=80=A2 https://mailman.readthedocs.io
=C2=A0=C2=A0=C2=A0 =C3=86l= fred
=