
Re: Struggle on upgrading mailman3-web to new version - Not Found: /mailman//
by Eggert Ehmke
This makes it even stranger. Removing the trailing / did not help in my case,
but replacing the mailman3 for mailman in the ProxyPass line did.
Would be really nice to solve this problem at the root.
Am Montag, 25. Oktober 2021, 18:09:21 CEST schrieb Mark Sapiro:
> On 10/25/21 1:45 AM, Stefan Bauer wrote:
> > Dear Users,
> >
> > I recently upraded mailman3 from Ubuntu 18 to 20. After accessing the
> > web-interface via
> >
> > https://my.mailinglistserver.local/mailman3/postorius/lists/
> >
> > I receive
> >
> > Not Found: /mailman//postorius/lists/
> > [pid: 1346851|app: 0|req: 4/4] 10.254.253.12 () {70 vars in 1369 bytes}
> > [Mon Oct 25 10:39:59 2021] GET /mailman3/postorius/lists/ => generated
> > 2821
> > bytes in 12 msecs (HTTP/1.1 404) 5 headers in 155 bytes (1 switches on
> > core
> > 1)
> >
> > Where does the wrong path come from (mailman vs. mailman3)
>
> See the thread at
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/U
> SXUYZYB5KIXT37APMCOAUZLKBRPARTL/
>
> ...
>
> > <IfModule mod_proxy_uwsgi.c>
> > ProxyPass /mailman3/favicon.ico !
> > ProxyPass /mailman3/static !
> > ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost/
> > </IfModule>
>
> Others have found that removing the trailing slash from
>
> ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost/
>
> to make it
>
> ProxyPass /mailman3 unix:/run/mailman3-web/uwsgi.sock|uwsgi://localhost
>
> fixes the issue.
3 years, 9 months

User account issue after importing data from Mailman 2.x server
by dgoldsmith@sans.org
We finally migrated from Mailman 2.x to a Mailman 3.x several months ago. We have had some issues with people who are active list members not being able to login with their user creds and when trying to use the 'Forgot Password' link to reset, being told their user account does not exist. They can submit email to the list and get copied on other list traffic.
I just started looking at a user and a list in both the Postorius and Django admin web UIs and found:
- in Postorius:
- list exists, has 20K plus subscribed members and has 3 list owners
- user exists and is subscribed to this list
- in Django:
- in HyperKitty section
- in the Mailing lists page, the list exists, no idea about members BUT it has 147 owners (also the same 147 moderators)
- in the Emails page, there are 149K plus entries
- in the Profiles page, there are 147 entries
- in the Accounts->Email addresses page, there are only 155 entries
- in the AUTHENTICATION AND AUTHORIZATION->Users page, there are 147 entries
Should Mailman 3.x have created user accounts for everyone when importing the data from the old server?
To correct the issue on a case by case basis, can I as a server admin do something via the web UI or CLI or do we need to remove the email address from the list and ask the person to create a new account using that address and to resubscribe to the specific list or other?
Thanks,
David Goldsmith
9 months, 3 weeks

