
Re: Login confusion
by Stephen J. Turnbull
Markus Grandpré writes:
> Dear Steve, dear list
>
> > That's not true on the systems I've worked with most recently -- those
> > will be recognized as duplicate addresses (...)
>
> You are right. I am sorry for this confusion. Please let me correct my
> initial posting to this list from yesterday, saying:
>
> >> (...) <markus.grandpre(a)uni-konstanz.de> and
> <Markus.Grandpre(a)uni-konstanz.de> are being recognized as separate
> identities.
>
> That is not the case. Meanwhile I discovered an error with logging into
> Postorius when an account is associated with two semantically identical
> email addresses that differ in their formatting, e.g.,
Yes. Apparently this is a problem of a policy difference between
Mailman 3 and the Django allauth package, as Bernhard Lichtinger
pointed out in
<https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…>
allauth takes the point of view that the localpart of an email address
is the "property" of the provider of the mailbox, and therefore should
be taken verbatim by third parties. Mailman takes the more practical
point of view that, in practice, almost all providers treat localparts
as case insensitive. (Some -- Gmail, grrrrr -- go farther and ignore
whole characters such as periods.) The problem is that users treat
email addresses as case insensitive, and aren't very careful about
using the same case every time. That's why I think the Mailman
approach is appropriate.
> To resolve the issue, the only solution I found was to manually delete
> the second email address from the database:
That will work in the short run, but I'm not sure that's a long-term
solution. It's not clear to me that allauth won't do the same thing
again.
> Could I have achieved the same deletion using the REST interface?
I don't know. I would think not. I suspect Mailman code can only
find the lowercase version. Mark has a script that looks for such
duplicates using psycopg, not mailmanclient, so it accesses the
database via the PostgreSQL API, not Mailman's REST API. It deletes
any duplicate that is not all-lowercase:
https://github.com/pennersr/django-allauth/issues/3019#issuecomment-2440231…
> I am not entirely sure how the duplicate email address came into the
> system.
allauth did it. It's explained in the issue where Mark's script is
attached. It's not very easy to follow the discussion, though. And
there's something weird going on because in your stack trace, it
appears that allauth is doing a case insensitive database search. So
I would just grab the script and run it, in case there are other users
with extra addresses that compare equal when comparison is case
insensitive.
> I apologize again for the incorrect information in my initial message to
> this list.
No need to apologize. It's extremely complicated. Of course we're
happy if you look around and figure out most of it for us!
Steve
8 months, 1 week

