After walking down the garden path of reading the documentation, and being led astray - in particular, by the materials I found here - out of pure frustration I eventually found my way to the "official Wiki", which is here, and it pointed me to the "missing" Command Line Interface (CLI) utilities. They're found, on my installation, at /lib/mailman/bin. However, they don't work!
For example, running as user mailman:
$ add_members -h
Traceback (most recent call last):
File "/lib/mailman/bin/add_members", line 89, in <module>
from Mailman import i18n
ImportError: No module named Mailman
I'm sure someone will ask, so:
Fedora Server 32 running mailman3-3.2.2-1.fc32.noarch ...And some 153 or so Python3 packages... A python3 --version command says it's 3.8.5.
BTW, I used DNF to install Mailman3. I have no idea if I was supposed to install more than just that, but normally DNF will complain if there are unresolved dependencies and it didn't complain.
...I really need to get these working and am NOT a Python programmer, by any means. Nor do I really want to take the time to learn it now... Why mention that? Keep reading:
As a "bread-crumb" (as in the Hansel and Gretel folk tale) for those who might follow along later, from the documentation at the previously cited site, APPARENTLY, again, according to THAT source, you have to get into a Python
shell, write your own Python
functions and, in short, become a Python AND Mailman library expert just to use what they call a CLI interface. Crazy!
If going that route, you su to mailman (to get the right user context) then:
$ PYTHONSTARTUP= mailman3 shell
And you get a python prompt >>> and from there you have to do things like:
>>> from mailman.testing.documentation import cli
>>> command = cli('mailman.commands.cli_withlist.shell')
>>> command('mailman shell --details')
And, there's a LOT possible from here, All of which requires a lot of typing AND knowing Python
far better than I presently do. There's documentation for this over here. ...All I really want to do is import a file containing people's names and email addresses saved from the previous version and add them to a list, but it's a LOT of typing to do that in this environment.
Happily, that all DOES work, best I could tell from my not-fully-informed attempts at trying it.
It should be "very easy" to write scripts that would emulate the older mailman 2.x
utilities, so perhaps you can see how I was frustrated before I found the utilities STILL DO exist, they just don't work! ...I'm 100% sure I could learn Python and the mailman3 library and write my own, but I have no time for that. ...SO, I need to get these other utilities working.
I solved it through persistence. Following what I document here, I now have the command-line tools working properly and Mailman is functioning well enough, though I haven't got the web interface going yet. ...The first new list is both created and sending mails properly.
I decided that MAYBE I hadn't installed ENOUGH software, but didn't know what I might have missed, so I ran dnf again, as follows:
One effect of this was to disable
mailman3
, so I re-enabled it and restarted it withsystemctl
. It also wiped out the previous list (I was able to create but not populate a list as things were before), so I had to make a list calledmailman
first - as I recall it wouldn't successfully start without that. But with the newmailman
email list created, THENmailman3
would start and I then created my new mailing list.I hadn't expected it to re-install
Mailman3
, and I'm guessing it did because it reset the service to disabled. ...So it's POSSIBLE the master list was wiped out because I hadn't stoped the still runningmailman3.server
service.UNLIKE the previous 2.x of
Mailman
, I had to manually add the new list aliases to/etc/aliases
and then runpostalias
and restartpostfix
to have them take effect - a rather annoying step backwards?! But, hey, it worked.