Messages not being archived
by Mark Dale
Hi
I've just installed Mailman 3 using the Debian 11 package.
Mailman-Version: 3.3.3
HyperKitty version 1.3.4
Postorius Version 1.3.4
The first list that I've added is receiving and sending mail okay, however the messages are not being archived.
The logs report a HyperKitty error. I've copy-pasted that in at the end of this email.
I've checked the following:
==============================
/etc/mailman3/mailman.cfg contains:
[archiver.hyperkitty]
class: mailman_hyperkitty.Archiver
enable: yes
configuration: /etc/mailman3/mailman-hyperkitty.cfg
=============================
The list has archiving configured on in Postorius.
- Archive policy: Private archives
- Active archivers: hyperkitty
=============================
/etc/mailman3/mailman-hyperkitty.cfg has:
[general]
base_url: https://lists.mydomain.com/mailman3/archives
#base_url: https://lists.mydomain.com/mailman3/hyperkitty/
api_key: aaaaaaaaaaaaaaaaaaaaaa
=============================
/usr/share/mailman3-web/settings_local.py contains:
ALLOWED_HOSTS = [
"localhost",
'*'
]
MAILMAN_ARCHIVER_KEY = 'aaaaaaaaaaaaaaaaaaaaaa'
=============================
The headers of the emails received from the list show blanks for Archived-At and List-Archive:
X-Mailman-Version: 3.3.3
Precedence: list
Archived-At: <>
List-Archive: <>
=============================
/var/log/mailman3/mailman.log
The errors in the log contain messages (that I'm clueless about) regarding HyperKitty.
Sep 20 01:05:54 2022 (1293) HyperKitty failure on https://lists.mydomain.com/mailman3/archives/api/mailman/archive
Sep 20 01:05:54 2022 (1293) Exception in the HyperKitty archiver: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
...
<title>503 Service Unavailable</title>
...
Sep 20 01:05:54 2022 (1293) Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 154, in _archive_message
url = self._send_message(mlist, msg)
File "/usr/lib/python3/dist-packages/mailman_hyperkitty/__init__.py", line 210, in _send_message
raise ValueError(result.text)
...
=============================
If anyone can point me in the right direction to get the archive happening, that'd be grand.
Cheers,
Mark
2 years, 10 months

Re: Installing mailman 3
by Rafael Mora
I want to use Mailman to send emails to our customers.
I´m getting this error when I click on sign up and log in:
FilterError at /accounts/login/
/bin/sh: sassc: command not found
Request Method: GET
Request URL: http://192.168.1.42:8000/accounts/login/?next=/postorius/lists/
Django Version: 1.11.3
Exception Type: FilterError
Exception Value:
/bin/sh: sassc: command not found
Exception Location:
/var/lib/mailman/env2/lib/python2.7/site-packages/compressor/filters/base.py
in input, line 196
Python Executable: /var/lib/mailman/env2/bin/python2
Python Version: 2.7.5
What's missing???
El vie., 21 jul. 2017 a las 19:57, Mark Sapiro (<mark(a)msapiro.net>)
escribió:
> On 07/21/2017 04:57 PM, Rafael Mora wrote:
> > Should Sign Up ?? Log In??
>
>
> Yes.
>
>
> > El vie., 21 jul. 2017 a las 18:56, Rafael Mora (<
> rafael.mora.guti(a)gmail.com>)
> > escribió:
> >
> >> Nice! Up and running!
> >>
> >> How do I start using mailman? what are the steps??
>
>
> What do you want to do with Mailman? This is the key question.
>
> There is some list subscriber documentation at
> <http://docs.list.org/en/latest/userguide.html>.
>
> You can create domains and lists via Postorius or via the core's
> bin/mailman commands ('bin/mailman --help' for a list).
>
> --
> Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
> San Francisco Bay Area, California better use your sense - B. Dylan
> _______________________________________________
> Mailman-users mailing list
> mailman-users(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>
--
Atentamente / Best Regards
Ing. Rafael Mora
8 years

Re: Confirmation emails to Users has wrong domain name (example.com!)
by Abhilash Raj
> On Sep 29, 2021, at 2:34 PM, Odhiambo Washington <odhiambo(a)gmail.com> wrote:
>
> On Wed, Sep 29, 2021 at 8:31 PM Mark Sapiro <mark(a)msapiro.net> wrote:
>
>> On 9/29/21 9:50 AM, Odhiambo Washington wrote:
>>> 1. Confirmation emails to Users has wrong domain name (example.com!)
>>> <https://docs.mailman3.org/en/latest/faq.html#id1>
>>> <
>> https://docs.mailman3.org/en/latest/faq.html#confirmation-emails-to-users-h…
>>>
>>>
>>> This happens when your reverse (SSL) proxy isn’t setting up the correct
>>> headers when proxying requests. Fix this by setting the right
>>> proxy_set_header directives:
>> ...
>>> How is this supposed to be mitigated in Apache when using WSGI?
>>>
>>> My config:
>>>
>>> WSGIDaemonProcess hyperkitty threads=25 python-path=/usr/local/mailman
>>> user=mailman group=mailman
>>> WSGIPythonHome "/usr/local"
>>> WSGIProcessGroup hyperkitty
>>
>>
>> You are using mod_wsgi and not proxying at all, so this is not relevant
>> in your case.
>>
>> Are you actually seeing this issue? If so, it might be related to
>>
>> https://docs.mailman3.org/en/latest/faq.html#the-domain-name-displayed-in-h…
>>
>
> My issue is related to this, but the documentation referred to is not for
> the faint-hearted!
> I can't make head or tails of it.
Click on “Domain” in Postorius from the top bar, which should take you to the Domains page.
For your domain (in the “Mail Host” column), see the corresponding “Web Host” column, it should look something like:
lists.mailman3.org (lists.mailman3.org)
(Edit)
SITE_ID = 1
on a new-ish version of Postorius.
If it doesn’t show the right values and instead shows “example.com” for you, click on the “Edit” link, which will take
you to a page that will allow you to edit both the values.
In that page, you can update “Domain name” to whatever your domain is (lists.xxx.xxx) and then “Display Name” can be anything else you want or the domain name itself. Click “Save” and then Click on “View Site” in the top right corner of the page to go back to Postorius.
Abhilas
>
>
> --
> Best regards,
> Odhiambo WASHINGTON,
> Nairobi,KE
> +254 7 3200 0004/+254 7 2274 3223
> "Oh, the cruft.", egrep -v '^$|^.*#' :-)
> _______________________________________________
> 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)
3 years, 10 months

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, 3 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]
1 year, 8 months

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, 7 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, 7 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/
>
3 years, 8 months