Internal Server Error: /mailman3/accounts/fedora/login/
by Alain D D Williams
Twice today I have received many (50+) emails like the one below.
Many at about 1pm, then it stopped now I am getting them again.
An Internet search does not bring up anything useful.
The domain at the start of 'Request URL' varies as does the name of the list
(in this example 'announce(a)leavesden.org') The domain of the list is not
necessarily the same as the domain at the start of the URL.
I can receive several in a minute.
Anyone any idea ?
----- Forwarded message from root(a)bf2024.phcomp.co.uk -----
Date: Mon, 02 Dec 2024 22:19:12 -0000
From: root(a)bf2024.phcomp.co.uk
To: root@localhost
Subject: [Django] ERROR (EXTERNAL IP): Internal Server Error: /mailman3/accounts/fedora/login/
Internal Server Error: /mailman3/accounts/fedora/login/
TypeError at /accounts/fedora/login/
OpenIDProvider.get_server_settings() missing 1 required positional argument: 'endpoint'
Request Method: GET
Request URL: https://www.leavesden.org.uk/mailman3/accounts/fedora/login/?next=%2Fmailma…
Django Version: 3.2.19
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.11.2
Python Path: ['.', '', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.11/dist-packages']
Server time: Mon, 02 Dec 2024 22:19:07 +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',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount',
'django_mailman3.lib.auth.fedora')
Installed 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')
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line 47, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py", line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py", line 98, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django_mailman3/lib/auth/fedora/views.py", line 56, in get
return self.post(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django_mailman3/lib/auth/fedora/views.py", line 67, in post
client = _openid_consumer(
File "/usr/lib/python3/dist-packages/allauth/socialaccount/providers/openid/views.py", line 27, in _openid_consumer
server_settings = provider.get_server_settings(endpoint)
Exception Type: TypeError at /accounts/fedora/login/
Exception Value: OpenIDProvider.get_server_settings() missing 1 required positional argument: 'endpoint'
Request information:
USER: AnonymousUser
GET:
next = '/mailman3/hyperkitty/list/announce(a)leavesden.org.uk/2020/12/'
process = 'login'
POST: No POST data
FILES: No FILES data
COOKIES: No cookie data
META:
CONTEXT_DOCUMENT_ROOT = '/var/www/leavesden/html'
CONTEXT_PREFIX = ''
DOCUMENT_ROOT = '/var/www/leavesden/html'
GATEWAY_INTERFACE = 'CGI/1.1'
HTTPS = 'on'
HTTP_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8'
HTTP_ACCEPT_ENCODING = 'gzip'
HTTP_ACCEPT_LANGUAGE = 'en-us,en-gb,en;q=0.7,*;q=0.3'
HTTP_CONNECTION = 'Keep-Alive'
HTTP_HOST = 'www.leavesden.org.uk'
HTTP_USER_AGENT = 'serpstatbot/2.1 (advanced backlink tracking bot; https://serpstatbot.com/; abuse(a)serpstatbot.com)'
PATH = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'
PATH_INFO = '/accounts/fedora/login/'
QUERY_STRING = 'next=%2Fmailman3%2Fhyperkitty%2Flist%2Fannounce%40leavesden.org.uk%2F2020%2F12%2F&process=login'
REMOTE_ADDR = '144.76.69.39'
REMOTE_PORT = '33902'
REQUEST_METHOD = 'GET'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/mailman3/accounts/fedora/login/?next=%2Fmailman3%2Fhyperkitty%2Flist%2Fannounce%40leavesden.org.uk%2F2020%2F12%2F&process=login'
SCRIPT_FILENAME = 'proxy:uwsgi://localhost//accounts/fedora/login/'
SCRIPT_NAME = '/mailman3'
SCRIPT_URI = 'https://www.leavesden.org.uk/mailman3/accounts/fedora/login/'
SCRIPT_URL = '/mailman3/accounts/fedora/login/'
SERVER_ADDR = '85.119.82.114'
SERVER_ADMIN = 'addw(a)phcomp.co.uk'
SERVER_NAME = 'www.leavesden.org.uk'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/1.1'
SERVER_SIGNATURE = '********************'
SERVER_SOFTWARE = 'Apache/2.4.62 (Debian)'
SSL_TLS_SNI = 'www.leavesden.org.uk'
uwsgi.core = 1
uwsgi.node = b'bf2024.phcomp.co.uk'
uwsgi.version = b'2.0.21-debian'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = <built-in function uwsgi_sendfile>
wsgi.input = <uwsgi._Input object at 0x7f42defc8b50>
wsgi.multiprocess = False
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'https'
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', 'root@localhost'),)"
ALLOWED_HOSTS = ['*']
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 = '/usr/share/mailman3-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 0x7f42e6122700>
COMPRESS_MINT_DELAY = 30
COMPRESS_MTIME_DELAY = 10
COMPRESS_OFFLINE = True
COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/mailman3/static/'}
COMPRESS_OFFLINE_MANIFEST = 'manifest.json'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = '()'
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/var/lib/mailman3/web/static'
COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/mailman3/static/'}
COMPRESS_URL = '/mailman3/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_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 = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailman3web', 'USER': 'mailman3web', 'PASSWORD': '********************', 'HOST': 'localhost', 'PORT': '', 'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", 'charset': 'utf8mb4'}, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, '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 = 'mailman3(a)bf2024.phcomp.co.uk'
DEFAULT_HASHING_ALGORITHM = 'sha256'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAILNAME = 'bf2024.phcomp.co.uk'
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': '/var/lib/mailman3/web/fulltext_index'}}
HOSTNAME = 'localhost'
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', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount', 'django_mailman3.lib.auth.fedora')"
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'), ('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'), ('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', 'fa', 'ur']
LANGUAGE_CODE = 'en-gb'
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.RotatingFileHandler', 'filename': '/var/log/mailman3/web/mailman-web.log', 'formatter': 'verbose'}, 'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}}, 'loggers': {'django.request': {'handlers': ['mail_admins', 'file'], 'level': 'INFO', 'propagate': True}, 'django': {'handlers': ['file'], 'level': 'INFO', 'propagate': True}, 'hyperkitty': {'handlers': ['file'], 'level': 'INFO', 'propagate': True}, 'postorius': {'handlers': ['file'], 'level': 'INFO', 'propagate': True}}, '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 = '/mailman3/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MESSAGE_TAGS = {40: 'danger'}
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')"
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost/mailman3/'
PREPEND_WWW = False
Q_CLUSTER = {'timeout': 300, 'retry': 400, 'save_limit': 100, 'orm': 'default', 'poll': 5}
ROOT_URLCONF = 'urls'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = True
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 = 'root(a)bf2024.phcomp.co.uk'
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.PickleSerializer'
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 = {}
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 = '/var/lib/mailman3/web/static'
STATIC_URL = '/mailman3/static/'
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_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'wsgi.application'
X_FRAME_OPTIONS = 'DENY'
YEAR_MONTH_FORMAT = 'F Y'
----- End forwarded message -----
--
Alain Williams
Linux/GNU Consultant - Mail systems, Web sites, Networking, Programmer, IT Lecturer.
+44 (0) 787 668 0256 https://www.phcomp.co.uk/
Parliament Hill Computers. Registration Information: https://www.phcomp.co.uk/Contact.html
#include <std_disclaimer.h>
10 months, 2 weeks

