Hi all, after upgrading an older server to Ubuntu 20.04, I tried to first upgrade my old mailman 2 installation to mailman 3. I've been on it for three weeks now, but unable to get anything working. I have long forgone the idea of upgrading and thus purged everything from mailman2 on my machine, and installed and removed mailman3 several times to no avail.
My most recent try (it is currently an empty mailman installation) was done by calling
apt install mailman3 mailman3-full mailman3-web
and saying "yes" to every question. I'm using Mariadb as the database, and two databases called mailman3 and mailman3web (plus two users with the same names) have been created. I have configured a virtual host for apache (see below) and changed the mailman.cfg and mailman-weg.cfg to match (also see below).
I have restarted both mailman3 and mailman3-web several times now, but when I try to access the site, I just get
| Something went wrong | Mailman REST API not available. Please start Mailman core.
plus an e-mail with subject
| [Django] ERROR (EXTERNAL IP): Service Unavailable: /mailman3/postorius/lists/
I'm running
| GNU Mailman 3.3.3b1 (Tom Sawyer) | Python 3.8.10 (default, Sep 28 2021, 16:10:42)
Can anybody tell me what is going on? Also, the confirmation e-mail I got for registering a user says "example.com" in its subject line, even though I replaced every mention in the config files below with my actual URL.
Any help is appreaciated, I can provide logs or other data on request.
Cheers, michael
/etc/mailman.mailman3.cfg
site_owner: postmaster@<site> noreply_address: noreply default_language: en sender_headers: from from_ reply-to sender email_commands_max_lines: 10 pending_request_life: 3d cache_life: 7d pre_hook: post_hook: layout: debian filtered_messages_are_preservable: no html_to_plain_text_command: /usr/bin/lynx -dump $filename listname_chars: [-_.0-9a-z]
[shell] prompt: >>> banner: Welcome to the GNU Mailman shell use_ipython: no history_file:
[paths.debian] var_dir: /var/lib/mailman3 queue_dir: $var_dir/queue bin_dir: /usr/lib/mailman3/bin list_data_dir: $var_dir/lists log_dir: /var/log/mailman3 lock_dir: $var_dir/locks data_dir: $var_dir/data cache_dir: $var_dir/cache etc_dir: /etc/mailman3 ext_dir: $var_dir/ext messages_dir: $var_dir/messages archive_dir: $var_dir/archives template_dir: $var_dir/templates pid_file: /run/mailman3/master.pid lock_file: $lock_dir/master.lck
[database] class: mailman.database.mysql.MySQLDatabase url: mysql+pymysql://mailman3:<password>@localhost/mailman3?charset=utf8&use_unicode=1 debug: no
[logging.debian] format: %(asctime)s (%(process)d) %(message)s datefmt: %b %d %H:%M:%S %Y propagate: no level: info path: mailman.log
[webservice] hostname: <site> port: 8001 use_https: yes show_tracebacks: yes api_version: 3.1 admin_user: restadmin admin_pass: <pass>
[mta] incoming: mailman.mta.exim4.LMTP outgoing: mailman.mta.deliver.deliver smtp_host: localhost smtp_port: 25 smtp_user: smtp_pass: lmtp_host: 127.0.0.1 lmtp_port: 8024 configuration: python:mailman.config.exim4
virtual host in Apache
<VirtualHost <site>:443> AssignUserID www-data www-data ServerAdmin webmaster@<site> ServerName <site> SSLEngine on
DocumentRoot /webspace/mailman/www
ErrorLog /var/log/apache2/mm3_error_log
TransferLog /var/log/apache2/mm3_access_log
Alias /mailman3/favicon.ico /var/lib/mailman3/web/static/postorius/img/favicon.ico
Alias /mailman3/static /var/lib/mailman3/web/static
<Directory "/var/lib/mailman3/web/static">
Require all granted
</Directory>
<IfModule mod_proxy_uwsgi.c>
ProxyPass /mailman3/favicon.ico !
ProxyPass /mailman3/static !
ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost
</IfModule>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/<site>/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/<site>/privkey.pem
</VirtualHost>
/etc/mailman3/mailman-web.cfg
SECRET_KEY = <secret>
ADMINS = ( ('Mailman Suite Admin', 'root@localhost'), )
ALLOWED_HOSTS = [ #"localhost", # Archiving API from Mailman, keep it. # "lists.your-domain.org", # Add here all production URLs you may have. '*' ]
MAILMAN_REST_API_URL = 'http://localhost:8001' MAILMAN_REST_API_USER = 'restadmin' MAILMAN_REST_API_PASS = '' MAILMAN_ARCHIVER_KEY = <secret> MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
INSTALLED_APPS = ( 'hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', # 'django.contrib.admindocs', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount', 'django_mailman3.lib.auth.fedora', )
DATABASES = { 'default': { # Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailman3web', 'USER': 'mailman3web', 'PASSWORD': <passwd>, 'HOST': 'localhost', 'PORT': '', 'OPTIONS': { # Set sql_mode to 'STRICT_TRANS_TABLES' for MySQL. See # https://docs.djangoproject.com/en/1.11/ref/ # databases/#setting-sql-mode 'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", }, } }
USE_X_FORWARDED_HOST = True
LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' USE_I18N = True USE_L10N = True USE_TZ = True
EMAILNAME = '<site>'
DEFAULT_FROM_EMAIL = 'postorius@{}'.format(EMAILNAME)
SERVER_EMAIL = 'root@{}'.format(EMAILNAME)
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
SOCIALACCOUNT_PROVIDERS = { }
COMPRESS_OFFLINE = True POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost/mailman3/'