On 1/11/22 12:39 PM, gordon@dickens.com wrote:
- Install mailman3 using the venv and web instructions as suggested in this thread. I plan to use mysql (mariadb) since my database was originally implemented with mysql.
I too use MariaDB. Here are the MariaDB-specific variations from the venv and web docs:
- Before going through the venv docs I installed these packages:
libmariadb3 libmariadb-dev default-libmysqlclient-dev
- When installing mailman in venv, I did this:
(venv)$ pip install --upgrade pip (venv)$ pip install wheel mailman pymysql mysqlclient
- In /etc/mailman.cfg, the database config looks like this:
..
[database] class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://myuser:mypassword@mymysqlhost/mailman?charset=utf8mb4&use_unicode=1
..
The url is all one line (it's wrapping in my mail client).
- The [Unit] section of /etc/systemd/system/mailman3.service looks like this:
[Unit] Description=GNU Mailing List Manager After=syslog.target network.target mariadb.service
..
Note that this is on a Debian 11 system. On Debian 10 and previous, it'd be mysql.service instead of mariadb.service.
- The settings.py file includes this section:
..
# MySQL database setup. DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailmanweb', 'USER': 'mailman', 'PASSWORD': '<password>', 'HOST': 'localhost', 'PORT': '', 'OPTIONS': {'charset': 'utf8mb4'} # Enable utf8 4-byte encodings. } }
..
Note that your NAME, USER, PASSWORD, and possibly HOST may differ.
- The [Unit] section of /etc/systemd/system/mailmanweb.service looks like this:
[Unit] Description=GNU Mailman Web UI After=syslog.target network.target mariadb.service mailman3.service
..
Same caveat as with step 4 that this is for Debian 11, and you'd use mysql.service instead on Debian 10 and previous.
I think that's all the changes, but if I've omitted something I hope Mark Sapiro or someone else can step in.
dn