New installation, new issue: mailman3 migrate -- no module CommonMark
by Bill Oliver
My Ubuntu 24.04 installation is working great, and I have a list
running perfectly. I'm now trying to install mailman3 on an older
server, this time runing ubuntu 22.04. I'm following the venv
installation instructions again, but suddenly came up with a new error.
I've made it to the "Run database migrations" section I run
mailmanweb-migrate and get:
(venv) mailman@mail:~$ mailman-web migrate
Traceback (most recent call last):
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/template/backends/django.py", line 128, in
get_package_libraries
module = import_module(entry[1])
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in
import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in
_find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in
exec_module
File "<frozen importlib._bootstrap>", line 241, in
_call_with_frames_removed
File "/opt/mailman/venv/lib/python3.10/site-
packages/postorius/templatetags/markdown.py", line 21, in <module>
from readme_renderer import markdown as md_render
File "/opt/mailman/venv/lib/python3.10/site-
packages/readme_renderer/markdown.py", line 16, in <module>
from CommonMark import commonmark
ModuleNotFoundError: No module named 'CommonMark'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/mailman/venv/bin/mailman-web", line 8, in <module>
sys.exit(main())
File "/opt/mailman/venv/lib/python3.10/site-
packages/mailman_web/manage.py", line 87, in main
execute_from_command_line(sys.argv)
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/__init__.py", line 442, in
execute_from_command_line
utility.execute()
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/__init__.py", line 436, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/base.py", line 412, in run_from_argv
self.execute(*args, **cmd_options)
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/base.py", line 458, in execute
output = self.handle(*args, **options)
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/base.py", line 106, in wrapper
res = handle_func(*args, **kwargs)
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/commands/migrate.py", line 100, in
handle
self.check(databases=[database])
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/management/base.py", line 485, in check
all_issues = checks.run_checks(
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/checks/registry.py", line 88, in run_checks
new_errors = check(app_configs=app_configs, databases=databases)
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/core/checks/templates.py", line 60, in
check_for_template_tags_with_the_same_name
for module_name, module_path in get_template_tag_modules():
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/template/backends/django.py", line 105, in
get_template_tag_modules
for name in get_package_libraries(pkg):
File "/opt/mailman/venv/lib/python3.10/site-
packages/django/template/backends/django.py", line 130, in
get_package_libraries
raise InvalidTemplateLibrary(
django.template.library.InvalidTemplateLibrary: Invalid template
library specified. ImportError raised when trying to load
'postorius.templatetags.markdown': No mod
ule named 'CommonMark'
I know nothing about CommonMark.
Since I've suffered the error cascade problem of trying to fix things
and just making it worse, I stopped here.
Can I ignore this error, or what can I do to fix it?
Thanks!
billo
11 months, 3 weeks

Re: Apache Conf
by Thomas G
Yes, of course.
Nginx and Apache works on the same server. (Nginx is stopped)
I would like switch to Apache to add in front of hyperkitty a ldap
connection.
I need to re-compile nginx for this feature. It's directly available in
apache with a module.
In fact, a tried directly to integrade LDAP with django (
https://gitlab.com/mailman/postorius/issues/132) without results.
Le ven. 19 oct. 2018 à 20:18, Abhilash Raj <maxking(a)asynchronous.in> a
écrit :
>
>
> On Fri, Oct 19, 2018, at 12:17 PM, Thomas G wrote:
> > Hi tried both.
> >
> > Same result.
> >
> > xxxx - - [19/Oct/2018:21:14:22 +0200] "GET /static/postorius/js/script.js
> > HTTP/1.1" 404 4051 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:60.0)
> > Gecko/20100101 Firefox/60.0"
>
>
> And, you have verified that the files exist at `/opt/mailman/static` on
> your host?
>
> >
> >
> > Le ven. 19 oct. 2018 à 18:59, Mark Sapiro <mark(a)msapiro.net> a écrit :
> >
> > > On 10/19/18 10:29 AM, Guiseppin Thomas wrote:
> > > > Hi,
> > > > Currently, I use a nginx configuration for mailman. It's work
> perfectly.
> > > >
> > > > I tried to do the same with Apache, but the statics files are not
> > > > delivered (404).
> > > ...
> > > > <VirtualHost *:80>
> > > > ServerName mailing.ddd.fr
> > > >
> > > > ErrorLog ${APACHE_LOG_DIR}/mailing.error.log
> > > > CustomLog ${APACHE_LOG_DIR}/mailing.access.log combined
> > > >
> > > > <Location /static/>
> > > > Alias "/opt/mailman/static/"
> > > > </Location>
> > > >
> > > > <Location />
> > > > ProxyPass http://localhost:8000/
> > > > ProxyPassReverse http://localhost:8000/
> > > > ProxyPreserveHost On
> > > > </Location>
> > > > </VirtualHost>/
> > >
> > >
> > > In Apache, location
> > > <http://httpd.apache.org/docs/2.4/mod/core.html#location> is not
> > > appropriate for resources in the file system.
> > >
> > > Try
> > >
> > > Alias /static/ /opt/mailman/static/
> > >
> > > not within a location block.
> > >
> > > --
> > > 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
> > > 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)
>
7 years

Re: [Mailman-Developers] Container Images for Mailman 3.2 release
by Abhilash Raj
On Fri, Jul 27, 2018, at 1:16 PM, Kamran Soomro wrote:
> Hi Abhilash,
>
> This is great. Thank you very much. Might I make a small suggestion? I
> think it might be less confusing to use tags for your images that
> conform to the mailman release. E.g. 3.2 should contain mailman 3.2, 3.3
> should contain mailman 3.3 etc. At the moment it’s hard to tell which
> image contains which release.
Sounds like a good idea! I will push 3.2 tags as soon as I can!
>
> Just my two cents.
>
> –Kamran
>
> > On 27 Jul 2018, at 21:08, Abhilash Raj <maxking(a)asynchronous.in> wrote:
> >
> > Hi All,
> >
> > I have updated and pushed releases for Container Images with 3.2 release of the suite.
> >
> > They are available at:
> >
> > docker.io/maxking/mailman-web:0.2
> > docker.io/maxking/mailman-core:0.2
> >
> > A similar copy of both is also available at quay:
> >
> > quay.io/maxking/mailman-web:0.2
> > quay.io/maxking/mailman-core:0.2
> >
> > The releases contain the following versions of components:
> >
> > mailman-core:
> > - Mailman Core 3.2.0
> > - Mailman-hyperkitty 1.1.0
> >
> > mailman-web:
> > - Postorius 1.2.1
> > - Hyperkitty 1.2.0
> > - Django-mailman3 1.2.0
> > - MailmanClient 3.2.0
> >
> > The upgrade process from 0.1 release should be relative painless, except for the full-text index, which needs to be rebuilt due to the migration from Python 2 to 3 of the full-text indexing library whoosh. You can run the following commands to do so, after the upgrade:
> >
> > $ docker exec -it mailman-web bash
> > bash # python manage.py rebuild_index
> >
> > If you are not using the default docker-compose.yaml file provided in the repo, you need to add an extra environment variable for mailman-web container, POSTORIUS_TEMPLATE_BASE_URL, which defaults to `http://mailman-web:8000`. It should be the URL where your mailman-web container is listening on with HTTP (port 8000 by default).
> >
> > The rolling releases are not being rolled out right everyday now, because of broken build scripts. I'd recommend everyone use the new stable releases that I mentioned above. Going forward, I'll try to release stable versions more often, so that there isn't any need for rolling version, but fixing the rolling releases is on my TODO.
> >
> > Documentation for these images is available at:
> >
> > https://github.com/maxking/docker-mailman
> >
> > --
> > thanks,
> > Abhilash Raj (maxking)
> > _______________________________________________
> > Mailman-Developers mailing list -- mailman-developers(a)python.org
> > To unsubscribe send an email to mailman-developers-leave(a)python.org
> > https://mail.python.org/mm3/mailman3/lists/mailman-developers.python.org/
> > Mailman FAQ: https://wiki.list.org/x/AgA3
> >
> > Security Policy: https://wiki.list.org/x/QIA9
--
thanks,
Abhilash Raj (maxking)
7 years, 2 months

Member name management by list owner
by mark@suburbia.org.au
Bottom line up front: site admins can do some of the things below via https://example.com/mailman3/postorius/users thanks to https://gitlab.com/mailman/postorius/-/issues/403 - I am going to include my original post, in case it helps for visibility should others come up against this in future:
--
Continuing in my initiation in the MM2.1 -> MM3 migration. I will say that while the software overall seems good, and the support in here has been excellent. I don't recall a more frustrating experience migrating a service in a long time.
One of my list moderators runs a closed list for their non-profit organisation, whose demographic is on the more 'wise' side of life. As such, the organisation's committee pretty much handles all the list management for members, who receive a distribution list newsletter. They don't promote the ability to subscribe/unsubscribe/manage list settings to their membership as for some, replying to emails can seem complicated.
It's been seen, (and based on the thread at https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/… appears to be expected) that once an email address is first associated with mailman3, that whatever that member's name is sticks, including if the name wasn't initially used. And, that if you want to change it, you need to have the member login to/created an account at https://example.com/mailman3/user-profile/.
E.g. if I as list owner/admin:
1) Add via mass subscription a new member whose email has never been seen by Mailman3 before
`Wrong Name <specificemail(a)example.com>`
2) Search members and see it listed as
`"Wrong Name" <email(a)example.com>`
3) Unsubscribe the member from the list
4) Add via mass subscription a same member with a new name
`Correct Name <specificemail(a)example.com>`
When I look at the members list it still shows
`"Wrong Name" <email(a)example.com>`
If I'm mistaken about any of the above or that does seem like a bug, feel free to let me know. Otherwise, is there any way, without expecting the members themselves to do it, for a site admin or list admin to change the name associated with an email address? I guess in order of preference, I'd like
1) list owner/admin to be able to modify list member name through web UI
2) site owner/admin to be able to modify list member name through web UI
3) list or site admin to be able to modify list member name through command line
4) direct editing of the mariaDB database. (And if this is the best option for now, if you can tell me the name of the db/table to look at it would be appreciated)
--
Back to post BLUF solution - I guess my next ask, since the site admin can modify any user's name - would it be possible for me to grant a list owner/admin the ability to change names of any user without giving them full site admin access, and perhaps add the `Manage` button to the list's members list for them?
10 months, 2 weeks

