
Help with Newbie error -- I think I deleted my server
by William Oliver
I have recently installed mailman3 on a Debian system with Posftix and
Dovecot. I did it directly and did not use the docker setup.
I managed to get it working to the point that I could send mail locally
and outside my domain through mailman and log in as administrator.
I decided to add a domain, but noticed on the form that the server was
called "example.com." Clearly, I thought, I missed a configuration item
here.
I clicked on that, and it took me to a page where I could add servers.
So, I added my real domain (libertyfp.org) It successfully added it,
so I decided that I clearly didn't need "example.com" as a server, and
deleted it using the same page.
Immediately, I got an "internal server error" and have now lost all web
interfaces. I tried restarting the daemons and rebooting the box, to
no avail.
The error message sent to my admin email is shown below.
So... I have a couple of questions:
1) How can I set libertyfp.org as my server by use of a config file?
2) Failing that, how do a add "example.com" back, since I no longer
have the web interface?
I can't believe I did this. It took me a week to get this up and
working, and I destroyed it in ten minutes after it was working.
Any help would be appreciated. I suppose reinstalling will go much more
quickly, since I know the mistakes I made over the past few days, but I
really don't want to do that...
Here's what it sends me:
DoesNotExist at /mailman3/lists/
Site matching query does not exist.
Request Method: GET
Request URL: https://www.libertyfp.org/mailman3/lists/
Django Version: 3.0.14
Python Executable: /opt/mailman/venv/bin/uwsgi
Python Version: 3.9.2
Python Path: ['/etc/mailman3/', '.', '', '/etc/mailman3',
'/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-
dynload', '/opt/mailman/venv/lib/python3.9/site-packages']
Server time: Sat, 25 Dec 2021 04:14:00 +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']
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 "/opt/mailman/venv/lib/python3.9/site-
packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/core/handlers/base.py", line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/core/handlers/base.py", line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/opt/mailman/venv/lib/python3.9/site-
packages/postorius/views/list.py", line 978, in list_index
return render(request, template,
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/shortcuts.py", line 19, in render
content = loader.render_to_string(template_name, context, request,
using=using)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/template/loader.py", line 62, in render_to_string
return template.render(context, request)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/template/backends/django.py", line 61, in render
return self.template.render(context)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/template/base.py", line 169, in render
with context.bind_template(self):
File "/usr/lib/python3.9/contextlib.py", line 117, in __enter__
return next(self.gen)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/template/context.py", line 246, in bind_template
updates.update(processor(self.request))
File "/opt/mailman/venv/lib/python3.9/site-
packages/django_mailman3/context_processors.py", line 32, in common
context["site_name"] = get_current_site(request).name
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/contrib/sites/shortcuts.py", line 13, in
get_current_site
return Site.objects.get_current(request)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/contrib/sites/models.py", line 58, in get_current
return self._get_site_by_id(site_id)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/contrib/sites/models.py", line 30, in _get_site_by_id
site = self.get(pk=site_id)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/db/models/manager.py", line 82, in manager_method
return getattr(self.get_queryset(), name)(*args, **kwargs)
File "/opt/mailman/venv/lib/python3.9/site-
packages/django/db/models/query.py", line 415, in get
raise self.model.DoesNotExist(
Exception Type: DoesNotExist at /mailman3/lists/
Exception Value: Site matching query does not exist.
Request information:
USER: AnonymousUser
GET: No GET data
POST: No POST data
FILES: No FILES data
COOKIES:
csrftoken =
'qklMdfLOyqa1TWm0b8nEHMFVBLaa0CgU2DXhSywjpgZMTnCSTNA4MkD4lGLB6z5N'
META:
CSRF_COOKIE =
'qklMdfLOyqa1TWm0b8nEHMFVBLaa0CgU2DXhSywjpgZMTnCSTNA4MkD4lGLB6z5N'
CSRF_COOKIE_USED = True
HTTP_ACCEPT =
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image
/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.9'
HTTP_CONNECTION = 'close'
HTTP_COOKIE =
'csrftoken=qklMdfLOyqa1TWm0b8nEHMFVBLaa0CgU2DXhSywjpgZMTnCSTNA4MkD4lGLB
6z5N'
HTTP_DNT = '1'
HTTP_HOST = 'www.libertyfp.org'
HTTP_SEC_FETCH_DEST = 'document'
HTTP_SEC_FETCH_MODE = 'navigate'
HTTP_SEC_FETCH_SITE = 'none'
HTTP_SEC_FETCH_USER = '?1'
HTTP_SEC_GPC = '1'
HTTP_UPGRADE_INSECURE_REQUESTS = '1'
HTTP_USER_AGENT = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36'
HTTP_X_FORWARDED_FOR = '174.212.65.52'
HTTP_X_FORWARDED_HOST = 'www.libertyfp.org'
HTTP_X_FORWARDED_PROTO = 'https'
HTTP_X_FORWARDED_SERVER = 'www.libertyfp.org'
PATH_INFO = '/mailman3/lists/'
QUERY_STRING = ''
REMOTE_ADDR = '127.0.0.1'
REQUEST_METHOD = 'GET'
REQUEST_URI = '/mailman3/lists/'
SCRIPT_NAME = ''
SERVER_NAME = 'libertyfp.org'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
uwsgi.core = 0
uwsgi.node = b'libertyfp.org'
uwsgi.version = b'2.0.20'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7f8591167d90>
wsgi.multiprocess = True
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', 'fp145(a)libertyfp.org'),)"
ALLOWED_HOSTS = ['localhost', 'www.libertyfp.org', 'libertyfp.org',
'mail.libertyfp.org', 'list.libertyfp.org', '127.0.0.1']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS =
"('django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = PosixPath('/opt/mailman/web')
CACHES = {'default': {'BACKEND':
'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
COMPRESSORS = {'css': 'compressor.css.CssCompressor', 'js':
'compressor.js.JsCompressor'}
COMPRESS_CACHEABLE_PRECOMPILERS = '()'
COMPRESS_CACHE_BACKEND = 'default'
COMPRESS_CACHE_KEY_FUNCTION = '********************'
COMPRESS_CLEAN_CSS_ARGUMENTS = ''
COMPRESS_CLEAN_CSS_BINARY = 'cleancss'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = ''
COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_FILTERS = {'css':
['compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.rCSSMinFilter'], 'js':
['compressor.filters.jsmin.rJSMinFilter']}
COMPRESS_JINJA2_GET_ENVIRONMENT = <function
CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7f859064d670>
COMPRESS_MINT_DELAY = 30
COMPRESS_MTIME_DELAY = 10
COMPRESS_OFFLINE = False
COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/static/'}
COMPRESS_OFFLINE_MANIFEST = 'manifest.json'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = "(('text/x-scss', 'sassc -t compressed {infile}
{outfile}'), ('text/x-sass', 'sassc -t compressed {infile}
{outfile}'))"
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/opt/mailman/web/static'
COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/static/'}
COMPRESS_URL = '/static/'
COMPRESS_URL_PLACEHOLDER = '/__compressor_url_placeholder__/'
COMPRESS_VERBOSE = False
COMPRESS_YUGLIFY_BINARY = 'yuglify'
COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal'
COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal'
COMPRESS_YUI_BINARY = 'java -jar yuicompressor.jar'
COMPRESS_YUI_CSS_ARGUMENTS = ''
COMPRESS_YUI_JS_ARGUMENTS = ''
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_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.postgresql_psycopg2', 'NAME': 'mailman', 'USER':
'mailman', 'PASSWORD': '********************', 'HOST': 'localhost',
'PORT': '5432', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True,
'CONN_MAX_AGE': 0, 'OPTIONS': {}, 'TIME_ZONE': None, 'TEST':
{'CHARSET': None, 'COLLATION': None, 'NAME': None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
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', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y
%H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
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_CHARSET = 'utf-8'
DEFAULT_EXCEPTION_REPORTER_FILTER =
'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'mailman(a)libertyfp.org'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = 'mailman(a)libertyfp.org'
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_CHARSET = 'utf-8'
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None
FILE_UPLOAD_HANDLERS =
['django.core.files.uploadhandler.MemoryFileUploadHandler',
'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = 420
FILE_UPLOAD_TEMP_DIR = None
FILTER_VHOST = False
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
HAYSTACK_CONNECTIONS = {'default': {'ENGINE':
'haystack.backends.whoosh_backend.WhooshEngine', 'PATH':
'/opt/mailman/web/fulltext_index'}}
HYPERKITTY_ENABLE_GRAVATAR = True
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['hyperkitty', 'postorius', 'django_mailman3',
'django.contrib.admin', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.sites', 'django.contrib.messages',
'django.contrib.staticfiles', 'rest_framework', 'django_gravatar',
'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth',
'allauth.account', 'allauth.socialaccount']
INTERNAL_IPS = []
LANGUAGES = [('af', 'Afrikaans'), ('ar', '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'), ('io', 'Ido'), ('is',
'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka',
'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'),
('kn', 'Kannada'), ('ko', 'Korean'), ('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'), ('th', 'Thai'), ('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', 'fa', 'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_HTTPONLY = False
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LANGUAGE_COOKIE_SAMESITE = None
LANGUAGE_COOKIE_SECURE = False
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters':
{'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
'handlers': {'mail_admins': {'level': 'ERROR', 'filters':
['require_debug_false'], 'class':
'django.utils.log.AdminEmailHandler'}, 'file': {'level': 'INFO',
'class': 'logging.handlers.WatchedFileHandler', 'filename':
'/opt/mailman/web/logs/mailmanweb.log', 'formatter': 'verbose'},
'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}},
'loggers': {'django.request': {'handlers': ['mail_admins', 'file'],
'level': 'ERROR', 'propagate': True}, 'django': {'handlers': ['file'],
'level': 'ERROR', 'propagate': True}, 'hyperkitty': {'handlers':
['file'], 'level': 'DEBUG', 'propagate': True}, 'postorius':
{'handlers': ['console', 'file'], 'level': 'INFO'}}, 'formatters':
{'verbose': {'format': '%(levelname)s %(asctime)s %(process)d %(name)s
%(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = 'list_index'
LOGIN_URL = 'account_login'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = 'account_logout'
MAILMAN_ARCHIVER_FROM = "('127.0.0.1', '::1')"
MAILMAN_ARCHIVER_KEY = '********************'
MAILMAN_REST_API_PASS = '********************'
MAILMAN_REST_API_URL = '********************'
MAILMAN_REST_API_USER = '********************'
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE =
'django.contrib.messages.storage.fallback.FallbackStorage'
MESSAGE_TAGS = {40: 'danger'}
MIDDLEWARE = "('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_DAYS = '********************'
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
PREPEND_WWW = False
Q_CLUSTER = {'retry': 360, 'timeout': 300, 'save_limit': 100, 'orm':
'default'}
ROOT_URLCONF = 'mailman_web.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 = None
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'root(a)localhost.local'
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 = {'openid': {'SERVERS': [{'id': 'yahoo',
'name': 'Yahoo', 'openid_url': 'http://me.yahoo.com'}]}, 'google':
{'SCOPE': ['profile', 'email'], 'AUTH_PARAMS': {'access_type':
'online'}}, 'facebook': {'METHOD': 'oauth2', 'SCOPE': ['email'],
'FIELDS': ['email', 'name', 'first_name', 'last_name', 'locale',
'timezone'], 'VERSION': 'v2.4'}}
STATICFILES_DIRS = '()'
STATICFILES_FINDERS =
"('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder')"
STATICFILES_STORAGE =
'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/opt/mailman/web/static'
STATIC_URL = '/static/'
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 = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'mailman_web.wsgi.application'
X_FRAME_OPTIONS = 'DENY'
YEAR_MONTH_FORMAT = 'F Y'
3 years, 6 months

Re: New messages not being archived
by Philip Colmer
I'm having exactly the same problem as Sarah. I've built the server using the virtualenv instructions (https://docs.mailman3.org/en/latest/install/virtualenv.html) but archiving of messages is not working.
/opt/mailman/mm/var/archives/hyperkitty/spool contains a number of "pck" files.
/opt/mailman/mm/var/logs/mailman.log contains entries like this:
Sep 03 09:38:17 2021 (3011) Exception in "hyperkitty" archiver
Traceback (most recent call last):
File "/opt/mailman/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 699, in urlopen
httplib_response = self._make_request(
File "/opt/mailman/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 445, in _make_request
six.raise_from(e, None)
File "<string>", line 3, in raise_from
File "/opt/mailman/venv/lib/python3.8/site-packages/urllib3/connectionpool.py", line 440, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.8/http/client.py", line 1344, in getresponse
response.begin()
File "/usr/lib/python3.8/http/client.py", line 307, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.8/http/client.py", line 276, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
curl http://127.0.0.1:8000/archives/ reports:
curl: (52) Empty reply from server
https://example.com/archives/api/mailman/urls reports:
Access is forbidden
Please check the IP addresses assigned to MAILMAN_ARCHIVER_FROM in the settings file.
/opt/mailman/mm/urls.py doesn't exist on my machine. I've found the following files called urls.py beneath /opt/mailman:
790264 4 -rw-rw-r-- 1 mailman mailman 138 Aug 16 09:23 ./venv/lib/python3.8/site-packages/falcon/bench/dj/dj/urls.py
538719 4 -rw-rw-r-- 1 mailman mailman 615 Aug 16 09:52 ./venv/lib/python3.8/site-packages/rest_framework/urls.py
539156 4 -rw-rw-r-- 1 mailman mailman 1052 Aug 16 09:52 ./venv/lib/python3.8/site-packages/rest_framework/utils/urls.py
1050019 8 -rw-rw-r-- 1 mailman mailman 7222 Aug 16 09:52 ./venv/lib/python3.8/site-packages/postorius/urls.py
797890 8 -rw-rw-r-- 1 mailman mailman 7783 Aug 16 09:52 ./venv/lib/python3.8/site-packages/hyperkitty/urls.py
1298485 4 -rw-rw-r-- 1 mailman mailman 3246 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django/core/checks/urls.py
1051696 4 -rw-rw-r-- 1 mailman mailman 1310 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django/contrib/admindocs/urls.py
1052065 4 -rw-rw-r-- 1 mailman mailman 498 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django/contrib/staticfiles/urls.py
1052096 4 -rw-rw-r-- 1 mailman mailman 179 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django/contrib/flatpages/urls.py
1052339 4 -rw-rw-r-- 1 mailman mailman 1054 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django/contrib/auth/urls.py
785525 4 -rw-rw-r-- 1 mailman mailman 1481 Aug 16 09:23 ./venv/lib/python3.8/site-packages/pip/_internal/utils/urls.py
1050826 4 -rw-rw-r-- 1 mailman mailman 1289 Aug 16 09:52 ./venv/lib/python3.8/site-packages/mailman_web/urls.py
539863 4 -rw-rw-r-- 1 mailman mailman 752 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/urls.py
539871 4 -rw-rw-r-- 1 mailman mailman 1404 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/account/urls.py
539927 4 -rw-rw-r-- 1 mailman mailman 414 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/urls.py
539944 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/zoom/urls.py
539956 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/nextcloud/urls.py
539968 4 -rw-rw-r-- 1 mailman mailman 174 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/dataporten/urls.py
539982 4 -rw-rw-r-- 1 mailman mailman 134 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/persona/urls.py
539999 4 -rw-rw-r-- 1 mailman mailman 174 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/salesforce/urls.py
540011 4 -rw-rw-r-- 1 mailman mailman 170 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/basecamp/urls.py
540023 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/feedly/urls.py
540035 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/baidu/urls.py
540047 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/naver/urls.py
540061 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/stripe/urls.py
540073 4 -rw-rw-r-- 1 mailman mailman 209 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/vimeo_oauth2/urls.py
540087 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/figma/urls.py
540099 4 -rw-rw-r-- 1 mailman mailman 233 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/keycloak/urls.py
540111 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/yandex/urls.py
540123 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/ynab/urls.py
540135 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/asana/urls.py
540149 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/azure/urls.py
540163 4 -rw-rw-r-- 1 mailman mailman 169 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/linkedin/urls.py
540175 4 -rw-rw-r-- 1 mailman mailman 209 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/draugiem/urls.py
540187 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/dwolla/urls.py
540201 4 -rw-rw-r-- 1 mailman mailman 527 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/oauth/urls.py
540213 4 -rw-rw-r-- 1 mailman mailman 224 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/auth0/urls.py
540225 4 -rw-rw-r-- 1 mailman mailman 165 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/flickr/urls.py
540237 4 -rw-rw-r-- 1 mailman mailman 206 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/discord/urls.py
540249 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/amazon/urls.py
540261 4 -rw-rw-r-- 1 mailman mailman 224 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/jupyterhub/urls.py
540273 4 -rw-rw-r-- 1 mailman mailman 174 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/stocktwits/urls.py
540285 4 -rw-rw-r-- 1 mailman mailman 201 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/openid/urls.py
540311 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/angellist/urls.py
540323 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/pinterest/urls.py
540335 4 -rw-rw-r-- 1 mailman mailman 398 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/apple/urls.py
540351 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/yahoo/urls.py
540365 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/twitch/urls.py
540377 4 -rw-rw-r-- 1 mailman mailman 200 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/agave/urls.py
540389 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/strava/urls.py
540401 4 -rw-rw-r-- 1 mailman mailman 163 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/vimeo/urls.py
540413 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/douban/urls.py
540425 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/weibo/urls.py
540437 4 -rw-rw-r-- 1 mailman mailman 529 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/oauth2/urls.py
540449 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/disqus/urls.py
540461 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/daum/urls.py
540475 4 -rw-rw-r-- 1 mailman mailman 203 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/globus/urls.py
540487 4 -rw-rw-r-- 1 mailman mailman 171 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/box/urls.py
540499 4 -rw-rw-r-- 1 mailman mailman 180 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/odnoklassniki/urls.py
540511 4 -rw-rw-r-- 1 mailman mailman 168 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/shopify/urls.py
540523 4 -rw-rw-r-- 1 mailman mailman 209 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/steam/urls.py
540535 4 -rw-rw-r-- 1 mailman mailman 201 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/patreon/urls.py
540549 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/mailru/urls.py
540561 4 -rw-rw-r-- 1 mailman mailman 137 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/telegram/urls.py
540571 4 -rw-rw-r-- 1 mailman mailman 179 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/fivehundredpx/urls.py
540585 4 -rw-rw-r-- 1 mailman mailman 169 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/evernote/urls.py
540597 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/kakao/urls.py
540611 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/cern/urls.py
540623 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/reddit/urls.py
540635 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/orcid/urls.py
540647 4 -rw-rw-r-- 1 mailman mailman 160 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/edx/urls.py
540659 4 -rw-rw-r-- 1 mailman mailman 165 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/tumblr/urls.py
540671 4 -rw-rw-r-- 1 mailman mailman 170 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/doximity/urls.py
540683 4 -rw-rw-r-- 1 mailman mailman 170 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/frontier/urls.py
540695 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/instagram/urls.py
540707 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/hubic/urls.py
540719 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/weixin/urls.py
540733 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/google/urls.py
540745 4 -rw-rw-r-- 1 mailman mailman 168 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/untappd/urls.py
540759 4 -rw-rw-r-- 1 mailman mailman 217 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/eventbrite/urls.py
540771 4 -rw-rw-r-- 1 mailman mailman 174 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/foursquare/urls.py
540786 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/meetup/urls.py
540800 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/authentiq/urls.py
540812 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/battlenet/urls.py
540828 4 -rw-rw-r-- 1 mailman mailman 227 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/gitlab/urls.py
540840 4 -rw-rw-r-- 1 mailman mailman 224 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/netiq/urls.py
540852 4 -rw-rw-r-- 1 mailman mailman 168 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/cilogon/urls.py
540864 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/robinhood/urls.py
540876 4 -rw-rw-r-- 1 mailman mailman 170 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/coinbase/urls.py
540888 4 -rw-rw-r-- 1 mailman mailman 171 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/bitbucket/urls.py
540900 4 -rw-rw-r-- 1 mailman mailman 360 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/facebook/urls.py
540925 4 -rw-rw-r-- 1 mailman mailman 174 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/soundcloud/urls.py
540937 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/eveonline/urls.py
540949 4 -rw-rw-r-- 1 mailman mailman 234 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/amazon_cognito/urls.py
540963 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/line/urls.py
540977 4 -rw-rw-r-- 1 mailman mailman 184 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/fxa/urls.py
540991 4 -rw-rw-r-- 1 mailman mailman 182 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/linkedin_oauth2/urls.py
541003 4 -rw-rw-r-- 1 mailman mailman 180 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/trainingpeaks/urls.py
541015 4 -rw-rw-r-- 1 mailman mailman 176 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/windowslive/urls.py
541027 4 -rw-rw-r-- 1 mailman mailman 180 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/stackexchange/urls.py
541039 4 -rw-rw-r-- 1 mailman mailman 182 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/microsoft/urls.py
541053 4 -rw-rw-r-- 1 mailman mailman 186 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/quickbooks/urls.py
541067 4 -rw-rw-r-- 1 mailman mailman 179 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/openstreetmap/urls.py
541079 4 -rw-rw-r-- 1 mailman mailman 214 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/mailchimp/urls.py
541091 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/bitly/urls.py
541103 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/paypal/urls.py
541115 4 -rw-rw-r-- 1 mailman mailman 167 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/twitter/urls.py
541127 4 -rw-rw-r-- 1 mailman mailman 183 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/bitbucket_oauth2/urls.py
541139 4 -rw-rw-r-- 1 mailman mailman 179 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/spotify/urls.py
541151 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/exist/urls.py
541163 4 -rw-rw-r-- 1 mailman mailman 178 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/digitalocean/urls.py
541175 4 -rw-rw-r-- 1 mailman mailman 186 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/twentythreeandme/urls.py
541187 4 -rw-rw-r-- 1 mailman mailman 179 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/dropbox/urls.py
541199 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/okta/urls.py
541211 4 -rw-rw-r-- 1 mailman mailman 172 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/sharefile/urls.py
541223 4 -rw-rw-r-- 1 mailman mailman 164 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/slack/urls.py
541237 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/edmodo/urls.py
541249 4 -rw-rw-r-- 1 mailman mailman 191 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/feishu/urls.py
541263 4 -rw-rw-r-- 1 mailman mailman 166 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/github/urls.py
541275 4 -rw-rw-r-- 1 mailman mailman 161 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/xing/urls.py
541287 4 -rw-rw-r-- 1 mailman mailman 165 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/trello/urls.py
541299 4 -rw-rw-r-- 1 mailman mailman 158 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/vk/urls.py
541311 4 -rw-rw-r-- 1 mailman mailman 162 Aug 16 09:52 ./venv/lib/python3.8/site-packages/allauth/socialaccount/providers/zoho/urls.py
538780 4 -rw-rw-r-- 1 mailman mailman 1121 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django_mailman3/urls.py
539115 4 -rw-rw-r-- 1 mailman mailman 1076 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django_mailman3/lib/auth/fedora/urls.py
536453 4 -rw-rw-r-- 1 mailman mailman 156 Aug 16 09:52 ./venv/lib/python3.8/site-packages/haystack/urls.py
537504 4 -rwxrwxr-x 1 mailman mailman 132 Aug 16 09:52 ./venv/lib/python3.8/site-packages/django_q/tests/urls.py
3 years, 10 months

Re: Postorius no connection to REST API
by Abhilash Raj
Apologies for the top-post in advance.
So, I am still catching up to this and I don’t very well understand apache2 config, so I’ll try to briefly describe what the setup should be and perhaps it can be translated into apache2 config. Since this thread is mostly about Web stuff, I am not going to talk about mail setup, but replacing `web server` with `mta` and appropriate port changes are the only major differences in mail setup.
Postorius (using Django library/web framework) speaks WSGI and can be run using a WSGI Server. There are multiple options for choosing a WSGI server like uwsgi, gunicorn etc. There are also some common web server plugins like mod_wsgi, which are essentially WSGI servers implemented as Apache2 plugin.
Web server reverse proxies the WSGI server which runs Postorius/Hyperkitty. You want WSGI Server to be configured to listen on either a socket or a port and then also configure web server to reverse proxy the socket or port.
*Ideally* you want to terminate TLS/SSL at the web server level and proxy the HTTP request to the local WSGI server. You don’t need to do anything special for Mailman for SSL if you do this, just follow the regular Web server documentation for SSL for any domains you are supporting in Mailman.
If you don’t want to terminate TLS at web server and instead want it down to the last step, WSGI server itself, then the setup is something we don’t have any docs for at the moment but if you go to the respective WSGI server’s docs, I think you’ll find some.
uwsgi is a WSGI server implementation, but it is a lot more than that, resulting in a bit more complicated configuration and issues, even though it is stable. The documentation for it exists, but it can be hard to parse if you don’t know a lot about WSGI stuff.
A few notable things about uWSGI that Mailman documentation uses are, (1) Ability to manage a daemon process like systemd and (2) ability to speak a new custom protocol called uWSGI with Web Server instead of HTTP that most other WSGI servers use to talk to Web Servers.
(1): This is specified as a part of the the “attach-daemon” configuration in the uwsgi.ini file. For Mailman, we use
# Setup the django_q related worker processes.
attach-daemon = /opt/mailman/venv/bin/mailman-web qcluster
Which will essentially start `mailman-web qcluster` command which starts and a daemon and manage that daemon. Putting it in the uWSGI makes it easy to manage the lifecycle of this and the WSGI server together. If you were using something else like gunicorn, this would be a separate systemd service which you’d start/stop along with mailman-web.
(2): This is *probably* what is causing the issue for you from what I can gather in this thread, but I am not sure. Web Server <—> uWSGI communication can be either HTTP or (named exactly same as the package name itself, which causes confusion I suppose) uWSGI protocol. Depending on how you configure uWSGI, you want to update your web server configuration to talk the same protocol.
```
uwsgi-socket = /run/mailman3-web/uwsgi.sock
or
uwsgi-socket = 0.0.0.0:8000
```
is the config to talk uwsgi protocol and you want to configure Web server to Proxy using the same protocol. You can find that in the uwsgi docs here: https://uwsgi-docs.readthedocs.io/en/latest/Apache.html You probably need an apache module to speak uwsgi, the docs should have the details.
Notice the URL is uwsgi:// instead of http://.
Other way is to configure uWSGI to speak HTTP, which can be done by replacing "uwsgi-socket" by "http-socket” in the uwsgi.ini configuration. This might be the easiest for you to try, do make sure to restart the mailman-web service after making the change in uwsgi.ini.
Abhilash
> On Aug 16, 2021, at 9:34 AM, Stephen J. Turnbull <turnbull.stephen.fw(a)u.tsukuba.ac.jp> wrote:
>
> Richard,
>
> Thanks for the details and the pointer to the full configs. That
> makes it possible to take a look, but I can't spend much time on it
> until next week.
>
> I'll see if I can prod Abhilash who is more expert than I on all this
> stuff (I just use mod_wsgi), but there's some more urgent (sorry, but
> it's security) stuff going on, and his absence speaks for his $DAYJOB,
> I guess.
>
> Richard Rosner writes:
>> That is entirely possible @Stephen. You can see the entire apache config a few posts back plus the additions from @Mark and mine from the last post. As I interpret it, apache is reverse proxying to the uwsgi app, now through http instead of the socket. But I have no idea if that's the right way round. I'm not sure is the config file templates for apache, nginx and uwsgi that you get with the Debian packages are added by the Debian team or if they are there any way and just have been modified to the Debian file layout, but I'd guess either way it's not that likely that they wrote it the wrong way around. But I'm not too experienced to be able to translate the nginx config to apache to see if that would result in something different.
>>
>> Also, while the nginx config is written as a standalone website, the apache config seems to have been written to just create a /mailman3 site under an existing website, while I use it as a standalone site. So it's entirely possible that I missed something when I modified the website from mailman2 to serve mailman3, but then it shouldn't have been able to show the website at the beginning.
>> _______________________________________________
>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>
>>
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
--
thanks,
Abhilash Raj (maxking)
3 years, 10 months

Re: Hipperkitty failing to archive messages in a list
by Guillermo Hernandez (Oldno7)
On 4/1/22 12:27, Guillermo Hernandez (Oldno7) via Mailman-users wrote:
> First of all, best wishes and Happy New Year for everybody.
>
> Two days ago I had to reinstall all mailman3 related apps in a mailman
> 3 server (I tried to upgrade just hipperkitty, but it went bad). At
> first, all seemed running as before, but I just noted that the
> messages are not being archived.
I've found some information that can be related to the problem I had:
In https://docs.mailman3.org/projects/hyperkitty/en/latest/news.html yo
can see that in the security notes for 1.3.5
"Pass the secret archiver key in a HTTP Authorization header instead of
a GET query parameter so it doesn’t appear in logs. (CVE-2021-35058,
Closes #387)"
As the lack of any clue persists on how to solve the problem, I've just
reproduced step by step upgrade process.
I've just executed a (being "mailman3" the user configured for all of this)
pip install --upgrade --force-reinstall --no-deps --no-cache-dir
django-mailman3 mailman mailman-hyperkitty mailmanclient postorius
django hyperkitty
su -m mailman3 -c "python3 manage.py collectstatic"
su -m mailman3 -c "python3 manage.py migrate"
In this last point I've received some warnings of this kind:
*-*-*-*-*-*-*
WARNINGS:
account.EmailAddress: (models.W042) Auto-created primary key used when
not defining a primary key type, by default 'django.db.models.AutoField'.
HINT: Configure the DEFAULT_AUTO_FIELD setting or the
AccountConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
account.EmailConfirmation: (models.W042) Auto-created primary key used
when not defining a primary key type, by default
'django.db.models.AutoField'.
...
HINT: Configure the DEFAULT_AUTO_FIELD setting or the
SocialAccountConfig.default_auto_field attribute to point to a subclass
of AutoField, e.g. 'django.db.models.BigAutoField'.
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes,
django_mailman3, django_q, hyperkitty, postorius, sessions, sites,
socialaccount
Running migrations:
No migrations to apply.
Your models in app(s): 'postorius' have changes that are not yet
reflected in a migration, and so won't be applied.
Run 'manage.py makemigrations' to make new migrations, and then
re-run 'manage.py migrate' to apply them.
*-*-*-*-*-*-*
Running a 'su -m mailman3 -c "python3 manage.py makemigrations" shows
the same warning listed before and some new errors:
*-*-*-*-*-*-*
Migrations for 'postorius':
/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py
- Alter field name on emailtemplate
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py",
line 419, in execute_from_command_line
utility.execute()
File
"/usr/local/lib/python3.7/site-packages/django/core/management/__init__.py",
line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 354, in run_from_argv
self.execute(*args, **cmd_options)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 398, in execute
output = self.handle(*args, **options)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/base.py",
line 89, in wrapped
res = handle_func(*args, **kwargs)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/commands/makemigrations.py",
line 190, in handle
self.write_migration_files(changes)
File
"/usr/local/lib/python3.7/site-packages/django/core/management/commands/makemigrations.py",
line 228, in write_migration_files
with open(writer.path, "w", encoding='utf-8') as fh:
PermissionError: [Errno 13] Permission denied:
'/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py'
*-*-*-*-*-*-*
The file
'/usr/local/lib/python3.7/site-packages/postorius/migrations/0017_alter_emailtemplate_name.py'
does not exist at all
Despite the error, I did a 'su -m mailman3 -c "python3 manage.py
compress"' and the subsequent "django-admin compilemessages" in
/usr/local/lib/python3.7/site-packages/postorius, ../hyperkitty and
../django_mailman3
And the log continues showing the same error when trying archive a new
message.
ERROR 2022-01-05 12:27:31,406 6988 hyperkitty.views.mailman The
MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
ERROR 2022-01-05 12:27:31,418 6988 hyperkitty.views.mailman The
MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
ERROR 2022-01-05 12:27:31,685 6988 hyperkitty.views.mailman The
MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
ERROR 2022-01-05 12:27:32,045 6988 hyperkitty.views.mailman The
MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
ERROR 2022-01-05 12:27:32,070 6988 hyperkitty.views.mailman The
MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
ERROR 2022-01-05 12:27:32,093 6988 hyperkitty.views.mailman The
MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
The odd thing is that you can see the archived messages previous to a
few days ago, when I tried to upgrade hyperkitty. Only the new messages
are "disappearing" (but they are being distributed).
Some guide on what to look for, please?
This server manages just a few lists with very low traffic, but I don't
want to screw it all when upgrading other servers with normal traffic
and much more lists.
TIA
> I did not change any config. Now the log is showing
>
> ERROR 2022-01-03 12:22:15,654 7165 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
> ERROR 2022-01-03 12:22:15,674 7165 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
> ERROR 2022-01-03 12:22:15,791 7165 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
> ERROR 2022-01-03 12:22:16,208 7165 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header.
> ERROR 2022-01-04 11:44:55,644 30518 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header
> ERROR 2022-01-04 11:44:55,664 30518 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header
> ERROR 2022-01-04 11:44:56,478 30518 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header
> ERROR 2022-01-04 11:44:56,620 30518 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header
> ERROR 2022-01-04 11:44:56,647 30518 hyperkitty.views.mailman The
> MAILMAN_ARCHIVER_KEY was not sent as the Authorization HTTP header
>
> (it's a very low traffic list: just two messages in two days)
>
> I do believe I did the upgrade/reinstall procedure as in previous
> upgrades (using pip: it's a system wide installation, not using
> dockers or venv), but seems that I did something wrong
>
> The messages are being delivered normally, but it fails archiving
>
> Before I make a bigger hole for myself, where to look for?
>
> Versions installed:
>
> HyperKitty 1.3.5
>
> mailman 3.3.5
> mailman-hyperkitty 1.2.0
> mailmanclient 3.3.3
>
> postorius 1.3.6
>
> uWSGI 2.0.19.1
>
>
> Mailman Core Version GNU Mailman 3.3.5 (Tom Sawyer)
> Mailman Core API Version 3.1
> Mailman Core Python Version 3.7.9 (default, Nov 30 2020, 10:49:53)
> [Clang 10.0.1 (git@github.com:llvm/llvm-project.git
> llvmorg-10.0.1-0-gef32c611a
>
>
>
--
___________________________________________
Mailman's content filtering has removed the
following MIME parts from this message.
Content-Type: image/png
Name: firma-GHP-emails.png
Replaced multipart/alternative part with first alternative.
3 years, 6 months

Re: signup / registration error - permissions and cert chains
by David Newman
On 12/31/21 4:56 PM, Mark Sapiro wrote:
> On 12/30/21 4:48 PM, David Newman wrote:
>>
>> The etc/mailman3/settings.py file includes these settings:
>>
>> EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
>> EMAIL_HOST = 'localhost'
>> EMAIL_PORT = 25
>
> These 2 (localhost and port 25) are defaults.
>
>
>> EMAIL_HOST_USER = 'dnewman(a)networktest.com'
>> EMAIL_HOST_PASSWORD = 'wouldnt-you-like-to-know'
>
> Why are you authenticating? This should not be necessary.
>
>
>> EMAIL_USE_TLS = 'True'
>> EMAIL_SSL_CERTFILE = '/etc/ssl/certs/myhost.crt'
>> EMAIL_SSL_KEYFILE = '/etc/ssl/private/myhost.key'
>
> And why are you trying to use TLS? This is only for SMTP between Django
> and the MTA on the loopback port. TLS is overkill.
After stripping this down to the defaults:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
and restarting mailman3 (necessary?) and mailmanweb, the system emails
me (as alias for root) an error like the one pasted below after I try
creating a new user account.
After changing EMAIL_HOST to the system's canonical FQDN and again
restarting mailman3 and mailmanweb, the error is the same, and still
from postorius@localhost.
Also, FWIW, the user is created and is visible in the Django admin
panel, but any login attempt produces the same error as the one pasted
below.
The hostname settings in postfix's main.cf are as follows:
# hostname
myhostname = mail9.networktest.com
myorigin = /etc/mailname
mydomain = networktest.com
Here is the error, sanitized with 'dom1.tld' and 'dom2.tld' addresses.
Thanks in advance for additional troubleshooting clues.
Internal Server Error: /accounts/signup/
SMTPRecipientsRefused at /accounts/signup/
{'newuser(a)dom1.tld': (504, b'5.5.2 <postorius@localhost>: Sender address
rejected: need fully-qualified address')}
Request Method: POST
Request URL: http://mail.dom2.tld/accounts/signup/
Django Version: 3.0.14
Python Executable: /opt/mailman/venv/bin/uwsgi
Python Version: 3.9.2
Python Path: ['.', '', '/etc/mailman3', '/usr/lib/python39.zip',
'/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload',
'/opt/mailman/venv/lib/python3.9/site-packages']
Server time: Fri, 31 Dec 2021 17:30:30 -0800
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']
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
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/exception.py",
line 34, in inner
response = get_response(request)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/base.py",
line 115, in _get_response
response = self.process_exception_by_middleware(e, request)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/base.py",
line 113, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/views/generic/base.py",
line 71, in view
return self.dispatch(request, *args, **kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/utils/decorators.py",
line 43, in _wrapper
return bound_method(*args, **kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/views/decorators/debug.py",
line 76, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line
230, in dispatch
return super(SignupView, self).dispatch(request, *args, **kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line
74, in dispatch
response = super(RedirectAuthenticatedUserMixin, self).dispatch(
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line
204, in dispatch
return super(CloseableSignupMixin, self).dispatch(request, *args,
**kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/views/generic/base.py",
line 97, in dispatch
return handler(request, *args, **kwargs)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line
102, in post
response = self.form_valid(form)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line
248, in form_valid
return complete_signup(
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line
209, in complete_signup
return perform_login(
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line
175, in perform_login
send_email_confirmation(request, user, signup=signup, email=email)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line
346, in send_email_confirmation
email_address.send_confirmation(request, signup=signup)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/models.py",
line 62, in send_confirmation
confirmation.send(request, signup=signup)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/models.py",
line 169, in send
get_adapter(request).send_confirmation_mail(request, self, signup)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/adapter.py",
line 464, in send_confirmation_mail
self.send_mail(email_template,
emailconfirmation.email_address.email, ctx)
File
"/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/adapter.py",
line 136, in send_mail
msg.send()
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/message.py",
line 284, in send
return self.get_connection(fail_silently).send_messages([self])
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py",
line 109, in send_messages
sent = self._send(message)
File
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py",
line 125, in _send
self.connection.sendmail(from_email, recipients,
message.as_bytes(linesep='\r\n'))
File "/usr/lib/python3.9/smtplib.py", line 885, in sendmail
raise SMTPRecipientsRefused(senderrs)
Exception Type: SMTPRecipientsRefused at /accounts/signup/
Exception Value: {'newuser(a)dom1.tld': (504, b'5.5.2
<postorius@localhost>: Sender address rejected: need fully-qualified
address')}
Request information:
USER: AnonymousUser
GET: No GET data
POST:
csrfmiddlewaretoken =
'Nk6NjFAaf4bWPOWUZJzrKcTHvIHIXVjSdTb79KeRoM9LpRqK9ljKhXWdWKbfAwMf'
email = 'newuser(a)dom1.tld'
username = 'newuser(a)dom1.tld'
password1 = '********************'
password2 = '********************'
next = '/accounts/login/'
FILES: No FILES data
COOKIES:
roundcube_sessid = 'epth5c1jhmbjrfquire5p9chd9'
csrftoken =
'uRqeKMsMSoItwOWLTRXT7dEwGoN0cCy2UqvyAR6t16Gi6RqB3tHcEYH27qhxPd1p'
META:
CONTENT_LENGTH = '217'
CONTENT_TYPE = 'application/x-www-form-urlencoded'
CSRF_COOKIE =
'uRqeKMsMSoItwOWLTRXT7dEwGoN0cCy2UqvyAR6t16Gi6RqB3tHcEYH27qhxPd1p'
HTTP_ACCEPT =
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.9'
HTTP_CACHE_CONTROL = 'max-age=0'
HTTP_CONNECTION = 'close'
HTTP_COOKIE = 'roundcube_sessid=epth5c1jhmbjrfquire5p9chd9;
csrftoken=uRqeKMsMSoItwOWLTRXT7dEwGoN0cCy2UqvyAR6t16Gi6RqB3tHcEYH27qhxPd1p'
HTTP_DNT = '1'
HTTP_HOST = 'mail.dom2.tld'
HTTP_ORIGIN = 'https://mail.dom2.tld'
HTTP_REFERER = 'https://mail.dom2.tld/'
HTTP_SEC_FETCH_DEST = 'document'
HTTP_SEC_FETCH_MODE = 'navigate'
HTTP_SEC_FETCH_SITE = 'same-origin'
HTTP_SEC_FETCH_USER = '?1'
HTTP_SEC_GPC = '1'
HTTP_UPGRADE_INSECURE_REQUESTS = '1'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36'
HTTP_X_FORWARDED_FOR = '75.82.86.131'
PATH_INFO = '/accounts/signup/'
QUERY_STRING = ''
REMOTE_ADDR = '127.0.0.1'
REQUEST_METHOD = 'POST'
REQUEST_URI = '/accounts/signup/'
SCRIPT_NAME = ''
SERVER_NAME = 'mail9'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
uwsgi.core = 1
uwsgi.node = b'mail9'
uwsgi.version = b'2.0.20'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7fb27a13a3b0>
wsgi.multiprocess = True
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'
Settings:
Using settings module settings
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'http'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_UNIQUE_EMAIL = True
ADMINS = "(('Mailman Suite Admin', 'hostmaster(a)networktest.com'),)"
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '162.251.233.247',
'mail9.networktest.com', 'lists.networktest.com', 'lists.dom1.tld',
'mail.dom2.tld']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = PosixPath('/opt/mailman/web')
CACHES = {'default': {'BACKEND':
'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
COMPRESSORS = {'css': 'compressor.css.CssCompressor', 'js':
'compressor.js.JsCompressor'}
COMPRESS_CACHEABLE_PRECOMPILERS = '()'
COMPRESS_CACHE_BACKEND = 'default'
COMPRESS_CACHE_KEY_FUNCTION = '********************'
COMPRESS_CLEAN_CSS_ARGUMENTS = ''
COMPRESS_CLEAN_CSS_BINARY = 'cleancss'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = ''
COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_FILTERS = {'css':
['compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.rCSSMinFilter'], 'js':
['compressor.filters.jsmin.rJSMinFilter']}
COMPRESS_JINJA2_GET_ENVIRONMENT = <function
CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7fb27d6eb550>
COMPRESS_MINT_DELAY = 30
COMPRESS_MTIME_DELAY = 10
COMPRESS_OFFLINE = True
COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/static/'}
COMPRESS_OFFLINE_MANIFEST = 'manifest.json'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = "(('text/x-scss', 'sassc -t compressed {infile}
{outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'))"
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/opt/mailman/web/static'
COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/static/'}
COMPRESS_URL = '/static/'
COMPRESS_URL_PLACEHOLDER = '/__compressor_url_placeholder__/'
COMPRESS_VERBOSE = False
COMPRESS_YUGLIFY_BINARY = 'yuglify'
COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal'
COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal'
COMPRESS_YUI_BINARY = 'java -jar yuicompressor.jar'
COMPRESS_YUI_CSS_ARGUMENTS = ''
COMPRESS_YUI_JS_ARGUMENTS = ''
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_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':
'mailmanweb', 'USER': 'mailman', 'PASSWORD': '********************',
'HOST': 'localhost', 'PORT': '', 'OPTIONS': {'charset': 'utf8mb4'},
'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0,
'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, 'NAME':
None, 'MIRROR': None}}}
DATABASE_ROUTERS = []
DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440
DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000
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', '%Y-%m-%d', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y
%H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%Y', '%m/%d/%y %H:%M:%S',
'%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M', '%m/%d/%y']
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_CHARSET = 'utf-8'
DEFAULT_EXCEPTION_REPORTER_FILTER =
'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'postorius@localhost'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'mail9.networktest.com'
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_CHARSET = 'utf-8'
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 = True
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
HAYSTACK_CONNECTIONS = {'default': {'ENGINE':
'haystack.backends.whoosh_backend.WhooshEngine', 'PATH':
'/opt/mailman/web/fulltext_index'}}
HYPERKITTY_ENABLE_GRAVATAR = True
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['hyperkitty', 'postorius', 'django_mailman3',
'django.contrib.admin', 'django.contrib.auth',
'django.contrib.contenttypes', 'django.contrib.sessions',
'django.contrib.sites', 'django.contrib.messages',
'django.contrib.staticfiles', 'rest_framework', 'django_gravatar',
'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth',
'allauth.account', 'allauth.socialaccount']
INTERNAL_IPS = []
LANGUAGES = [('af', 'Afrikaans'), ('ar', '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'), ('io', 'Ido'),
('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka',
'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'),
('kn', 'Kannada'), ('ko', 'Korean'), ('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'), ('th', 'Thai'), ('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', 'fa', 'ur']
LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_HTTPONLY = False
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LANGUAGE_COOKIE_SAMESITE = None
LANGUAGE_COOKIE_SECURE = False
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters':
{'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}},
'handlers': {'mail_admins': {'level': 'ERROR', 'filters':
['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'},
'file': {'level': 'INFO', 'class':
'logging.handlers.WatchedFileHandler', 'filename':
'/opt/mailman/web/logs/mailmanweb.log', 'formatter': 'verbose'},
'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}},
'loggers': {'django.request': {'handlers': ['mail_admins', 'file'],
'level': 'ERROR', 'propagate': True}, 'django': {'handlers': ['file'],
'level': 'ERROR', 'propagate': True}, 'hyperkitty': {'handlers':
['file'], 'level': 'DEBUG', 'propagate': True}, 'postorius':
{'handlers': ['console', 'file'], 'level': 'INFO'}}, 'formatters':
{'verbose': {'format': '%(levelname)s %(asctime)s %(process)d %(name)s
%(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = 'list_index'
LOGIN_URL = 'account_login'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = 'account_logout'
MAILMAN_ARCHIVER_FROM = "('127.0.0.1', '::1')"
MAILMAN_ARCHIVER_KEY = '********************'
MAILMAN_REST_API_PASS = '********************'
MAILMAN_REST_API_URL = '********************'
MAILMAN_REST_API_USER = '********************'
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = ''
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MESSAGE_TAGS = {40: 'danger'}
MIDDLEWARE = "('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_DAYS = '********************'
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
PREPEND_WWW = False
Q_CLUSTER = {'retry': 360, 'timeout': 300, 'save_limit': 100, 'orm':
'default'}
ROOT_URLCONF = 'mailman_web.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 = None
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'root(a)localhost.local'
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 = 2
SOCIALACCOUNT_PROVIDERS = {'openid': {'SERVERS': [{'id': 'yahoo',
'name': 'Yahoo', 'openid_url': 'http://me.yahoo.com'}]}, 'google':
{'SCOPE': ['profile', 'email'], 'AUTH_PARAMS': {'access_type':
'online'}}, 'facebook': {'METHOD': 'oauth2', 'SCOPE': ['email'],
'FIELDS': ['email', 'name', 'first_name', 'last_name', 'locale',
'timezone'], 'VERSION': 'v2.4'}}
STATICFILES_DIRS = '()'
STATICFILES_FINDERS =
"('django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder')"
STATICFILES_STORAGE =
'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/opt/mailman/web/static'
STATIC_URL = '/static/'
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 = 'America/Los_Angeles'
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'mailman_web.wsgi.application'
X_FRAME_OPTIONS = 'DENY'
YEAR_MONTH_FORMAT = 'F Y'
dn
>
>
>> But this might only be for email, not Postorius/Django.
>
>
> Actually it is only for mail from Django
>
>
3 years, 6 months

Re: Mailman, etc. upgrade woes and persistent bugs
by Abhilash Raj
On Fri, Feb 12, 2021, at 11:52 AM, Mark Sapiro wrote:
> On 2/11/21 10:22 PM, hansen(a)rc.org wrote:
> > I just had my Mailman suite upgraded. When it got started, I starting receiving messages that hundreds of subscribers to the lists had been disables, including several of the list moderators. This version started supporting bounce processing, but how in the world was this upgrade allowed to act on bounces that were being collected PRIOR to enabling bounce processing??
>
>
> I'm sorry about that. It's too late now, but the avoidance is discussed
> at
> <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/…>.
>
>
> > I got many angry emails, messages and phone calls asking what was going on, as they were bona fide list members. I was very surprised myself.
> >
> > I then looked at several of the disabled accounts, but the subscription info page in Postorius had no information about whether an account was enabled or disabled. Why is this not displayed???. The members can't see if their account is enabled. Is this another example of the disconnect between Mailman and Postorius?
>
>
> If the user has a Django account, she can see all that info at (e.g. for
> this list) <https://lists.mailman3.org/mailman3/accounts/subscriptions/>
> She gets there from `Mailman settings` in the dropdown under her user
> name. She can also get there via the `Manage Subscription` button on the
> list's Info page. That takes her to `List-based preferences` for the
> list. Any setting not selected there is inherited from the Address-based
> preferences or Global Mailman preferences
IIUC, I think what Allan is trying to point out is that if your account was
disabled due to bounces, there is no real visual indication about that if
you go to any of the Preferences pages (either, Global preferences,
List based preferences of address based preferences).
Even if you login as an admin and go to Member Option's view, you
won't see any visual indication about the delivery being disabled.
The is definitely a bug, caused due to the fact that "Delivery Status" field
only has two options, "Enabled" and "Disabled". Internally, this field can
have 4 values, "enabled", "by_user" (maps to "Disabled" in Postorius),
"by_admin" (means disabled by admin) and "by_bounces" (means
disabled due to bounces). So, when the value of the field is among
the last two options, it appears as "unset" with no options selected,
which unfortunately is also how it looks by default since all options
are "unset" from start.
The "fix" for this issue would be simply adding a new choice to the
delivery_status field with a caveat that it is only a Readonly option to
see that delivery is disabled due to bounces and not choosable as
a valid delivery_status value by user or admin when submitting the
form.
https://gitlab.com/mailman/postorius/-/issues/469
We could also go a step further and show it on the List's info page
when their delivery is disabled due to excessive bounce and allow
the them to re-enable it themselves without admin intervention. This
would ofcourse show only when you log into your account and go
to the list's info page, but I guess that is the first place you'd go to
debug when you get an email that your delivery was disabled?
https://gitlab.com/mailman/postorius/-/issues/470
I don't know if there are any downsides to letting users re-enable
their delivery on their own.
>
>
> > Further, even after the upgrade, the moderators still cannot access the list memberships even though all the lists are set to allow that. I would have asked the moderators to do this if this access bug had been fixed, but they can't get there.
>
> You've already reported this at
> <https://gitlab.com/mailman/postorius/-/issues/462>, and it's been
> previously reported at <https://gitlab.com/mailman/postorius/-/issues/369>.
>
>
> > As a result of these bugs, after consulting with Brian, who helped with the upgrade, I spent many hours re-enabling the several hundred accounts that had been disabled. I had to go through each email notification to find the address of a disabled account, then find the list, then the member, in Postorius, and finally enable the account (at which time Postorius DID show the enabled status).
>
>
> I'm sorry you had to go through this. The potential issue and the
> avoidances should be better documented. Unfortunately, they aren't.
>
>
> > Please, can the next upgrade include these very basic fixes/enhancements, which I requested a long time ago:
> >
> > a. The ability of moderators to see the list membership (a bug).
>
> As I note above, this is a known issue. We are a small project with very
> feew core developers, all of whom are volunteers. There is a merge
> request at <https://gitlab.com/mailman/postorius/-/merge_requests/423>
> which purports to fix
> <https://gitlab.com/mailman/postorius/-/issues/369>, but as you can see
> from the comment thread, it is not complete and the author has
> apparently disappeared.
>
> If you would like to take it over and address the deficiencies, we would
> welcome that.
>
>
> > b. The ability of members to change their addresses for all lists they are subscribed to.
>
>
> Users can add addresses to their account and can then change their
> subscribed address at (again, e.g. for this list)
> <https://lists.mailman3.org/mailman3/accounts/list-options/mailman-users.mai…>
> (Get there via the `Manage Subscription` button on the list's Info
> page.)
>
> If one is subscribed to lists via their `primary` address, one can go to
> `E-mail Addresses` in their account settings and make a new address
> `primary` and that will change all their subscriptions.
>
>
> > and further, now:
> >
> > c. That when members go to look at their subscription info, they can actually see the settings.
>
>
> They can if they go to `Mailman settings` in the dropdown or the `Manage
> Subscription` button on the list's Info page and look at all the tabs.
>
> --
> 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/
>
--
thanks,
Abhilash Raj (maxking)
4 years, 4 months

Re: Mailman3 is wrongly display name a list member
by Allan Hansen
Thank youi, Stephen.
Oops. When I wrote below that I set the name 'B' in the account, I did describe it wrongly. Sorry.
The member just wants one name, 'A' for all her subsriptions. Somehow the 'B' got into the system when we upgraded from Mailman 2 to Mailman 3.
I removed the address from all the lists, set the account display name to 'A' in Django, verified that she was not subscribed to any list at all, and then resubscribed her again as 'A'. In other words, no 'B' anywhere - straight 'A's.
Nevertheless, the new subscriptions still show up as 'B'.
Now, for the workaround:
" If you want a new subscription to set the display name for an address,
the workaround would be to delete the address, then reconfirm the
address, and resubscribe the address to all the relevant lists."
I modified the above workflow to:
Removed the address from all the lists.
Set the account display name to 'A' in Django.
Verify that she is not subscribed to any list at all.
Deleted the email address in Django (under 'Email addresses').
Resubscribed her as 'A'.
In other words, no 'B' anywhere - straight 'A's.
Nevertheless, the new subscriptions still has 'B' when I list it in Postorius.
Further:
When I search for 'Email addresses' in Django's list of emails (by account or email), it no longer exists.
When I search under 'Users' (by account or email), it exists with 'A' as the display (which she entered when she created the account).
Then since the email does not exist, under 'Email addresses' in Django, I go to 'Add email address', enter her account name and address.
This gives and error: 'Select a valid choice. That choice is not one of the available choices.'
I get this error no matter which 'Save...' button I press.
I then tried to get into REST as per your advice here:
" I think just starting Python 3 on the Mailman host as the Mailman user (we
recommend "mailman" but Debian prefers "list", YMMV) and typing
>>> from mailman.testing.documentation import dump_json
>>> dump_json('http://localhost:8001/3.1/addresses/a@foo.com',
... method='PATCH', data={'display_name': 'A'})
"
I get this, after setting myself up as user mailman (which works when entering mailman commands):
mailman@list:~/scripts$ python3
Python 3.7.3 (default, Jan 22 2021, 20:04:44)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from mailman.testing.documentation import dump_json
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'mailman'
Looking around, I found mailman related stuff in /opt/mailman/mm and a file called 'mailman' in
opt/mailman/mm/bin but hesitated editing your command above to:
/opt/mailman/mm/mailman.testing.documentation
(I don't want to mess up my system).
So no go...
Sorry for ranting. __
Please:
1. Always use the display name and email set up in the account everywhere.
2. Allow the member to change her display name using the account UI.
3. Allow the member to change her address and apply the new address to all list subscriptions.
Yours,
Allan
On 1/11/22, 7:20 , "Stephen J. Turnbull" <stephenjturnbull(a)gmail.com> wrote:
Allan Hansen writes:
> When I subscribe 'A' <a(a)foo.com>, Mailman3 changes it to 'B'
> <a(a)foo.com>.
If I recall correctly, this issue occurs because Subscription objects
have no display name attribute, but User and Address objects do.
First, the advice part:
> What can I do to help this member?
Unfortunately the mailman command line utility doesn't seem to allow
changing the display name. The REST interface does, though. I think
just starting Python 3 on the Mailman host as the Mailman user (we
recommend "mailman" but Debian prefers "list", YMMV) and typing
>>> from mailman.testing.documentation import dump_json
>>> dump_json('http://localhost:8001/3.1/addresses/a@foo.com',
... method='PATCH', data={'display_name': 'A'})
should do what you want. Note the numbers "8001" (Mailman core's REST
port) and "3.1" (the API version) may be different on your system, I'm
assuming the default install of a recent Mailman release.
See
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/…
for information about accessing the REST API and
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/…
for a few more details on the update process.
On to the rants, if you care.
> I went into Django and added the name 'B' to the subscriber's
> account (the name was empty).
>
> I then unsubscribed <a(a)foo.com> from the lists and resubscribed 'A'
> <a(a)foo.com>.
>
> The subscription again lists as 'B' <a(a)foo.com>.
Does the user need to have different display names for different
addresses? (I don't think it's possible to have different display
names for the same address on different lists because there's no
display name at all for Subscription objects.)
If the answer is "no", the correct thing to do is to set the desired
display name on the user's account.
If the answer is "yes", there doesn't seem to be any way to do this
with current Postorius/HyperKitty. Postorius doesn't expose the
display name anywhere that I can see, and HyperKitty only manages the
account's "real name".
> This brings up a previous discussion of display names on this list,
> but I have not been able to find any solution to the need to change
> Mailman3's display names for a subscriber. It is beyond weird that
> unsubscribing, setting the account display name and resubscribing
> the member fishes back up the old and wrong display name.
Unless you explained what you did incorrectly this is not weird, it's
the expected result. You set "B" in the account, that's what's going
to show up as the display name.
It is not obvious that a new subscription should change an existing
display name for a user or an address, given that there is no way to
set a list-specific display name. It could go either way, and for the
user I would definitely not change it, for the address I tend to agree
that a new subscription should not change the address's display name.
I agree that it's weird that neither Postorius nor HyperKitty seems to
expose a way to set Address display names, though.
If you want a new subscription to set the display name for an address,
the workaround would be to delete the address, then reconfirm the
address, and resubscribe the address to all the relevant lists.
3 years, 5 months

Re: Mailman backend maintenance task
by Eugenio Jordan (external)
Dear Steve:
I really appreciate you also took your time to provide more insights on
how Mailman works, and how their different components interact each
other.
There are two "minor" tasks and one major task that we would need to
accomplish within PostGRESQL, namely rebuilding the index related to
hyperkitty_email table primary key, rebuilding also another index on
the very same table supporting an uniqueness constraint (these would be
the minor); and running vacuum full on the whole database to
effectively reduce the size of precisely hyperkitty_email table, which
is the largest table in this database, and if possible retrieve back to
the SAN the extra space we had to add to cope with that very table size
increasing.
The way vacuum full locks the tables are, among all the locking
mechanisms provided by PostGRESQL to guarantee the transactional
integrity, one of the strongest, if not the strongest one (as far as I
know, the tables are more ore less recreated when running vacuum full).
The idea we were considering was more or less stopping all of the
components, then starting up only PostGRESQL, and then performing each
one of the mentioned tasks. Actually our PG release allow "online"
indices rebuild (drop + rebuild concurrently), but we did not want to
assume the risk if, for whatever reason, new records were added to the
table breaking the uniqueness of both constraints (fixing this cases
turns out to be a real pain in most cases). Alternatively, we could
lock the table ourselves to get more or less the same effect, true,
although, after all, the final impact on potential connections willing
to run DML would be the same. In other words, rather than having lots
of transactions coming from whether core component processes or web
component processes fail, we prefer to stop everything. But it's got of
course the worst downside: we would receive
Let me please now go back to your kind explanation to see if I did get
things correctly. You mention that regardless the connectivity that
Mailman's core processes might have with the database, the emails will
be received by and queued until the connection is back again and they
can be delivered to the distribution lists' members. Could you please
confirm whether this task would be actually delegated to Postfix (or
any MTA integrated with Mailman)? If so, this is actually what we need:
we could afford delaying the reception a couple of days, whilst we are
sure that no mail will be lost.
Once more, thanks a lot for your kind help. Best regards.
-----"Stephen J. Turnbull" <[1]stephenjturnbull(a)gmail.com> wrote: -----
To: [2]eugenio.jordan(a)esa.int
From: "Stephen J. Turnbull" <[3]stephenjturnbull(a)gmail.com>
Date: 08/24/2021 05:33PM
Cc: [4]mailman-users(a)mailman3.org
Subject: [MM3-users] Mailman backend maintenance task
Hi, Eugenio,
I wrote this earlier but am in the middle of moving my office so my
mail has been intermittent. I have been following your discussion
with Abhilash, and he's definitely the expert, especially if you are
using the containers he creates and distributes. But there's some
information here he hasn't mentioned yet.
Please consider the following discussion to be background that allows
you to understand some of the considerations. I've only run the
Mailman 3 suite with all three running constantly on the same host, so
I have no experience with this kind of issue.
[5]eugenio.jordan(a)esa.int writes:
> Our customer is currently using PostGRESQL as backend, and we would
> like to perform some maintenance tasks, namely running vacuum full,
> or at least trying to rebuild hyperkitty_email primary key related
> index. We have been asked on the real impact of putting in place
> such initiative. Though the latter is related to archiving, I
> haven't found a way to stop just Hyperkitty or Django related
> processes other than stopping Mailman's core, hence preventing
> mails addressed to distribution lists from being delivered, could
> you please confirm if I am correct?
Mailman core can certainly run without either Postorius or HyperKitty.
Controlling Mailman core (moderation, helping users) without Postorius
is annoying, but it can be done. If you stop the HyperKitty process,
what should happen, I believe, is that posts for archiving will
accumulate in the 'archive' queue until HyperKitty is available again.
It's been a while since I studied this so I could be completely wrong,
but as I understand it HyperKitty and Postorius are not daemon
processes. Rather, they are WSGI applications, which means they are
subprocesses spawned by your webserver, and controlled by it. In
order to keep them from running, you would reconfigure the webserver
to not call those WSGI applications. How that is done is specific to
the webserver and the WSGI module. If you are running from Docker
containers, most likely, you can just stop their containers.
The larger problem is that Mailman core uses a RDBMS. Normally both
Django and Mailman are referring to the same RDBMS, PostgreSQL in your
case. I'm not familiar with the vaccuum operation; if it requires
taking the whole RDBMS down, and Mailman is running on that RDBMS,
you're out of luck. Mailman can accept posts and queue them, but it
can't deliver them to subscribers without access to the RDBMS tables.
If it's just a matter of locking some tables while other are
available, then it should work because the tables used by core and
HyperKitty are disjoint as far as I know. (I think Postorius and
HyperKitty both use Django's user tables for authorization, so at
least for those tables both Postorius and HyperKitty will have to be
down, but core can continue running because its database is completely
separate.)
> Regarding the former, as far as I have read, the "mappings" lists
> -> addresses are stored just in the database, so if we run some
> kind of procedure or task like vacuum which will lock exclusively
> tables, or want anyway to have the database stopped for a cold
> backup or whatever, Mailman willl not work, that is, again the
> mails addressed to the distribution lists will not be
> delivered. Will you please confirm this point, too?
That depends on how "vacuum" works. If you can tell the RDBMS not to
lock Mailman core's tables, it can continue to run. Definitely if the
database is not running, Mailman will continue to receive and store
the posts, but it won't be able to distribute mail to subscribers
until its tables are available again. At that point the queued posts
will be processed normally, except that if there's a large backlog,
they won't go out in a quick burst, it may take a while.
One possible worry, depending on how you are connected to the
Internet, is that your provider may interpret the sudden burst of
outgoing mail when Mailman comes back on line as spam or some other
sort of mischief. Mailman has no way to throttle this: it feeds
messages to the MTA until the MTA says "stop". Then it waits until
the MTA is ready again.
Regards,
Steve
This message is intended only for the recipient(s) named above. It may contain p
roprietary information and/or
protected content. Any unauthorised disclosure, use, retention or dissemination
is prohibited. If you have received
this e-mail in error, please notify the sender immediately. ESA applies appropri
ate organisational measures to protect
personal data, in case of data privacy queries, please contact the ESA Data Prot
ection Officer (dpo(a)esa.int)
References
1. mailto:stephenjturnbull@gmail.com
2. mailto:eugenio.jordan@esa.int
3. mailto:stephenjturnbull@gmail.com
4. mailto:mailman-users@mailman3.org
5. mailto:eugenio.jordan@esa.int
3 years, 10 months

Re: Newbie question 2: Rewriting issue for bounced emails
by William Oliver
On Sat, 2021-12-25 at 13:34 -0800, Mark Sapiro wrote:
> On 12/25/21 12:42 PM, William Oliver wrote:
> >
> > Is there a "make-the-freaking-virtual- map-database" command in
> > mailman3, or is this postfix thing? Should I just touch the thing
> > and
> > create an empty file? I'm a little scared to... The error message
> > makes me think that it should be populated with something...
>
>
> Did you add an Alias Domain (different from the Mail Host domain) to
> the
> entry for your domain? This is what triggers the creation of
> postfix_vmap.
>
Well, I hope youi had/have/will have a great holiday. I just finished
our dinner and I am now amusing myself by pretending to enjoy the
Hallmark movies my wife is watching and debugging my mailman3
installation when she's not looking. It was either "The twelve cats of
Christmas" or "Die Hard." I put my foot down and said we were watching
Die Hard. So of course we are watching a movie about 12 kittens in a
fire truck.
In any case, I added a line for "virtual_alias_domains" in my main.cf
for postfix. But it doesn't do anything, apparently, except generate
another error line (see the syslog output below). So, just for a lark,
I created an empty /opt/mailman/mm/var/data/postfix_vmap file and ran
postmap on it to create a postfix_vmap.db file.
Now, it no longer complains about there not being a postfix_vmap.db
file. Instead it complains about it being empty. Here's what my
mailmanweb.log has to say:
smtplib.SMTPRecipientsRefused: {'redacted(a)libertyfp.org': (550, b'5.1.1
<redacted(a)libertyfp.org>: Recipient address rejected: User unknown in
virtual alias table')}
I redacted the name because this is supposed to be the admin account --
and it fails on login.
So, here's syslog:
Dec 25 19:08:49 libertyfp postfix/smtpd[44664]: connect from
localhost[::1]
Dec 25 19:08:49 libertyfp postfix/trivial-rewrite[44670]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
virtual_mailbox_domains
Dec 25 19:08:49 libertyfp postfix/trivial-rewrite[44670]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
virtual_mailbox_domains
Dec 25 19:08:49 libertyfp postfix/smtpd[44664]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<redacted2(a)libertyfp.org> to=<redacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:08:49 libertyfp postfix/smtpd[44672]: connect from
localhost[::1]
Dec 25 19:08:49 libertyfp postfix/trivial-rewrite[44670]: warning: do
not list domain libertyfp.org in BOTH virtual_alias_domains and
virtual_mailbox_domains
Dec 25 19:08:49 libertyfp postfix/smtpd[44672]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<root(a)localhost.local> to=<redacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:08:49 libertyfp postfix/smtpd[44672]: disconnect from
localhost[::1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
where "redacted2" is the name in settings.py for
EMAIL_HOST_USER and DEFAULT_FROM_EMAIL
and "redacted" is the address for "Mailman Suite Admin"
I don't know where "root(a)localhost.local" comes from.
OK, it didn't work when I just had virtual_mailbox_domains defined, and
it didn't work when I had both defined, so I commented out
virtual_mailbox_domains and just left virtual_alias_domains.
That didn't help, either, though it got rid of the warnings in syslog:
Dec 25 19:43:33 libertyfp postfix/smtpd[55192]: connect from
localhost[::1]
Dec 25 19:43:33 libertyfp postfix/smtpd[55192]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<redacted2(a)libertyfp.org> to=<redacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:43:34 libertyfp postfix/smtpd[55199]: connect from
localhost[::1]
Dec 25 19:43:34 libertyfp postfix/smtpd[55199]: NOQUEUE: reject: RCPT
from localhost[::1]: 550 5.1.1 <redacted(a)libertyfp.org>: Recipient
address rejected: User unknown in virtual alias table;
from=<root(a)localhost.local> to=<reacted(a)libertyfp.org> proto=ESMTP
helo=<mail.libertyfp.org>
Dec 25 19:43:34 libertyfp postfix/smtpd[55199]: disconnect from
localhost[::1] ehlo=1 auth=1 mail=1 rcpt=0/1 rset=1 quit=1 commands=5/6
Here's my postfix configuration:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
always_add_missing_headers = yes
command_directory = /usr/sbin
compatibility_level = 2
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd
$daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 15
default_destination_recipient_limit = 30
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
local_recipient_maps = proxy:unix:passwd.byname $alias_maps
hash:/opt/mailman/mm/var/data/postfix_lmtp
mail_owner = postfix
mailq_path = /usr/bin/mailq
mydomain = libertyfp.org
myhostname = mail.libertyfp.org
mynetworks = 127.0.0.0/8 10.0.0.0/24
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
owner_request_special = no
relay_domains = hash:/opt/mailman/mm/var/data/postfix_domains
sendmail_path = /usr/sbin/postfix
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_banner = $myhostname ESMTP
smtpd_recipient_restrictions = permit_mynetworks,
permit_auth_destination, permit_sasl_authenticated, reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/letsencrypt/live/libertyfp.org/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/libertyfp.org/privkey.pem
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/opt/mailman/mm/var/data/postfix_lmtp
unknown_local_recipient_reject_code = 550
virtual_alias_domains = libertyfp.org
virtual_alias_maps = hash:/opt/mailman/mm/var/data/postfix_vmap
virtual_gid_maps = static:20000
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = hash:/etc/postfix/virtual-mailbox
virtual_uid_maps = static:20000
Here's my settings.py:
# Mailman Web configuration file.
# /etc/mailman3/settings.py
from mailman_web.settings.base import *
from mailman_web.settings.mailman import *
#: Default list of admins who receive the emails from error logging.
ADMINS = (
('Mailman Suite Admin', 'redacted2(a)libertyfp.org'),
)
# Postgresql database setup.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'mailman',
'USER': 'mailman',
# TODO: Replace this with the password.
'PASSWORD': 'passwd',
'HOST': 'localhost',
'PORT': '5432',
}
}
# 'collectstatic' command will copy all the static files here.
# Alias this location from your webserver to `/static`
STATIC_ROOT = '/opt/mailman/web/static'
# Make sure that this directory is created or Django will fail on
start.
LOGGING['handlers']['file']['filename'] =
'/opt/mailman/web/logs/mailmanweb.log'
#: See
https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
"www.libertyfp.org",
"libertyfp.org",
"mail.libertyfp.org",
"list.libertyfp.org",
"127.0.0.1",
"2.56.57.28"
# "lists.your-domain.org",
# Add here all production domains you have.
]
#: Current Django Site being served. This is used to customize the web
host
#: being used to serve the current website. For more details about
Django
#: site, see: https://docs.djangoproject.com/en/dev/ref/contrib/sites/
SITE_ID = 1
# Set this to a new secret value.
SECRET_KEY = 'passwd'
# Set this to match the api_key setting in
# /opt/mailman/mm/mailman-hyperkitty.cfg (quoted here, not there).
MAILMAN_ARCHIVER_KEY = 'passwd'
HAYSTACK_CONNECTIONS = {
'default': {
'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine',
'PATH': os.path.join(BASE_DIR, "fulltext_index"),
},
}
# To be added to Django's settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_PORT = 25
EMAIL_HOST_USER = 'redacted(a)libertyfp.org'
EMAIL_HOST_PASSWORD = 'passwd'
DEFAULT_FROM_EMAIL = 'redacted2(a)libertyfp.org'
SITE_ID = 2
Here's my mailman.cfg:
/etc/mailman3/mailman.cfg
[paths.here]
var_dir: /opt/mailman/mm/var
[mailman]
layout: here
# This address is the "site owner" address. Certain messages which must
be
# delivered to a human, but which can't be delivered to a list owner
(e.g. a
# bounce from a list owner), will be sent to this address. It should
point to
# a human.
site_owner: redacted(a)libertyfp.org
[database]
class: mailman.database.postgresql.PostgreSQLDatabase
url: postgres://redacted2: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
# And, create the /opt/mailman/mm/mailman-hyperkitty.cfg file
containing
# these settings uncommented
#[general]
#base_url: http://127.0.0.1:8000/archives/
#api_key: Secret_Hyperkitty_API_Key
[shell]
history_file: $var_dir/history.py
[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.libertyfp.org
lmtp_port: 8024
smtp_host: mail.libertyfp.org
smtp_port: 25
configuration: python:mailman.config.postfix
recipient_delimiter = +
unknown_local_recipient_reject_code = 550
owner_request_special = no
Here's uwsgi.ini
# /etc/mailman3/uwsgi.ini
#
[uwsgi]
# Port on which uwsgi will be listening.
#http-socket = 127.0.0.1:8000
http-socket = 0.0.0.0:8000
# If running uwsgi from the virtual environment ...
virtualenv = /opt/mailman/venv/
module=mailman_web.wsgi:application
# Add to python import path.
pythonpath = /etc/mailman3/
# The default settings module.
env = DJANGO_SETTINGS_MODULE=settings
# Setup default number of processes and threads per process.
master = true
processes = 2
threads = 2
# Setup the django_q related worker processes.
attach-daemon = /opt/mailman/venv/bin/mailman-web qcluster
# Setup the request log.
req-logger = file:/opt/mailman/web/logs/uwsgi.log
# Log qcluster commands separately.
logger = qcluster file:/opt/mailman/web/logs/uwsgi-qcluster.log
log-route = qcluster uwsgi-daemons
# Last log and it logs the rest of the stuff.
logger = file:/opt/mailman/web/logs/uwsgi-error.log
And, last but not least here's mailman-hyperkitty.cfg:
[general]
base_url: http://127.0.0.1:8000/archives/
api_key: passwd
3 years, 6 months

Re: Changing subscription address
by Abhilash Raj
> On Mar 20, 2021, at 4:36 AM, Stephen J. Turnbull <turnbull.stephen.fw(a)u.tsukuba.ac.jp> wrote:
>
> Abhilash Raj writes:
>
>>> There does need to be a way to revert each option to inherit, and
>>> there currently doesn't seem to be one. The 'Preferences' interface I
>>> described in the previous post doesn't provide it either. I will
>>> think about that.
>>
>> The implementation of this isn’t very difficult, but the UX of this is
>> something I don’t know how to implement in that page to be very
>> honest.
>
> Oh, I can play Liz Warren on that one! :-) "I have a plan for that."
>
>> We do already have ability to switch from an explicit address to Primary
>> Address subscription. I would imagine it would be more than just a
>> button, but more like a dropdown to choose an email or primary address
>> and switch all subscriptions to that.
>
> Allan's situation is that for some reason he has a lot of users (or at
> least suspects he does) who would be happy to have only one address
> that there's only one place to change, but for some reason that
> address is copied to (not inherited by) each of several subscriptions.
This is a common situation actually, given that Postorius until
recently only allowed subscribing individual addresses. Also, any
subscriptions imported from Mailman 2.1 are also subscribed as
address.
>
> We should address that, because I'm pretty sure his suspicion is
> correct. For example, until I changed one of them -- and got two
> emails about it for my discard pile :-) -- all of my python.org
> Mailman 3 subscriptions were explicit. I still have about 8 to
> go. :-)
+1
>> This is how Core actually does work[1] if you subscribe via Email
>> and you already have a primary address. It will lookup a user using
>> the address and if the address is the primary address of the user,
>> it will subscribe the primary address.
>
> If you say so, I guess it's true. Nevertheless, both Allan and I have
> observed users with only one address, with that address subscribed
> literally each time to several (~10) lists.
Well a couple of stars have to align for it to work unfortunately. I realized
that Core will use the primary address if you *already* have one set during
email -join command processing. Add to that you can’t set an address
as primary using just email commands, you end up with what you are
seeing.
Also, like I mentioned above, imported subscriptions are always address
based.
Another thing I thought I should clarify is that when I said subscribed via
Primary Address in this or previous emails, I really meant that the User
was subscribed and subscription inherits whatever the primary address
of the user is. As opposed to explicit address itself (which could also
be the email address currently set as primary address).
>
>> However, if it isn’t the primary address, and this is a new address, it will
>> subscribe the address instead of user because the address isn’t
>> verified at this point and hence can’t be a primary address. We could
>> extend the subscription workflow to add an additional step to set this
>> address as primary and subscribe the primary address.
>
> Yes, please, I think. Users who don't want this for subscriptions to
> the primary address are going to be (rare) edge cases. If we need an
> additional attribute on the user to handle the case of an unverified
> primary address, I think that's an acceptable cost. Note that to
> "claim" this User as her own, she has to verify that address. And if
> she *can* verify that address, we can't stop her from doing so, we can
> just make it more annoying.
We don’t necessarily need the flag on user to set an unverified primary
address, we might be able to get away without that. We could set the
address as primary *after* we verify it. We always verify addresses
regardless of the choice of the subscription mode (user or address).
>
>> Postorius has the full ability to define its own workflow because
>> REST API provides full expression capability and doesn’t enforce
>> anything. Previous versions didn’t had support for subscribing as
>> Primary Address, but that has since changed and is the default one
>> in the dropdown.
>>
>> This is for authenticated subscription, the anonymous subscribe works
>> similar to email -join command. Mass-subscribe is probably working the
>> same way.
>
> All of these should unify all subscriptions-by-this-address to one
> User, in my opinion.
+1
>
>> Like mentioned above, it should be possible to do what you suggest. I
>> am getting into the implementation details here, but the Subscription
>> workflow would need an additional flag that would verify an address
>> and use the flag to determine if it should subscribe the address or
>> addresses’s user if an address is provided to the workflow.
>
> I don't think so. Just do the lookup, if it succeeds and matches
> primary address, use inherit. If it doesn't succeed, create a User
> and use inherit. If it does succeed, and doesn't match, use the
> explicit address.
Right now, P is explicit about it. You can choose if you want Primary
Address or one of the explicit addresses added to your account. The
primary address is the pre-selected choice, so if you go and just click
on subscribe button, you get the primary address being subscribed. If
you choose the explicit address then we subscribe the explicit address.
Is that something you think needs modifying?
The email join command does the first part you suggested, (if the lookup
succeed and matches primary address, use inherit) but doesn’t do the
second part (it will create a user, add the address to it and then use the
address to subscribe). We can and should fix that.
> It seems to me that this flag would be impractical for email
> subscriptions (email commands with parameters are generally beyond the
> kind of user this is most important for) or mass subscriptions (how
> does the list owner know what the user wants?) anyway. If somebody
> really wants all their subscriptions via primary address to be copies
> of the primary address rather than user, I'm sorry, but they'll have
> to deal with that. I can't imagine that it's the usual case, and
> there's an easy workaround: make your primary address something other
> than your usual subscription address!
The flag I was talking was not really a user visible one but just thinking
code flow. It might have to be a flag in API though to differentiate between
the “verify this address and subscribe it” vs “verify this address, set it to
primary and subscribe the User” cases.
I agree that in situations where we just have an address to subscribe
and no user exists, we create a user, add the address and verify and
set it to primary and then use inherit. This should apply to, mass
subscribe, anonymous subscribe and -join command.
> If you disagree with me about the relative burden, then maybe we
> shouldn't do this at all, but I'm pretty sure this is something we
> should either do for all subscriptions, or for none.
No, I think it shouldn’t be a big burden.
>
>> Primary Address is also an attribute of the Mailman User, so it
>> should be possible for an admin to set that for a user if the user
>> doesn’t have an account. When they sign up, they’d be able to
>> manage and update accordingly.
>
> True, but AIUI Allan has a *lot* of users and on average they're
> relatively needy compared to, say, my user population. The point of
> his request is to smooth workflows for admins with user populations
> where the admin *wants* to do many things for their users, or to have
> smooth user workflows when they teach their users to do it for
> themselves. That's why I'm focusing on the "I have one address and if
> it changes I want to change it once" case.
Makes sense.
--
thanks,
Abhilash Raj (maxking)
4 years, 3 months