I have issue where it does not send emails on to people in the list I create.
by john_warland@hotmail.com
Hello,
I am quite new to Mailman3 and have been trying to get a working local test setup on a single VM (Centos07)
I have issue where if I send an email to the list. it does not send emails on to the people subscribed to that list.
Note the steps below were put together from memory after a few days of repeatably trying different things so there will be some inaccuracies
I have mailman running on same local box as postfix, postorius and hyperkitty.
I have root as the superuser in Postorius and have tried the following:
In unix shell created new user 'developer'
In unix shell created new user 'tester'
In shell send an email from developer user to tester:
echo 'Hello' | mailx -s 'Hello Subject line' tester(a)sandbox.mytest.com
Confirmed user tester received email in cat /home/tester/Maildir/new/ folder:
Return-Path: <developer(a)cloud7.sandbox.mytest.com>
X-Original-To: tester(a)cloud7.sandbox.mytest.com
Delivered-To: tester(a)cloud7.sandbox.mytest.com
Received: by cloud7.sandbox.mytest.com (Postfix, from userid 1000)
In Postorius web frontend:
Signed up as root
Received confirmation email in /root/Maildir/new/ folder so cut and pasted the Url in the email to activate account.
Created new list called testlist(a)sandbox.mytest.com
Logged out
Signed up as tester
Received confirmation email in /home/tester/Maildir/new/ folder so cut and pasted the Url to activate account.
Subscribed tester to the testlist.
Next in unix shell su as developer and send an email to testlist(a)sandbox.mytest.com
The root user gets the following email
Content-Transfer-Encoding: 7bit
Subject: Your message to testlist(a)cloud7.sandbox.mytest.com awaits moderator approval
From: testlist-bounces(a)cloud7.sandbox.mytest.com
To: developer(a)cloud7.sandbox.mytest.com
Message-ID: <158824480291.3035.17408340520496115243(a)localhost.localdomain>
Date: Thu, 30 Apr 2020 11:06:42 +0000
Precedence: bulk
X-Mailman-Version: 3.3.0
Your mail to 'testlist(a)cloud7.sandbox.mytest.com' with the subject
hello there 2
Is being held until the list moderator can review it for approval.
The message is being held because:
The message is not from a list member
Either the message will get posted to the list, or you will receive notification of the moderator's decision.
Once I have gone back into Postorius as root and approved the message, root user gets a second email:
Return-Path: <testlist-bounces(a)cloud7.sandbox.mytest.com>
X-Original-To: root(a)cloud7.sandbox.mytest.com
Delivered-To: root(a)cloud7.sandbox.mytest.com
Received: from localhost.localdomain (localhost [IPv6:::1])
by cloud7.sandbox.mytest.com (Postfix) with ESMTP id E056A84CE4
for <root(a)cloud7.sandbox.mytest.com>; Thu, 30 Apr 2020 11:09:10 +0000 (UTC)
Received: by cloud7.sandbox.mytest.com (Postfix, from userid 1000)
id 8F1B684CE4; Thu, 30 Apr 2020 11:06:41 +0000 (UTC)
Date: Thu, 30 Apr 2020 11:06:41 +0000
To: testlist(a)cloud7.sandbox.mytest.com
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Message-Id: <20200430110641.8F1B684CE4(a)sandbox.mytest.com>
From: developer(a)cloud7.sandbox.mytest.com
X-MailFrom: developer(a)cloud7.sandbox.mytest.com
X-Mailman-Rule-Hits: nonmember-moderation
X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation
Message-ID-Hash: FAPTJKJRZG2ELSOSBRBIDOBWXP3Y5QAY
X-Message-ID-Hash: FAPTJKJRZG2ELSOSBRBIDOBWXP3Y5QAY
X-Mailman-Approved-At: Thu, 30 Apr 2020 11:09:10 +0000
X-Mailman-Version: 3.3.0
Precedence: list
Subject: [Testlist] hello there 2
List-Id: A test list <testlist.sandbox.mytest.com>
List-Help: <mailto:testlist-request@sandbox.mytest.com?subject=help>
List-Post: <mailto:testlist@sandbox.mytest.com>
List-Subscribe: <mailto:testlist-join@sandbox.mytest.com>
List-Unsubscribe: <mailto:testlist-leave@sandbox.mytest.com>
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
A test email 2
_______________________________________________
Testlist mailing list -- testlist(a)sandbox.mytest.com
To unsubscribe send an email to testlist-leave(a)sandbox.mytest.com
At no point does the email appear in the tester(a)sandbox.mytest.com Maildir
Configs as follows..
==================================================================================================
/etc/postfix/main.cf:
==================================================================================================
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
myhostname = cloud7.sandbox.mytest.com
mydomain = sandbox.mytest.com
myorigin = $mydomain
inet_interfaces = all
inet_protocols = all
mydestination = $myhostname, localhost.$mydomain, localhost,
mail.$mydomain, www.$mydomain, ftp.$mydomain, sandbox.mytest.com
unknown_local_recipient_reject_code = 550
# Next line Obfuscated
mynetworks = 192.***.***.0/24, 127.0.0.0/8
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
recipient_delimiter = +
home_mailbox = Maildir/
debug_peer_level = 2
debug_peer_list = sandbox.mytest.com
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.10.1/samples
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
disable_dns_lookups = yes
owner_request_special = no
transport_maps = hash:/var/lib/mailman/data/postfix_lmtp
# Setting to nothing fixes 'Recepient address rejected: User unknown in local recipient table
local_recipient_maps =
relay_domains = hash:/var/lib/mailman/data/postfix_domains
==================================================================================================
/etc/mailman.cfg
==================================================================================================
[devmode]
enabled: yes
recipient: root(a)sandbox.mytest.com
[mailman]
# local = Recommended as installing mailman from source. Folder structure in /var/tmp/mailman
# fhs = /var/bin, /var/log, etc..
layout: fhs
[logging.database]
level: info
[mta]
# This config is for when mailman and the MTA (Postfix) are on the same host
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: 127.0.0.1
lmtp_port: 8024
smtp_host: localhost
smtp_port: 25
configuration: python:mailman.config.postfix
[webservice]
hostname: localhost
port: 8001
use_https: no
admin_user: restadmin
admin_pass: restpass
api_version: 3.1
==================================================================================================
/etc/mailman-suite-1.0.0/mailman-suite_project/settings.py
==================================================================================================
In this file the main changes were:
DEBUG=True
SERVER_EMAIL = 'root(a)localhost.local'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
Commented out three lines of code:
# if DEBUG == True:
# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
# EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'emails')
Complete file:
"""
Django Settings for Mailman Suite (hyperkitty + postorius)
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'change-this-on-your-production-server'
# SECURITY WARNING: don't run with debug turned on in production!
# Have to keep it True atm as the css styles screw up when set to False
DEBUG = True
ADMINS = (
('Mailman Suite Admin', 'root@localhost'),
)
SITE_ID = 1
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
"MAILMAN_SERVER_ADDRESS", <--- I inject IP Address here
# Add here all production URLs you may have.
]
# Mailman API credentials
MAILMAN_REST_API_URL = 'http://localhost:8001'
MAILMAN_REST_API_USER = 'restadmin'
MAILMAN_REST_API_PASS = 'restpass'
MAILMAN_ARCHIVER_KEY = 'SecretArchiverAPIKey'
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
# Application definition
INSTALLED_APPS = (
'hyperkitty',
'postorius',
'django_mailman3',
# Uncomment the next line to enable the admin:
'django.contrib.admin',
# Uncomment the next line to enable admin documentation:
# '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',
'allauth.socialaccount.providers.openid',
'allauth.socialaccount.providers.github',
'allauth.socialaccount.providers.gitlab',
'allauth.socialaccount.providers.google',
# 'allauth.socialaccount.providers.facebook',
'allauth.socialaccount.providers.twitter',
'allauth.socialaccount.providers.stackexchange',
)
MIDDLEWARE = (
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django_mailman3.middleware.TimezoneMiddleware',
'postorius.middleware.PostoriusMiddleware',
)
ROOT_URLCONF = 'urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.i18n',
'django.template.context_processors.media',
'django.template.context_processors.static',
'django.template.context_processors.tz',
'django.template.context_processors.csrf',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
'django_mailman3.context_processors.common',
'hyperkitty.context_processors.common',
'postorius.context_processors.postorius',
],
},
},
]
WSGI_APPLICATION = 'wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
# Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.sqlite3',
# DB name or path to database file if using sqlite3.
'NAME': os.path.join(BASE_DIR, 'mailmansuite.db'),
# The following settings are not used with sqlite3:
'USER': 'mailmansuite',
'PASSWORD': 'mmpass',
# HOST: empty for localhost through domain sockets or '127.0.0.1' for
# localhost through TCP.
'HOST': '',
# PORT: set to empty string for default.
'PORT': '',
}
# Example for PostgreSQL (recommanded for production):
#'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'database_name',
# 'USER': 'database_user',
# 'PASSWORD': 'database_password',
# 'HOST': 'localhost',
#}
}
# If you're behind a proxy, use the X-Forwarded-Host header
# See https://docs.djangoproject.com/en/1.8/ref/settings/#use-x-forwarded-host
# USE_X_FORWARDED_HOST = True
# And if your proxy does your SSL encoding for you, set SECURE_PROXY_SSL_HEADER
# https://docs.djangoproject.com/en/1.8/ref/settings/#secure-proxy-ssl-header
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_SCHEME', 'https')
# Other security settings
# SECURE_SSL_REDIRECT = True
# If you set SECURE_SSL_REDIRECT to True, make sure the SECURE_REDIRECT_EXEMPT
# contains at least this line:
# SECURE_REDIRECT_EXEMPT = [
# "archives/api/mailman/.*", # Request from Mailman.
# ]
# SESSION_COOKIE_SECURE = True
# SECURE_CONTENT_TYPE_NOSNIFF = True
# SECURE_BROWSER_XSS_FILTER = True
# CSRF_COOKIE_SECURE = True
# CSRF_COOKIE_HTTPONLY = True
# X_FRAME_OPTIONS = 'DENY'
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME':
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC'
USE_I18N = True
USE_L10N = True
USE_TZ = True
# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/1.8/howto/static-files/
# Absolute path to the directory static files should be collected to.
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/var/www/example.com/static/"
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
# URL prefix for static files.
# Example: "http://example.com/static/", "http://static.example.com/"
STATIC_URL = '/static/'
# Additional locations of static files
STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
# BASE_DIR + '/static/',
)
# List of finder classes that know how to find static files in
# various locations.
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
'compressor.finders.CompressorFinder',
)
# Django 1.6+ defaults to a JSON serializer, but it won't work with
# django-openid, see
# https://bugs.launchpad.net/django-openid-auth/+bug/1252826
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
LOGIN_URL = 'account_login'
LOGIN_REDIRECT_URL = 'list_index'
LOGOUT_URL = 'account_logout'
# If you enable internal authentication, this is the address that the emails
# will appear to be coming from. Make sure you set a valid domain name,
# otherwise the emails may get rejected.
# https://docs.djangoproject.com/en/1.8/ref/settings/#default-from-email
# DEFAULT_FROM_EMAIL = "mailing-lists(a)you-domain.org"
DEFAULT_FROM_EMAIL = 'postorius(a)localhost.local'
# If you enable email reporting for error messages, this is where those emails
# will appear to be coming from. Make sure you set a valid domain name,
# otherwise the emails may get rejected.
# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SERVER_EMAIL
# SERVER_EMAIL = 'root(a)your-domain.org'
SERVER_EMAIL = 'root(a)localhost.local'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
# Compatibility with Bootstrap 3
from django.contrib.messages import constants as messages # flake8: noqa
MESSAGE_TAGS = {
messages.ERROR: 'danger'
}
#
# Social auth
#
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
# Django Allauth
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
# You probably want https in production, but this is a dev setup file
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http"
ACCOUNT_UNIQUE_EMAIL = True
SOCIALACCOUNT_PROVIDERS = {
'openid': {
'SERVERS': [
dict(id='yahoo',
name='Yahoo',
openid_url='http://me.yahoo.com'),
],
},
'google': {
'SCOPE': ['profile', 'email'],
'AUTH_PARAMS': {'access_type': 'online'},
},
'facebook': {
'METHOD': 'oauth2',
'SCOPE': ['email'],
'FIELDS': [
'email',
'name',
'first_name',
'last_name',
'locale',
'timezone',
],
'VERSION': 'v2.4',
},
}
#
# Gravatar
# https://github.com/twaddington/django-gravatar
#
# Gravatar base url.
# GRAVATAR_URL = 'http://cdn.libravatar.org/'
# Gravatar base secure https url.
# GRAVATAR_SECURE_URL = 'https://seccdn.libravatar.org/'
# Gravatar size in pixels.
# GRAVATAR_DEFAULT_SIZE = '80'
# An image url or one of the following: 'mm', 'identicon', 'monsterid',
# 'wavatar', 'retro'.
# GRAVATAR_DEFAULT_IMAGE = 'mm'
# One of the following: 'g', 'pg', 'r', 'x'.
# GRAVATAR_DEFAULT_RATING = 'g'
# True to use https by default, False for plain http.
# GRAVATAR_DEFAULT_SECURE = True
#
# django-compressor
# https://pypi.python.org/pypi/django_compressor
#
COMPRESS_PRECOMPILERS = (
('text/less', 'lessc {infile} {outfile}'),
('text/x-scss', 'sass -t compressed {infile} {outfile}'),
('text/x-sass', 'sass -t compressed {infile} {outfile}'),
)
# On a production setup, setting COMPRESS_OFFLINE to True will bring a
# significant performance improvement, as CSS files will not need to be
# recompiled on each requests. It means running an additional "compress"
# management command after each code upgrade.
# http://django-compressor.readthedocs.io/en/latest/usage/#offline-compression
# COMPRESS_OFFLINE = True
# Needed for debug mode
# INTERNAL_IPS = ('127.0.0.1',)
#
# Full-text search engine
#
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, "fulltext_index"),
# You can also use the Xapian engine, it's faster and more accurate,
# but requires another library.
# http://django-haystack.readthedocs.io/en/v2.4.1/installing_search_engines.h…
# Example configuration for Xapian:
#'ENGINE': 'xapian_backend.XapianEngine'
},
}
#
# Asynchronous tasks
#
Q_CLUSTER = {
'timeout': 300,
'save_limit': 100,
'orm': 'default',
}
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
# the site admins on every HTTP 500 error when DEBUG=False.
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
'()': 'django.utils.log.RequireDebugFalse'
}
},
'handlers': {
'mail_admins': {
#'level': 'ERROR',
'level': 'INFO',
'filters': ['require_debug_false'],
'class': 'django.utils.log.AdminEmailHandler'
},
'file':{
#'level': 'ERROR',
'level': 'INFO',
#'class': 'logging.handlers.RotatingFileHandler',
'class': 'logging.handlers.WatchedFileHandler',
'filename': os.path.join(BASE_DIR, 'logs', 'mailmansuite.log'),
'formatter': 'verbose',
},
'console': {
'class': 'logging.StreamHandler',
'formatter': 'simple',
},
},
'loggers': {
'django.request': {
'handlers': ['mail_admins', 'file'],
#'level': 'ERROR',
'level': 'INFO',
'propagate': True,
},
'django': {
'handlers': ['file'],
#'level': 'ERROR',
'level': 'INFO',
'propagate': True,
},
'hyperkitty': {
'handlers': ['file'],
#'level': 'DEBUG',
'level': 'INFO',
'propagate': True,
},
'postorius': {
'handlers': ['console', 'file'],
#'level': 'ERROR',
'level': 'INFO',
},
},
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'root': {
'handlers': ['file'],
#'level': 'ERROR',
'level': 'INFO',
},
}
# Using the cache infrastructure can significantly improve performance on a
# production setup. This is an example with a local Memcached server.
#CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.PyLibMCCache',
# 'LOCATION': '127.0.0.1:11211',
# }
#}
# When DEBUG is True, don't actually send emails to the SMTP server, just store
# them in a directory. This way you won't accidentally spam your mailing-lists
# while you're fiddling with the code.
# Kept DEBUG=True as it breaks css styling when set to False so commented out this code as temp fix.
#if DEBUG == True:
# EMAIL_BACKEND = 'django.core.mail.backends.filebased.EmailBackend'
# EMAIL_FILE_PATH = os.path.join(BASE_DIR, 'emails')
#
# HyperKitty-specific
#
# Only display mailing-lists from the same virtual host as the webserver
FILTER_VHOST = False
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
try:
from settings_local import *
except ImportError:
pass
5 years, 7 months
Re: moving lists to another server
by Odhiambo Washington
On Sat, Nov 18, 2023 at 1:42 AM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 11/17/23 00:51, Odhiambo Washington wrote:
>
> > I am scratching my head bald trying to figure out how to bring in this
> > other MM3 site and list into my existing server, especially with regard
> to
> > the DB backend.
> >
> > The list - let's call it users(a)domainX.name was using MySQL backend and
> > had a separate DB for Mailman core and Mailman web.
> > I believe combining these into one isn't a problem. But getting to merge
> > this DB into my current one is what I am not sure about.
>
> This is https://gitlab.com/mailman/postorius/-/issues/13 which is a real
> need, but doesn't yet exist.
>
> I think the easiest thing for the archives is to forget the Mailman web
> DB and just export the archive as a mbox from the other site (if it's
> large, exporting the entire archive will time out so you have to do it
> in pieces). Then you can use hyperkitty_import to import it.
>
What is the command to export the archive as a mbox from the DB?
I can't figure out which option it is by looking at 'mailman-web -h'.
> For the list data, it's probably easiest to just create the list
> manually and go through the settings in Postorius and make them match,
I want to go with the above.
although you could dump the mailinglist table entry where list_id =
> 'users(a)domainx.name' and load that, but you'd need to edit the id field
> in the dump to match the id on your server.
Not going with that.
> That leaves the members.
Given that I have a dump of the two DBs (mailman and mailman-web) I just
created one DB and imported them.
I have been able to dump the members into a text file. Now importing is not
a problem.
BTW, how will ' mailman addmembers' treat a file containing:
```
Firstname Lastname <email@address>
Onlyname <email2@address>
```
?
> Doing this with a DB dump/load would be very complex because while the
> member table has a list_id field which is the id of the list's entry in
> the mailinglist table and can be used to select the relevant members,
> these records also link to entries in the address, preferences and user
> tables and matching them would be an issue.
>
I am also not taking that path.
I think a custom script would be required. If I were doing this, I would
> make a separate database on my server with a copy of the data from the
> other server and then try to make a script that would extract data from
> the other database and add it to mine.
Alternatively you could just dump the members from the other servers
> with the `mailman members` command perhaps separately for regular and
> the different digest types and then add them with the `mailman
> addmembers` command. This wouldn't get all their attributes, but it
> could work.
>
I have opted for the simple way to do this:
1. Create the site in Django Admin and create/configure the list in
Postorius
2. Add the members from the file dump, with delivery set to regular.
3. Send the members an email informing them that they need to set their
delivery preferences.
I am stuck on the issue of exporting the archives to mbox file as already
stated above.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]
2 years
Re: How to remove Held Unsubscriptions
by Mark
Super! That did the job for Postorius 1.3.4.
Thank you very much Jered, and also Mark S. for the comments in the
archived post.
Best,
Mark
On 2024-01-06 05:50, Jered Floyd wrote:
> What version are you running? It looks like this was added in Postorius
> 1.3.5.
>
> To confirm a request for unsubscription before that version requires
> using the shell or REST API, as described in
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/…
>
> Copying for convenience:
>
> # mailman shell -l listname(a)domain.com
> Welcome to the GNU Mailman shell
> Use commit() to commit changes.
> Use abort() to discard changes since the last commit.
> Exit with ctrl+D does an implicit commit() but exit() does not.
> The variable 'm' is the list(a)example.com mailing list
> >>> pendingsdb = getUtility(IPendings)
> >>> for token, data in pendingsdb.find(m,
> pend_type='unsubscription'):
> ... if data['token_owner'] == 'moderator':
> ... pendingsdb.confirm(token)
> ...
> [data about the request will be displayed here]
> >>> commit()
>
> --Jered
>
>
> ----- On Jan 5, 2024, at 12:47 PM, Mark imark(a)posteo.net wrote:
>
>> No joy. There is no menu entry for that page (
>> ".../unsubscription_requests") and when entering the URL manually I
>> get:
>>
>> Page not found
>> This page either doesn't exist, or it moved somewhere else.
>>
>> The menu item and page for ".../subscription_requests" display okay:
>>
>> Subscriptions pending approval (0)
>> There are currently no subscription requests for this list.
>>
>>
>>
>>
>>
>> On 2024-01-06 04:35, Jered Floyd wrote:
>>> I see these under "Subscription requests > Unsubscription requests",
>>> or at the URI (matching your sample)
>>>
>>> https://lists.domain.com/postorius/lists/listname.domain.com/unsubscription…
>>>
>>> Does this menu entry appear for you?
>>>
>>> --Jered
>>>
>>> ----- On Jan 5, 2024, at 12:30 PM, Mark imark(a)posteo.net wrote:
>>>
>>>> Hi
>>>>
>>>> As a moderator I receive an email each day for "Held
>>>> Unsubscriptions"
>>>> for a subscriber that was unsubscribed by the Owner sometime ago
>>>> (using
>>>> "Mass operations").
>>>>
>>>> +++++++++++++++++++++++++++++++
>>>> The listname(a)domain.com list has 1 moderation requests waiting.
>>>>
>>>> Held Unsubscriptions:
>>>> User: bart(a)example.com
>>>>
>>>> Please attend to this at your earliest convenience.
>>>> +++++++++++++++++++++++++++++++
>>>>
>>>> There is nothing showing under "Subscription requests > Pending
>>>> approval".
>>>>
>>>> Could anyone tell me how I can stop these email notifications? I
>>>> have
>>>> access to the mailman shell and the databases.
>>>>
>>>> Thanks,
>>>> Mark
>>>>
>>>>
>>>> _______________________________________________
>>>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>>>> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>>>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>>> Archived at:
>>>> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
>>>>
>>>> This message sent to jered(a)convivian.com
>>> _______________________________________________
>>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>>> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>> Archived at:
>>> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
>>>
>> > This message sent to imark(a)posteo.net
1 year, 11 months
Custom templates (was: Re: Re: nginx configuration on a multitasking server)
by David Newman
On 12/23/21 10:39 AM, Mark Sapiro wrote:
> On 12/23/21 9:57 AM, David Newman wrote:
>>
>> The task-pending message that MM3 sends to list owners and moderators
>> just says generically to check the dashboard, without providing a URL.
>>
>> Can that be modified to provide an explicit URL, something like this?
>>
>> https://lists.example.com/mailman3/lists/listname
>
>
> Yes, That particular message is built from the list:admin:action:post
> template. You may wish to make custom versions of that and other
> templates. The templates and their default values are at
> https://gitlab.com/mailman/mailman/-/tree/master/src/mailman/templates/en
>
> You can make custom versions of templates in two ways. You can create if
> necessary a /opt/mailman/mm/var/templates directory (it probably already
> exists). Within that directory, sitewide English templates are put in
> the site/en/ directory, domain specific English templates are put in the
> domains/<domain_name>/en/ directory and list specific English templates
> are put in the lists/<list_id>/en/ directory.
>
> For templates like this, you probably want sitewide ones. E.g.,
> site/en/list:admin:action:post.txt
> ---------------------------------------------------------------
> As list administrator, your authorization is requested for the
> following mailing list posting:
>
> List: $listname
> From: $sender_email
> Subject: $subject
>
> The message is being held because:
>
> $reasons
>
> At your convenience, visit
> https://lists.example.com/mailman3/lists/$list_id/held_messages
> to approve or deny the request.
> ---------------------------------------------------------------
>
> The other way to create custom templates is via Postotrius, but
> Postorius only creates list and domain specific templates. Also, if you
> create a template in Postorius, it overrides any in
> /opt/mailman/mm/var/templates/ until you delete it in Postorius.
>
> Info about templates and what substitution variables can be used is at
> https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/…
Following up on this thread from a few weeks ago, a custom subscribe
template I defined is not getting sent out.
I created a pending subscription request on a test list. Here is the
text I'm using in a file called 'list:admin:action:subscribe.txt' (minus
the rows of hypens):
----------
As list administrator, your authorization is required for a mailing list
subscription request approval:
For: $member
List: $listname
At your convenience, visit:
https://${domain}/mailman/admindb/lists/${short_listname}.${domain}/
to approve or deny the request.
----------
Instead the message that goes out at midnight daily reads like this:
----------
The test(a)lists.domain.tld list has 1 moderation requests waiting.
Held Subscriptions:
User: letmein(a)domain.tld
Please attend to this at your earliest convenience.
----------
On successive nights I have placed copies of the
'list:admin:action:subscribe.txt' file above in these locations:
mm/var/templates/lists/test.lists.domain.tld/en
/opt/mailman/mm/var/templates/site/en
and then in Postorius, with the same contents as above. The file
versions are owned by the mailman user, and have 0644 permissions. Not
sure this is necessary but I've restarted the mailman3 and mailmanweb
services each time after a change.
There is no sign of trouble in the MM3 or web logs. The only thing I see
is in the Postfix log, where the shorter and less helpful message goes
out each night. I don't see anything in the template docs about this.
Questions:
1. What to do to get the custom message working?
2. Is there a way to trigger a subscribe reminder for one list only?
Asking because there are other lists on this server with other requests
pending, and I don't want to bother other moderators with multiple
reminders per day. Not a big deal, but it would be nice to test this
with one list rather than waiting up to 24 hours after each change.
Thank you!
dn
3 years, 10 months
Re: Post-installation documentation?
by David Newman
On 11/23/21 4:40 AM, Stephen J. Turnbull wrote:
> David Newman writes:
>
> > I am looking for a high-level "do these steps next to get a list
> > working" document rather than an API command reference.
>
> There's no such documentation. "Get a list working" depends on what
> you mean by "working".
Thanks for getting back to me.
IMO post-installation docs for list admins would be a big help in
Mailman3 adoption. I'm willing to help with this.
When I say "working": I'm looking to migrate Mailman2 mailing lists to
Mailman3, but am struggling with even basic setup tasks before we
attempt list migtration.
For example, on admin page I've set up two lists, one public and one
private (each with unique list IDs), but neither appear in the site's
list index.
And I don't know where to add list members.
And clicking the site archives link throws this error:
> The basic answer is
>
> 1. Install Mailman 3 suite.
> 2. Log in to Postorius as an admin user and create the list.
>
> After that, it's case-specific.
>
> > - why do the venv docs and admin FAQ give different nginx configs for
> > the reverse proxy?
>
> Because the FAQ is providing a short snippet to solve a specific
> problem, the venv docs provide what I guess is somebody's full working
> config. Setting up a Mailman server is complex; usually any example
> you see in the docs is somebody's "works for me" configuration.
>
> > - Does the 'Secret_Hyperkitty_API_Key' need to go anywhere else besides
> > /opt/mailman/mm/mailman-hyperkitty.cfg?
>
> It needs to match MAILMAN_ARCHIVER_KEY in HyperKitty's settings.py.
> There are a couple of reasonable ways to organize HyperKitty and
> Postorius configs, I'm not sure where the appropriate settings.py
> would be on your server.
>
> > - For Django (presumably in /etc/mailman3/settings.py, but the docs
> > don't say), what values to use with Postfix to set up the email back end?
>
> The answer is "that depends on your mail environment". As far as I
> know, normally it just works with the default settings, but if your
> Postfix requires secure, you need to set that up:
> https://docs.djangoproject.com/en/3.2/ref/settings/#std:setting-EMAIL_USE_T…
> and possibly the following 3 or 4 variables if authentication is needed.
>
> There was a thread on this a couple of weeks ago.
>
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>
4 years
Re: Mailman 3 install questions: HAYSTACK_CONNECTIONS
by Odhiambo Washington
On Sun, Jul 7, 2024 at 6:24 AM <heller(a)deepsoft.com> wrote:
> I am using the debian 12 repo versions of mailman3, django, posterious,
> hyperkitty, and xapian:
>
> sharky5% dpkg-query -l
> python3-{django,django-mailman3,django-hyperkitty,django-postorius,xapian}
> mailman3\* | grep '^ii'
> ii mailman3 3.3.8-2~deb12u2 all Mailing list
> management system
> ii mailman3-doc 3.3.8-2~deb12u2 all Mailing list
> management system documentation
> ii mailman3-web 0+20200530-2.1 all Django
> project integrating Mailman3 Postorius and HyperKitty
> ii python3-django 3:3.2.19-1+deb12u1 all High-level
> Python web development framework
> ii python3-django-hyperkitty 1.3.7-1 all Web user
> interface to access GNU Mailman3 archives
> ii python3-django-mailman3 1.3.9-1 all Django
> library to help interaction with Mailman3 (Python 3 version)
> ii python3-django-postorius 1.3.8-3 all Web user
> interface to access GNU Mailman3
> ii python3-xapian 1.4.22-1 amd64 Xapian
> search engine interface for Python3
>
> Before adding the HAYSTACK_CONNECTIONS options, I have this:
>
> sharky5% sudo mailman-web haystack_info --no-color --skip-checks
> Number of handled 1 index(es).
> - Model: Email by Index: <hyperkitty.search_indexes.EmailIndex object at
> 0x7fd0de1b0470>
>
> When I add this to /etc/mailman3/maymail_web.py (adapted from the section
> titled:
> "Setting up Fulltext search (xapian)" on
> https://docs.mailman3.org/en/latest/install/virtualenv.html#set-up-xapian
>
> HAYSTACK_CONNECTIONS = {
>
> 'default': {
>
> 'PATH': "/var/lib/mailman3/web/fulltext_index",
>
> 'ENGINE': 'xapian_backend.XapianEngine'
>
> },
>
> }
>
> I get:
>
> File "/usr/lib/python3.11/importlib/__init__.py", line 126, in
> import_module
> return _bootstrap._gcd_import(name[level:], package, level)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> File "<frozen importlib._bootstrap>", line 1206, in _gcd_import
> File "<frozen importlib._bootstrap>", line 1178, in _find_and_load
> File "<frozen importlib._bootstrap>", line 1142, in
> _find_and_load_unlocked
> ModuleNotFoundError: No module named 'xapian_backend'
>
> So, do I use Xapian or not? Is something missing somewhere? Is this a
> documentation bug or something else?
>
It cannot be a documentation bug since you are NOT using/following the
documentation!
The message is good enough. Where is your xapian_backend,py??
```
wash@gw:~$ locate xapian_backend.py
/opt/mailman/mm/venv/lib/python3.11/site-packages/xapian_backend.py
wash@gw:~$
```
I hope the above gives you a clue as to where it should be found.
However, since you aren't following the documentation I am familiar with,
and I am not a Python expert, my end-of-thinking capacity (/etc) is here :-)
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
In an Internet failure case, the #1 suspect is a constant: DNS.
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]
1 year, 4 months
Re: Mailman notify generating emails for request that aren't visible.
by Mark Sapiro
On 10/31/21 6:11 PM, Simon Coggins wrote:
> Hi,
>
> We’re running mailman 3.3.4 (about to upgrade to 3.3.5 this week). I enabled mailman notify cron a few weeks ago to email out any pending requests for admins. I’ve now got multiple lists that keep emailing out the same outstanding holds but they can’t visible in the GUI. The requests are all duplicates as well. This is a redacted example email:
>
> -----Original Message-----
> From: mailman-alerts(a)example.com<mailto:mailman-alerts@example.com>
> Sent: Monday, 1 November 2021 8:10 AM
> To: somelist-owner(a)lists.example.com<mailto:somelist-owner@lists.example.com>
> Subject: The somelist(a)lists.example.com<mailto:somelist@lists.example.com> list has 4 moderation requests waiting.
>
> The somelist(a)lists.example.com<mailto:somelist@lists.example.com> list has 4 moderation requests waiting.
>
> Held Unsubscriptions:
> User: john.smith(a)maildomain.com<mailto:john.smith@maildomain.com>
> User: john.smith(a)maildomain.com<mailto:john.smith@maildomain.com>
> User: john.smith(a)maildomain.com<mailto:john.smith@maildomain.com>
> User: john.smith(a)maildomain.com<mailto:john.smith@maildomain.com>
>
> Please attend to this at your earliest convenience.
Your lists are configured with Un-Subscription Policy moderate or
confirm, then moderate so unsubs require Moderator approval.
What Postorius version is this? Prior to 1.3.3, unsubsubscription
requests were not visible in Postorius. In 1.3.3_+ they are available in
the Subscription requests dropdown at
https://example.com/mailman3/lists/listname.example.com/unsubscription_requ…
although they may not be counted in the Subscription requests count badge.
--
Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
4 years, 1 month
[MM3-users]Re: mailman 2 vs. mailman 3: what happened to multipart/digest?
by John Hein
Here's an '02 reference in git to the some heritage for multipart/digest
==========
commit 63d2568fe58333f8ca0b7582f74b43e775c581cd
Author: bwarsaw <>
Date: Thu Jul 11 22:14:25 2002 +0000
send_i18n_digests(): Let's generate MIME digests the correct way, by
wrapping each message inside the multipart/digest in a MIMEMessage
instance. We also no longer need to initialize the mimedigest
instance's payload to the empty list.
Also, when sending the digests, be sure to include isdigest=1 in the
metadata, otherwise SMTPDirect will try to tack on another footer.
==========
John wrote at 16:46 -0600 on May 12, 2016:
> Mark Sapiro wrote at 12:18 -0700 on May 12, 2016:
> > On 5/12/16 9:16 AM, John wrote:
> > > Digest delivery in mailman 2 encapsulated the individual message/rfc822 messages in a multipart/digest container. This allowed email clients to show the messages in the particular digest in a threaded view.
> >
> >
> > This format vs. plain text digests was a user option in Mailman 2.
> >
> >
> > > It seems like the various digest options that I have tried [1] in mailman 3.1.0 (as implemented for the fedora-users mailing list) no longer encapsulate messages in multipart/digest.
> >
> >
> > The core still supports the same plain text and MIME format digests and
> > the same individual subscriber and per-list default formats as did
> > Mailman 2. The issue is none of these things are exposed in Postorius.
> >
> > If you subscribe to digests on this list, you will receive the
> > 'encapsulated' MIME format because the lists mime_is_default_digest
> > setting is True, but currently that has to be set through the
> > bin/mailman shell tool.
> >
> >
> > > Is this intentional? Is it a bug - feature that was lost in translation from 2 to 3? Is there a delivery option I'm missing that will turn that back on?
>
> Thanks for the info - and Barry's reply as well. I understand that
> MIME digests are supported in Mailman 3 - that's what I'm using (and
> thanks, Barry, for the info that Summary Digests is the same right
> now). My quibble is that the multipart/digest encapsulation level is
> gone.
>
> Barry Warsaw wrote at 15:16 -0400 on May 12, 2016:
> > The MIME format of MIME digests should roughly be:
> >
> > multipart/mixed
> > text/plain (the digest heading)
> > text/plain (the TOC)
> > message/rfc822
> > message-1
> > message/rfc822
> > message-2
> > ...
> > text/plain (footer)
>
>
> But mm 2 had:
>
> multipart/mixed
> text/plain (the digest heading)
> text/plain (the TOC)
> multipart/digest <--- this is the part that's gone in mm3
> message/rfc822
> message-1
> message/rfc822
> message-2
> ...
> text/plain (footer)
>
> So was that removal intentional, a bug or ??
>
> Maybe you're saying there is definitely an unexposed (in Postorius)
> knob for that in mm3.
>
> >
> > It is the intent that Postorius will eventually expose all these
> > settings. We're not there yet. At present you could possibly do this by
> > interacting with mailmanclient, although I'm not certain the settings
> > are exposed there. You can do it via bin/mailman shell if you have
> > access and know what you're doing (see
> > <http://mailman.readthedocs.io/en/release-3.0/src/mailman/runners/docs/diges…>)
> >
> > If you file an issue at
> > <https://gitlab.com/mailman/postorius/issues/new>, it might help
> > expedite this.
>
> Okay.
> _______________________________________________
> Mailman-users mailing list
> mailman-users(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
9 years, 6 months
Several Postorius errors over the weekend
by Andrew Hodgson
Hi.
I've had several Postorius error messages which have resulted in an email. Is this someone up to mischief or have I missed a configuration somewhere? We had several of these over a short period and nothing since then which makes me think someone was running a script on the endpoint, but would be interested in confirmation from those that know better.
Thanks.
Andrew.
Internal Server Error: /accounts/login/
TemplateDoesNotExist at /accounts/login/ 429.html
Request Method: HEAD
Request URL: http://lists.hodgsonfamily.org/accounts/login/?next=%2F%61%63%63%6F%75%6E%7…
Django Version: 4.2.13
Python Executable: /opt/mailman/venv/bin/python3 Python Version: 3.12.3 Python Path: ['/opt/mailman', '/', '/opt/mailman/venv/bin', '/etc/mailman3', '/usr/lib/python312.zip', '/usr/lib/python3.12', '/usr/lib/python3.12/lib-dynload', '/opt/mailman/venv/lib/python3.12/site-packages', '/usr/local/lib/python3.12/dist-packages', '/usr/lib/python3/dist-packages', '/etc/mailman3'] Server time: Fri, 09 Aug 2024 15:32:41 +0000 Installed Applications:
['hyperkitty',
'postorius',
'django_mailman3',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount']
Installed Middleware:
('allauth.account.middleware.AccountMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django_mailman3.middleware.TimezoneMiddleware',
'postorius.middleware.PostoriusMiddleware')
Template loader postmortem
Django tried loading these templates, in this order:
Using engine django:
This engine did not provide a list of tried templates.
Traceback (most recent call last):
File "/opt/mailman/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/allauth/decorators.py", line 10, in wrap
resp = ratelimit.consume_or_429(request, action=action, **rl_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/allauth/core/ratelimit.py", line 140, in consume_or_429
return handler429(request)
^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/allauth/core/ratelimit.py", line 125, in _handler429
return render(request, "429." + app_settings.TEMPLATE_EXTENSION, status=429)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/template/loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/template/loader.py", line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception Type: TemplateDoesNotExist at /accounts/login/ Exception Value: 429.html Raised during: allauth.account.views.LoginView Request information:
USER: AnonymousUser
GET:
next = '/accounts/login//**/AND/**/(SELECT/**/DIFFERENCE(NULL,NULL))/**/IS/**/NULL--/**/CiLH'
POST: No POST data
FILES: No FILES data
COOKIES:
csrftoken = '********************'
META:
CSRF_COOKIE = 'ArmbEBfvw1lQgbvFKczV9km53k5UFC6G'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip'
HTTP_CONNECTION = 'close'
HTTP_COOKIE = '********************'
HTTP_HOST = 'lists.hodgsonfamily.org'
HTTP_USER_AGENT = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.04 (lucid) Firefox/3.6.15 FirePHP/0.5'
HTTP_X_FORWARDED_FOR = '141.98.255.143'
PATH_INFO = '/accounts/login/'
QUERY_STRING = 'next=%2F%61%63%63%6F%75%6E%74%73%2F%6C%6F%67%69%6E%2F%2F%2A%2A%2F%41%4E%44%2F%2A%2A%2F%28%53%45%4C%45%43%54%2F%2A%2A%2F%44%49%46%46%45%52%45%4E%43%45%28%4E%55%4C%4C%2C%4E%55%4C%4C%29%29%2F%2A%2A%2F%49%53%2F%2A%2A%2F%4E%55%4C%4C%2D%2D%2F%2A%2A%2F%43%69%4C%48'
RAW_URI = '/accounts/login/?next=%2F%61%63%63%6F%75%6E%74%73%2F%6C%6F%67%69%6E%2F%2F%2A%2A%2F%41%4E%44%2F%2A%2A%2F%28%53%45%4C%45%43%54%2F%2A%2A%2F%44%49%46%46%45%52%45%4E%43%45%28%4E%55%4C%4C%2C%4E%55%4C%4C%29%29%2F%2A%2A%2F%49%53%2F%2A%2A%2F%4E%55%4C%4C%2D%2D%2F%2A%2A%2F%43%69%4C%48'
REMOTE_ADDR = '127.0.0.1'
REMOTE_PORT = '35918'
REQUEST_METHOD = 'HEAD'
SCRIPT_NAME = ''
SERVER_NAME = '127.0.0.1'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
SERVER_SOFTWARE = 'gunicorn/22.0.0'
gunicorn.socket = <socket.socket fd=4, family=2, type=1, proto=0, laddr=('127.0.0.1', 8000), raddr=('127.0.0.1', 35918)> wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7dddf0dddf60> wsgi.file_wrapper = <class 'gunicorn.http.wsgi.FileWrapper'> wsgi.input = <gunicorn.http.body.Body object at 0x7dddf0dde540> wsgi.input_terminated = True wsgi.multiprocess = False wsgi.multithread = False wsgi.run_once = False wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'
Settings:
Using settings module settings
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_UNIQUE_EMAIL = True
ADMINS = "(('Mailman Suite Admin', 'andrew(a)hodgson.io'),)"
ALLOWED_HOSTS = ['localhost', 'lists.hodgsonfamily.org'] APPEND_SLASH = True AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = PosixPath('/opt/mailman/web') CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
COMPRESSORS = {'css': 'compressor.css.CssCompressor', 'js': 'compressor.js.JsCompressor'} COMPRESS_CACHEABLE_PRECOMPILERS = '()'
COMPRESS_CACHE_BACKEND = 'default'
COMPRESS_CACHE_KEY_FUNCTION = '********************'
COMPRESS_CLEAN_CSS_ARGUMENTS = ''
COMPRESS_CLEAN_CSS_BINARY = 'cleancss'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = ''
COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_FILTERS = {'css': ['compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.rCSSMinFilter'], 'js': ['compressor.filters.jsmin.rJSMinFilter']}
COMPRESS_JINJA2_GET_ENVIRONMENT = <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7dddf3f61440> COMPRESS_MINT_DELAY = 30 COMPRESS_MTIME_DELAY = 10 COMPRESS_OFFLINE = True COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/static/'} COMPRESS_OFFLINE_MANIFEST = 'manifest.json'
COMPRESS_OFFLINE_MANIFEST_STORAGE = 'compressor.storage.OfflineManifestFileStorage'
COMPRESS_OFFLINE_MANIFEST_STORAGE_ALIAS = 'compressor-offine'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = "(('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'))"
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/opt/mailman/web/static'
COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage'
COMPRESS_STORAGE_ALIAS = 'compressor'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/static/'} COMPRESS_URL = '/static/'
COMPRESS_URL_PLACEHOLDER = '/__compressor_url_placeholder__/'
COMPRESS_VERBOSE = False
COMPRESS_YUGLIFY_BINARY = 'yuglify'
COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal'
COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal'
COMPRESS_YUI_BINARY = 'java -jar yuicompressor.jar'
COMPRESS_YUI_CSS_ARGUMENTS = ''
COMPRESS_YUI_JS_ARGUMENTS = ''
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_MASKED = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = ['https://lists.hodgsonfamily.org']
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mailman', 'USER': 'mailman', 'PASSWORD': '********************', 'HOST': 'localhost', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'CONN_HEALTH_CHECKS': False, 'OPTIONS': {}, 'TIME_ZONE': None, 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}}} DATABASE_ROUTERS = [] DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATA_UPLOAD_MAX_NUMBER_FILES = 100 DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] DEBUG = False DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = '.'
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_EXCEPTION_REPORTER = 'django.views.debug.ExceptionReporter'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'postorius(a)lists.hodgsonfamily.org'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = 420
FILE_UPLOAD_TEMP_DIR = None
FILTER_VHOST = False
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
HAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': '/opt/mailman/web/fulltext_index'}}
HYPERKITTY_ENABLE_GRAVATAR = True
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount'] INTERNAL_IPS = [] LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ar-dz', 'Algerian Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('ckb', 'Central Kurdish (Sorani)'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('ig', 'Igbo'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('ky', 'Kyrgyz'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('ms', 'Malay'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tg', 'Tajik'), ('th', 'Thai'), ('tk', 'Turkmen'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] LANGUAGES_BIDI = ['he', 'ar', 'ar-dz', 'ckb', 'fa', 'ur'] LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_HTTPONLY = False
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LANGUAGE_COOKIE_SAMESITE = None
LANGUAGE_COOKIE_SECURE = False
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'file': {'level': 'INFO', 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': '/opt/mailman/web/logs/mailmanweb.log', 'formatter': 'verbose', 'when': 'midnight', 'backupCount': 5}, 'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}}, 'loggers': {'django.request': {'handlers': ['mail_admins', 'file'], 'level': 'ERROR', 'propagate': True}, 'django': {'handlers': ['file'], 'level': 'ERROR', 'propagate': True}, 'hyperkitty': {'handlers': ['file'], 'level': 'DEBUG', 'propagate': True}, 'postorius': {'handlers': ['console', 'file'], 'level': 'INFO'}, 'q': {'level': 'WARNING', 'propagate': False, 'handlers': ['console', 'file']}}, 'formatters': {'verbose': {'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}} LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = 'list_index'
LOGIN_URL = 'account_login'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = 'account_logout'
MAILMAN_ARCHIVER_FROM = "('127.0.0.1', '::1')"
MAILMAN_ARCHIVER_KEY = '********************'
MAILMAN_REST_API_PASS = '********************'
MAILMAN_REST_API_URL = '********************'
MAILMAN_REST_API_USER = '********************'
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = '/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MESSAGE_TAGS = {40: 'danger'}
MIDDLEWARE = "('allauth.account.middleware.AccountMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')"
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT = '********************'
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
PREPEND_WWW = False
Q_CLUSTER = {'retry': 360, 'timeout': 300, 'save_limit': 100, 'orm': 'default', 'workers': 2} ROOT_URLCONF = 'mailman_web.urls'
SECRET_KEY = '********************'
SECRET_KEY_FALLBACKS = '********************'
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin'
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_REFERRER_POLICY = 'same-origin'
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'postorius(a)lists.hodgsonfamily.org'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_ID = 1
SOCIALACCOUNT_PROVIDERS = {'openid': {'SERVERS': [{'id': 'yahoo', 'name': 'Yahoo', 'openid_url': 'http://me.yahoo.com'}]}, 'google': {'SCOPE': ['profile', 'email'], 'AUTH_PARAMS': {'access_type': 'online'}}, 'facebook': {'METHOD': 'oauth2', 'SCOPE': ['email'], 'FIELDS': ['email', 'name', 'first_name', 'last_name', 'locale', 'timezone'], 'VERSION': 'v2.4'}} STATICFILES_DIRS = '()'
STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'compressor.finders.CompressorFinder')"
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/opt/mailman/web/static'
STATIC_URL = '/static/'
STORAGES = {'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'}, 'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'}}
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.template.context_processors.csrf', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django_mailman3.context_processors.common', 'hyperkitty.context_processors.common', 'postorius.context_processors.postorius']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE = 'UTC'
USE_DEPRECATED_PYTZ = False
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'mailman_web.wsgi.application'
X_FRAME_OPTIONS = 'DENY'
YEAR_MONTH_FORMAT = 'F Y'
1 year, 3 months
Re: Postorius no connection to REST API
by Abhilash Raj
Apologies for the top-post in advance.
So, I am still catching up to this and I don’t very well understand apache2 config, so I’ll try to briefly describe what the setup should be and perhaps it can be translated into apache2 config. Since this thread is mostly about Web stuff, I am not going to talk about mail setup, but replacing `web server` with `mta` and appropriate port changes are the only major differences in mail setup.
Postorius (using Django library/web framework) speaks WSGI and can be run using a WSGI Server. There are multiple options for choosing a WSGI server like uwsgi, gunicorn etc. There are also some common web server plugins like mod_wsgi, which are essentially WSGI servers implemented as Apache2 plugin.
Web server reverse proxies the WSGI server which runs Postorius/Hyperkitty. You want WSGI Server to be configured to listen on either a socket or a port and then also configure web server to reverse proxy the socket or port.
*Ideally* you want to terminate TLS/SSL at the web server level and proxy the HTTP request to the local WSGI server. You don’t need to do anything special for Mailman for SSL if you do this, just follow the regular Web server documentation for SSL for any domains you are supporting in Mailman.
If you don’t want to terminate TLS at web server and instead want it down to the last step, WSGI server itself, then the setup is something we don’t have any docs for at the moment but if you go to the respective WSGI server’s docs, I think you’ll find some.
uwsgi is a WSGI server implementation, but it is a lot more than that, resulting in a bit more complicated configuration and issues, even though it is stable. The documentation for it exists, but it can be hard to parse if you don’t know a lot about WSGI stuff.
A few notable things about uWSGI that Mailman documentation uses are, (1) Ability to manage a daemon process like systemd and (2) ability to speak a new custom protocol called uWSGI with Web Server instead of HTTP that most other WSGI servers use to talk to Web Servers.
(1): This is specified as a part of the the “attach-daemon” configuration in the uwsgi.ini file. For Mailman, we use
# Setup the django_q related worker processes.
attach-daemon = /opt/mailman/venv/bin/mailman-web qcluster
Which will essentially start `mailman-web qcluster` command which starts and a daemon and manage that daemon. Putting it in the uWSGI makes it easy to manage the lifecycle of this and the WSGI server together. If you were using something else like gunicorn, this would be a separate systemd service which you’d start/stop along with mailman-web.
(2): This is *probably* what is causing the issue for you from what I can gather in this thread, but I am not sure. Web Server <—> uWSGI communication can be either HTTP or (named exactly same as the package name itself, which causes confusion I suppose) uWSGI protocol. Depending on how you configure uWSGI, you want to update your web server configuration to talk the same protocol.
```
uwsgi-socket = /run/mailman3-web/uwsgi.sock
or
uwsgi-socket = 0.0.0.0:8000
```
is the config to talk uwsgi protocol and you want to configure Web server to Proxy using the same protocol. You can find that in the uwsgi docs here: https://uwsgi-docs.readthedocs.io/en/latest/Apache.html You probably need an apache module to speak uwsgi, the docs should have the details.
Notice the URL is uwsgi:// instead of http://.
Other way is to configure uWSGI to speak HTTP, which can be done by replacing "uwsgi-socket" by "http-socket” in the uwsgi.ini configuration. This might be the easiest for you to try, do make sure to restart the mailman-web service after making the change in uwsgi.ini.
Abhilash
> On Aug 16, 2021, at 9:34 AM, Stephen J. Turnbull <turnbull.stephen.fw(a)u.tsukuba.ac.jp> wrote:
>
> Richard,
>
> Thanks for the details and the pointer to the full configs. That
> makes it possible to take a look, but I can't spend much time on it
> until next week.
>
> I'll see if I can prod Abhilash who is more expert than I on all this
> stuff (I just use mod_wsgi), but there's some more urgent (sorry, but
> it's security) stuff going on, and his absence speaks for his $DAYJOB,
> I guess.
>
> Richard Rosner writes:
>> That is entirely possible @Stephen. You can see the entire apache config a few posts back plus the additions from @Mark and mine from the last post. As I interpret it, apache is reverse proxying to the uwsgi app, now through http instead of the socket. But I have no idea if that's the right way round. I'm not sure is the config file templates for apache, nginx and uwsgi that you get with the Debian packages are added by the Debian team or if they are there any way and just have been modified to the Debian file layout, but I'd guess either way it's not that likely that they wrote it the wrong way around. But I'm not too experienced to be able to translate the nginx config to apache to see if that would result in something different.
>>
>> Also, while the nginx config is written as a standalone website, the apache config seems to have been written to just create a /mailman3 site under an existing website, while I use it as a standalone site. So it's entirely possible that I missed something when I modified the website from mailman2 to serve mailman3, but then it shouldn't have been able to show the website at the beginning.
>> _______________________________________________
>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>
>>
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
--
thanks,
Abhilash Raj (maxking)
4 years, 3 months