Re: Performance of member listing [was: How to remove a nonmember...]
by Abhilash Raj
On Fri, Apr 17, 2020, at 5:01 PM, Abhilash Raj wrote:
>
>
> On Fri, Apr 17, 2020, at 8:54 AM, skenny(a)scss.tcd.ie wrote:
> > Hi Steve, I replied to your personal email address earlier today. - I
> > guess it's no harm to add my reply to the thread here, so here goes:
> >
> > Hi Stephen,
> >
> > Thanks for your message. The documentation I was referring to is from
> > Gunicorn, specifically this:
> >
> > http://docs.gunicorn.org/en/latest/settings.html#timeout
> >
> > (I was led to it by Abhilash's reference in the thread).
>
> Did you also add the config file in mailman.cfg
>
> [webservice]
> # Configuration for webservice.
> configuration: /path/to/gunicorn.cfg
>
> This is needed to notify Mailman of the new configuration file that you
> added. And then format and options of the config file is the URL that
> you already mentioned above. This information should be documented
> somewhere, I'll create a bug report for that.
>
> >
> > As for the length of the list, I'm talking about in the region of 1,800 members.
> >
> > When I say "pretty slow", I mean that it takes about 2.5 minutes to
> > return the list of
> > members via the REST API.
Which database backend are you using? The performance would definitely vary with different database backend but 2.5minutes in my opinion is too slow, even for the slowest SQLite database backend.
I did some benchmarking and with a SQLite database, I created a MailingList with abour 2200 members and 2000 non-members.
In [18]: %time mlist.members
CPU times: user 19.9 ms, sys: 975 µs, total: 20.9 ms
Wall time: 9.59 s
In [19]: %time mlist.nonmembers
CPU times: user 16 ms, sys: 2.88 ms, total: 18.8 ms
Wall time: 7.33 s
I don't think the list you have should be taking 2.5 minutes at all unless there is something seriously wrong.
Note that the above numbers are without pagination. My paginated Postorius page load times for nonmembers page is (from Firefox console):
5 requests 213.87 KB / 41.76 KB transferred Finish: 1.20 s
> >
> > I'm not sure I understand your last paragraph - "paginated interface"
> > and "at the receiving end"
> > don't make much sense to me at present. I should add however that I am
> > pretty novice when
> > it comes to all of this (and Python programming too). It took me a
> > while to understand
> > the difference between accessing Mailman3 via the REST API versus
> > mailman shell - for example!
> >
> > Stephen
> > _______________________________________________
> > 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)
--
thanks,
Abhilash Raj (maxking)
5 years, 6 months

