Dear Mr. Turnbull, dear blackout69,
thank you very much for your answers. Below this text you will find a brief documentation how I finally managed to install mailman3 and mailman3web packages under Debian 11 with a remote PostGreSQL server v10.22.
Maybe there is a more elegant way to install both packages correctly, but AFAIK any solution will be only a workaround for the main problem, that the DBA's password is usually unknown during the whole installation process if you use a remote database server that is run by another staff team.
Best regards, Markus
------------ 8< ------------
Mailman3 installation
Installation mailman3
Installation mailman3web
Integration in boot sequence
Installation mailman3
Once the remote database server has been set up with databases mailman3 and mailman3web and with a database user mailman3 that has access to both databases,
create database mailman3;
create database mailman3web;
create user mailman3 with encrypted password 'streng_geheim';
grant all privileges on database mailman3 to mailman3;
grant all privileges on database mailman3web to mailman3;
the package mailman3 can be installed:
# apt install mailman3
To avoid the DBA password prompt that ususally cannot be answered if the database server is run by another team, the installation tool dbconfig-common should be omitted:
* Configure database for mailman3 with dbconfig-common? No
The mailman3 package will be installed without errors. The configuration of the database connection can be done in file /etc/mailman3/mailman.cfg:
...
class: mailman.database.postgresql.PostgreSQLDatabase
...
url: postgres://mailman3:<secret>@<host>:<port>/mailman3
At this point the required tables have not yet been created in the database. Therefore, the mailman3 package should be configured again:
# dpkg-reconfigure mailman3
Because the database mailman3 already exists on the database server, it does not need to be recreated using dbconfig-common:
* Reinstall database for mailman3? No
* Add the HyperKitty configuration to mailman.cfg? No
Also moving the HyperKitty configuration to /etc/mailman3/mailman.cfg is not necessary at this time. After dpkg-reconfigure has finished, all necessary tables do now exist in the database mailman3:
mailman3=> \dt
List of relations
Schema | Name | Type | Owner --------+--------------------+-------+---------- public | _request | table | mailman3 public | acceptablealias | table | mailman3 public | address | table | mailman3 public | alembic_version | table | mailman3 ...
An initial start of the service mailman3 shows no errors:
# systemctl start mailman3
# systemctl status mailman3
● mailman3.service - mailman3 server.
Loaded: loaded (/lib/system/system/mailman3.service; enabled;
vendor default: enabled) Active: active (running) since Thu 2022-11-03 10:10:29 CET; 11min ago. ...
- Installing mailman3-web
Once the mailman3 package is installed, package mailman3-web can be installed:
# apt install mailman3-web
This time you should not do the installation process without the help of the installation tool dbconfig-common:
* Configure database for mailman3 with dbconfig-common? Yes
* Database type to be used by mailman3-web: pgsql
* Host name of the PostgreSQL database server for mailman3-web: new
host * Host running the PostgreSQL server for mailman3-web: <remote host> * PostgreSQL application password for mailman3-web: <secret> * Password confirmation: <secret>
Even if the DBA password prompt cannot be answered:
Create configuration file /etc/dbconfig-common/mailman3-web.conf
with new version Password for user postgres: ??????
the dbconfig-common tool should be used again:
* Next step for database installation: retry
* Configure database for mailman3-web with dbconfig-common? Yes
* Connection method for PostgreSQL database of mailman3-web: TCP/IP
* Host name of the PostgreSQL database server for mailman3-web:
<remote host> * Port number for the PostgreSQL service: 5432 * Method for authenticating the PostgreSQL administrator: password * Method for authenticating PostgreSQL user: password * PostgreSQL database name for mailman3-web: mailman3web * PostgreSQL username for mailman3-web: mailman3 * PostgreSQL application password for mailman3-web: <secret> * Password confirmation: <secret> * Name of the database's administrative user: postgres * Password of your database's administrative user: sldjkfhskldfjhyxlökcjy
The prompt for the DBA password cannot be answered correctly again, therefore "ignore" should now be the best choice for the further course of the installation process:
* Next step for database installation: ignore
* Password of your database's administrative user:
sldjkfhskldfjhyxlkcylö
An error does occur now because the database user mailman3 can not be created:
...
Password for user postgres:
unable to connect to postgresql server.
error encountered creating user:
psql: error: fe_sendauth: no password supplied
...
But this error doesn't matter, because the database user mailman3 does already exist and the installation process of the package mailman3web will nevertheless be finished completely. A look into file /etc/mailman3/mailman-web.py shows that dbconfig-common has entered the database connection to the database server correctly, too:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mailman3web',
'USER': 'mailman3',
'PASSWORD': '<secret>',
'HOST': '<remote host>',
'PORT': '', <--- missing?
'OPTIONS': {
},
}
}
Also all required tables have been created in the database mailman3web during the installation process:
mailman3web=> \dt
List of relations
Schema | Name | Type | Owner --------+-----------------------------------+-------+---------- public | account_emailaddress | table | mailman3 public | account_emailconfirmation | table | mailman3 public | auth_group | table | mailman3 public | auth_group_permissions | table | mailman3 public | auth_permission | table | mailman3 ...
The initial start of the service mailman3-web shows no errors:
# systemctl start mailman3-web
# systemctl status mailman3-web
● mailman3-web.service - Mailman3-web uWSGI service.
Loaded: loaded (/lib/system/system/mailman3-web.service;
enabled; vendor default: enabled). Active: active (running) since Thu 2022-11-03 10:42:30 CET; 11min ago ...
- Intergration in boot sequence
Finally, the two services mailman3 and mailman3-web can be included in the boot sequence:
# systemctl enable mailman3
Synchronize the state of mailman3.service with the SysV service
script with /lib/systemd/systemd-sysv-install. Runs: /lib/systemd/systemd-sysv-install enable mailman3 # systemctl enable mailman3-web Synchronize the status of mailman3-web.service with the SysV service script using /lib/systemd/systemd-sysv-install. Runs: /lib/systemd/systemd-sysv-install enable mailman3-web
------------ >8 ------------
On 01.11.22 08:10, Stephen J. Turnbull wrote:
blackout69 writes:
For mailman3 sudo dpkg-reconfigure mailman3
For mailman3-web sudo dpkg-reconfigure mailman3-web
I guess those will work too as long as the users and databases have been created. But they'll still fail at the first step without that (and they might fail anyway if checking for the existence of those users and databases involves logging in to the database as the admin user).
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
-- Markus Ludwig Grandpré Universität Konstanz Kommunikations-, Informations-, Medienzentrum (KIM) Abteilung IT-Dienste Forschung und Lehre, Tel: ++49 7531 88 4342