[Pkg-mailman-hackers] Mailman3 on python3.13 debian testing package

Thomas Krichel krichel at openlib.org
Thu Feb 13 10:36:22 GMT 2025


  Thomas Krichel writes

> No email reaches the list. I did not notice, but now the listowner
> has written to me.

  Here I try to document how I change from the mailman Debian package
  to the virtualenv. The change appears necessary because Debian
  testing's default python is 3.13 and Mailman is not ready for that.

root at server:/usr/local# rm -rf mailman/
root at server:/usr/local# mkdir mailman
root at server:/usr/local# cd mailman

  Not sure whether my default python3.13 can be used so I explicitly
  call python3.12

root at server:/usr/local/mailman# python3.12 -m venv venv
source /usr/local/mailman/venv/bin/activate

  I used sqlite as the database, so I don't install  psycopg2-binary

(venv) root at server:/usr/local/mailman# pip install wheel mailman

  Now look at systemd

root at server:/lib/systemd# find . -name *mailman*
./system/mailman3-web.service
./system/mailman3.service

  After examining mailman-web I guess it does not need changing.

root at server:/lib/systemd# systemctl stop mailman3

root at server:/lib/systemd# systemctl disable mailman3
Synchronizing state of mailman3.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install disable mailman3
Removed '/etc/systemd/system/multi-user.target.wants/mailman3.service'.

root at server:/lib/systemd/system# cp -a mailman3.service mailman3_debian.service

  Let's reference the the virtual environment's mailman

root at server:/lib/systemd/system# diff mailman3.service mailman3_debian.service 
12,14c12,14
< ExecStart=/usr/local/mailman/venv/bin/mailman -C /etc/mailman3/mailman.cfg start --force
< ExecReload=/usr/local/mailman/venv/bin/mailman -C /etc/mailman3/mailman.cfg restart
< ExecStop=/usr/local/mailman/venv/bin/mailman -C /etc/mailman3/mailman.cfg stop
---
> ExecStart=/usr/bin/mailman -C /etc/mailman3/mailman.cfg start --force
> ExecReload=/usr/bin/mailman -C /etc/mailman3/mailman.cfg restart
> ExecStop=/usr/bin/mailman -C /etc/mailman3/mailman.cfg stop

root at server:/lib/systemd/system# systemctl enable mailman3.service 
Synchronizing state of mailman3.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable mailman3

root at server:/lib/systemd/system# systemctl start mailman3

  Seems to start. A test mail to the list yields 

Feb 13 09:36:37 2025 (872373) Uncaught runner exception: No module named 'mailman_hyperkitty'

  Even though I did not see this at

https://docs.mailman3.org/en/latest/install/virtualenv.html

  It looks like I need to get mailman_hyperkitty.

root at server~# systemctl stop mailman3

root at server~# source /usr/local/mailman/venv/bin/activate

(venv) root at server~# pip install mailman_hyperkitty

root at server~# systemctl start mailman3

  Now my test email seems to be starting to be delivered to the list.

  I am particularly grateful to Stephen J. Turnbull's contribution, especially
  when he wrote

> (I think Debian puts mailman3 configs there and that's what we recommend)

  So in fact there is no need to fiddle with configs apart from the systemd
  file. 

-- 
  Written by Thomas Krichel http://openlib.org/home/krichel on his 21804th day.



More information about the Pkg-mailman-hackers mailing list