Re: Internal Server Error: /mailman/accounts/fedora/login/
by matthew@alberti.us
Kilian,
It looks like someone (or a bot) is trying to login using Fedora as
the authentication plugin; but that plugin is not configured.
You probably want to disable/comment out the Fedora plugin
INSTALLED_APPS section in the settings_local.py file.
- Matt Alberti
-----Original Message-----
From: Kilian Kilger <kkilger(a)gmail.com>
Sent: Friday, September 17, 2021 12:24 PM
To: mailman-users(a)mailman3.org
Subject: [MM3-users] Internal Server Error: /mailman/accounts/fedora/login/
Hi mailing list,
I own a mailman box. I regularily (many times a day) get mail with an
internal server error. I am using Debian and the included mailman3-full
package. I guess someone tries to hack my instance. But I don't understand
why this leads to the internal server error.
I am also wondering why the request URL is /mailman/accounts/fedora/login,
as I am using Debian (understandable if the request happens via an outside
trigger). I have no clue about the internal workings of mailman though. I
use Debian 11 bullseye and thus version 3.3.3. I can trigger the internal
server error by myself by visiting the request URL. Despite these emails the
instance seems to work fine.
Best regards,
Kilian.
Internal Server Error: /mailman/accounts/fedora/login/
TypeError at /accounts/fedora/login/
_openid_consumer() missing 2 required positional arguments: 'provider' and
'endpoint'
Request Method: GET
Request URL:
<URL>/mailman/accounts/fedora/login/?process=login&next=/mailman/accounts/pa
ssword/reset/
Django Version: 2.2.24
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.9.2
Python Path: ['.', '', '/usr/lib/python39.zip', '/usr/lib/python3.9',
'/usr/lib/python3.9/lib-dynload', '/usr/local/lib/python3.9/dist-packages',
'/usr/lib/python3/dist-packages', '/usr/lib/python3.9/dist-packages']
Server time: Fr, 17 Sep 2021 06:12:57 +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',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount',
'django_mailman3.lib.auth.fedora')
Installed 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')
Traceback:
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in
inner
34. response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in
_get_response
115. response = self.process_exception_by_middleware(e,
request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in
_get_response
113. response = wrapped_callback(request, *callback_args,
**callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py" in view
71. return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py" in
dispatch
97. return handler(request, *args, **kwargs)
File
"/usr/lib/python3/dist-packages/django_mailman3/lib/auth/fedora/views.py"
in get
56. return self.post(request, *args, **kwargs)
File
"/usr/lib/python3/dist-packages/django_mailman3/lib/auth/fedora/views.py"
in post
67. client = _openid_consumer(request)
Exception Type: TypeError at /accounts/fedora/login/ Exception Value:
_openid_consumer() missing 2 required positional
arguments: 'provider' and 'endpoint'
Request information:
USER: AnonymousUser
_______________________________________________
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, 1 month

Re: Change the default value for the General Archive Policy
by Markus Grandpré
Dear Mr Sapiro,
many thanks for your reply. When I create a mailing list without an archive, I’ve noticed that the default value under
"Settings > Archiving > Archive policy" is always set to "Public archives". I was wondering if it's possible to change
the default to "Do not archive this list" instead.
Additionally, in an earlier email, you mentioned that a more convenient way to set default values would be introduced in
an upcoming version. Could you please let me know the current status of that development?
Many thanks in advance.
Best regards,
Markus
Am 6/23/25 um 19:53 schrieb Mark Sapiro:
> On 6/23/25 08:03, Markus Grandpré wrote:
>> Dear list,
>>
>> currently, when I create a new mailing list with MM3 the value for "Archive policy" is always set to "Public
>> archives". I'd like to change the default value for "Archive policy" to "Do not archive this list". How can I do this?
>> In Debian 12 I find in </usr/lib/python3/dist-packages/postorius/forms/list_forms.py>:
> ...
>> but have no idea how to change the settings here. Your help is very appreciated.
> Are you creating the list in Postorius. If so, you have a choice for list style. Currently those choices are:
> ```
> Announce only mailing list style.
> Ordinary discussion mailing list style.
> Discussion mailing list style with private archives.
> ```
> There is currently no style for a list without archives, but you can implement one. See the thread at https://
> lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/Q6QVDWCY… for hints on how to
> do this with a plugin.
>
> Alternatively, you can do it with a patch like:
> ```
> --- a/src/mailman/styles/default.py
> +++ b/src/mailman/styles/default.py
> @@ -18,6 +18,7 @@
> """Application of list styles to new and existing lists."""
>
> from mailman.core.i18n import _
> +from mailman.interfaces.archiver import ArchivePolicy
> from mailman.interfaces.styles import IStyle
> from mailman.styles.base import (
> Announcement,
> @@ -91,3 +92,25 @@ class PrivateDefaultStyle(
> Private.apply(self, mailing_list)
> Discussion.apply(self, mailing_list)
> Moderation.apply(self, mailing_list)
> +
> +
> +@public
> +@implementer(IStyle)
> +class PublicNoArchiveStyle(
> +
> + Identity, BasicOperation, Bounces, Public, Discussion, Moderation):
> +
> + """The legacy default style with no archives."""
> +
> + name = 'legacy-default-no-archive'
> + description = _('Ordinary discussion mailing list style with no archive.')
> +
> + def apply(self, mailing_list):
> + """See `IStyle`."""
> + Identity.apply(self, mailing_list)
> + BasicOperation.apply(self, mailing_list)
> + Bounces.apply(self, mailing_list)
> + Public.apply(self, mailing_list)
> + Discussion.apply(self, mailing_list)
> + Moderation.apply(self, mailing_list)
> + mailing_list.archive_policy = ArchivePolicy.never
> ```
> If you are creating lists from the command line `mailman create`, there is a --style-name option to specify the style.
>
--
Markus Grandpré
Universität Konstanz
Kommunikations-, Informations- und Medienzentrum (KIM)
Abteilung IT-Dienste Forschung, Lehre und Infrastruktur
Sachgebiet Diensteadministration
Tel: ++49 7531 88 4342
3 months, 3 weeks

cannot bind to lmtp host address through lmtp port(OSError: [Errno 99] error while attempting to bind on address: cannot assign requested address)
by Paul Ssekamatte
i have successfully set up mailman3 instance by following the guide at https://gitlab.com/mailman/mailman-suite-doc/blob/master/source/install/vir… and from this mailing list.
my setup uses an alias domain i.e the mail server is different from the lists server. I have successfully created an alias domain and mailing list through Postorius but I keep getting this error in syslog.
OSError: [Errno 99] error while attempting to bind on address ('xxx.xx.xx.xx', 8024): cannot assign requested address.
Even when I change the port number, I still get the same error
Kindly assist.
here is my mailman.cfg config
[paths.here]
var_dir: /opt/mailman/mm/var
[mailman]
layout: here
site_owner: postmaster(a)mail.example.com
[database]
class: mailman.database.postgresql.PostgreSQLDatabase
url: postgres://mailman:#passwd@localhost/mailman
[archiver.prototype]
enable: yes
# For the HyperKitty archiver.
[archiver.hyperkitty]
class: mailman_hyperkitty.Archiver
enable: yes
configuration: /opt/mailman/mm/mailman-hyperkitty.cfg
[shell]
history_file: $var_dir/history.py
[mta]
verp_confirmations: yes
verp_personalized_deliveries: yes
verp_delivery_interval: 1
incoming: mailman.mta.postfix.LMTP
outgoing: mailman.mta.deliver.deliver
lmtp_host: mail.example.com
lmtp_port: 8024
smtp_host: mail.example.com
smtp_port: 25
configuration: python:mailman.config.postfix
recipient_delimiter = +
unknown_local_recipient_reject_code = 550
owner_request_special = no
POSTFIX_STYLE_VIRTUAL_DOMAINS= ['example.com']
/etc/mailman3/settings.py file is as follows
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
ADMINS = (
('Mailman Suite Admin', 'root@localhost'),
)
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mailmanweb',
'USER': 'mailman',
# TODO: Replace this with the password.
'PASSWORD': 'passwd',
'HOST': 'localhost',
'PORT': '5432',
}
}
STATIC_ROOT = '/opt/mailman/web/static'
LOGGING['handlers']['file']['filename'] = '/opt/mailman/web/logs/mailmanweb.log'
ALLOWED_HOSTS = [
'localhost', 'lists.example.com', 'mail.example.com', # Archiving API from Mailman, keep it.
]
SITE_ID = 1
SECRET_KEY = 'key
MAILMAN_ARCHIVER_KEY = 'key
DEFAULT_FROM_EMAIL = 'postmaster(a)example.com'
SERVER_EMAIL = 'postmaster(a)example.com'
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, "fulltext_index"),
},
}
/etc/postfix/main.cf is as follows
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 2
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydomain = example.com
myhostname = lists.example.com
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost = mail.example.com
myorigin = $mydomain
mynetworks = 127.0.0.0/8, 10.0.0.0, 192.0.0.1, [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = subnet
mailbox_size_limit = 4096000000
#message_size_limit = 2048000000
recipient_delimiter = +
inet_interfaces = all
#inet_protocols = all
inet_protocols = ipv4
unknown_local_recipient_reject_code = 550
owner_request_special = no
virtual_mailbox_domains = example.com
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:20000
virtual_gid_maps = static:20000
transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
hash:/opt/mailman/mm/var/data/postfix_lmtp
relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
postfix domains as follows:
lists.example.com example.com
postfix lmtp as follows:
testlist(a)lists.example.com lmtp:[mail.example.com]:8024
testlist-bounces(a)lists.example.com lmtp:[mail.example.com]:8024
testlist-confirm(a)lists.example.com lmtp:[mail.example.com]:8024
postfix vmap as follows:
testlist(a)example.com nmutest(a)lists.example.com
testlist-bounces(a)example.com nmutest-bounces(a)lists.example.com
testlist-confirm(a)example.com nmutest-confirm(a)lists.example.com
3 years