[MM3-users]Re: mailman 2 vs. mailman 3: what happened to multipart/digest?
by John Hein
Here's an '02 reference in git to the some heritage for multipart/digest
==========
commit 63d2568fe58333f8ca0b7582f74b43e775c581cd
Author: bwarsaw <>
Date: Thu Jul 11 22:14:25 2002 +0000
send_i18n_digests(): Let's generate MIME digests the correct way, by
wrapping each message inside the multipart/digest in a MIMEMessage
instance. We also no longer need to initialize the mimedigest
instance's payload to the empty list.
Also, when sending the digests, be sure to include isdigest=1 in the
metadata, otherwise SMTPDirect will try to tack on another footer.
==========
John wrote at 16:46 -0600 on May 12, 2016:
> Mark Sapiro wrote at 12:18 -0700 on May 12, 2016:
> > On 5/12/16 9:16 AM, John wrote:
> > > Digest delivery in mailman 2 encapsulated the individual message/rfc822 messages in a multipart/digest container. This allowed email clients to show the messages in the particular digest in a threaded view.
> >
> >
> > This format vs. plain text digests was a user option in Mailman 2.
> >
> >
> > > It seems like the various digest options that I have tried [1] in mailman 3.1.0 (as implemented for the fedora-users mailing list) no longer encapsulate messages in multipart/digest.
> >
> >
> > The core still supports the same plain text and MIME format digests and
> > the same individual subscriber and per-list default formats as did
> > Mailman 2. The issue is none of these things are exposed in Postorius.
> >
> > If you subscribe to digests on this list, you will receive the
> > 'encapsulated' MIME format because the lists mime_is_default_digest
> > setting is True, but currently that has to be set through the
> > bin/mailman shell tool.
> >
> >
> > > Is this intentional? Is it a bug - feature that was lost in translation from 2 to 3? Is there a delivery option I'm missing that will turn that back on?
>
> Thanks for the info - and Barry's reply as well. I understand that
> MIME digests are supported in Mailman 3 - that's what I'm using (and
> thanks, Barry, for the info that Summary Digests is the same right
> now). My quibble is that the multipart/digest encapsulation level is
> gone.
>
> Barry Warsaw wrote at 15:16 -0400 on May 12, 2016:
> > The MIME format of MIME digests should roughly be:
> >
> > multipart/mixed
> > text/plain (the digest heading)
> > text/plain (the TOC)
> > message/rfc822
> > message-1
> > message/rfc822
> > message-2
> > ...
> > text/plain (footer)
>
>
> But mm 2 had:
>
> multipart/mixed
> text/plain (the digest heading)
> text/plain (the TOC)
> multipart/digest <--- this is the part that's gone in mm3
> message/rfc822
> message-1
> message/rfc822
> message-2
> ...
> text/plain (footer)
>
> So was that removal intentional, a bug or ??
>
> Maybe you're saying there is definitely an unexposed (in Postorius)
> knob for that in mm3.
>
> >
> > It is the intent that Postorius will eventually expose all these
> > settings. We're not there yet. At present you could possibly do this by
> > interacting with mailmanclient, although I'm not certain the settings
> > are exposed there. You can do it via bin/mailman shell if you have
> > access and know what you're doing (see
> > <http://mailman.readthedocs.io/en/release-3.0/src/mailman/runners/docs/diges…>)
> >
> > If you file an issue at
> > <https://gitlab.com/mailman/postorius/issues/new>, it might help
> > expedite this.
>
> Okay.
> _______________________________________________
> Mailman-users mailing list
> mailman-users(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
9 years, 8 months
Several Postorius errors over the weekend
by Andrew Hodgson
Hi.
I've had several Postorius error messages which have resulted in an email. Is this someone up to mischief or have I missed a configuration somewhere? We had several of these over a short period and nothing since then which makes me think someone was running a script on the endpoint, but would be interested in confirmation from those that know better.
Thanks.
Andrew.
Internal Server Error: /accounts/login/
TemplateDoesNotExist at /accounts/login/ 429.html
Request Method: HEAD
Request URL: http://lists.hodgsonfamily.org/accounts/login/?next=%2F%61%63%63%6F%75%6E%7…
Django Version: 4.2.13
Python Executable: /opt/mailman/venv/bin/python3 Python Version: 3.12.3 Python Path: ['/opt/mailman', '/', '/opt/mailman/venv/bin', '/etc/mailman3', '/usr/lib/python312.zip', '/usr/lib/python3.12', '/usr/lib/python3.12/lib-dynload', '/opt/mailman/venv/lib/python3.12/site-packages', '/usr/local/lib/python3.12/dist-packages', '/usr/lib/python3/dist-packages', '/etc/mailman3'] Server time: Fri, 09 Aug 2024 15:32:41 +0000 Installed Applications:
['hyperkitty',
'postorius',
'django_mailman3',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.humanize',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount']
Installed Middleware:
('allauth.account.middleware.AccountMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django_mailman3.middleware.TimezoneMiddleware',
'postorius.middleware.PostoriusMiddleware')
Template loader postmortem
Django tried loading these templates, in this order:
Using engine django:
This engine did not provide a list of tried templates.
Traceback (most recent call last):
File "/opt/mailman/venv/lib/python3.12/site-packages/django/core/handlers/exception.py", line 55, in inner
response = get_response(request)
^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/views/generic/base.py", line 104, in view
return self.dispatch(request, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/utils/decorators.py", line 46, in _wrapper
return bound_method(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/allauth/decorators.py", line 10, in wrap
resp = ratelimit.consume_or_429(request, action=action, **rl_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/allauth/core/ratelimit.py", line 140, in consume_or_429
return handler429(request)
^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/allauth/core/ratelimit.py", line 125, in _handler429
return render(request, "429." + app_settings.TEMPLATE_EXTENSION, status=429)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/shortcuts.py", line 24, in render
content = loader.render_to_string(template_name, context, request, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/template/loader.py", line 61, in render_to_string
template = get_template(template_name, using=using)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/mailman/venv/lib/python3.12/site-packages/django/template/loader.py", line 19, in get_template
raise TemplateDoesNotExist(template_name, chain=chain)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception Type: TemplateDoesNotExist at /accounts/login/ Exception Value: 429.html Raised during: allauth.account.views.LoginView Request information:
USER: AnonymousUser
GET:
next = '/accounts/login//**/AND/**/(SELECT/**/DIFFERENCE(NULL,NULL))/**/IS/**/NULL--/**/CiLH'
POST: No POST data
FILES: No FILES data
COOKIES:
csrftoken = '********************'
META:
CSRF_COOKIE = 'ArmbEBfvw1lQgbvFKczV9km53k5UFC6G'
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_ENCODING = 'gzip'
HTTP_CONNECTION = 'close'
HTTP_COOKIE = '********************'
HTTP_HOST = 'lists.hodgsonfamily.org'
HTTP_USER_AGENT = 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Ubuntu/10.04 (lucid) Firefox/3.6.15 FirePHP/0.5'
HTTP_X_FORWARDED_FOR = '141.98.255.143'
PATH_INFO = '/accounts/login/'
QUERY_STRING = 'next=%2F%61%63%63%6F%75%6E%74%73%2F%6C%6F%67%69%6E%2F%2F%2A%2A%2F%41%4E%44%2F%2A%2A%2F%28%53%45%4C%45%43%54%2F%2A%2A%2F%44%49%46%46%45%52%45%4E%43%45%28%4E%55%4C%4C%2C%4E%55%4C%4C%29%29%2F%2A%2A%2F%49%53%2F%2A%2A%2F%4E%55%4C%4C%2D%2D%2F%2A%2A%2F%43%69%4C%48'
RAW_URI = '/accounts/login/?next=%2F%61%63%63%6F%75%6E%74%73%2F%6C%6F%67%69%6E%2F%2F%2A%2A%2F%41%4E%44%2F%2A%2A%2F%28%53%45%4C%45%43%54%2F%2A%2A%2F%44%49%46%46%45%52%45%4E%43%45%28%4E%55%4C%4C%2C%4E%55%4C%4C%29%29%2F%2A%2A%2F%49%53%2F%2A%2A%2F%4E%55%4C%4C%2D%2D%2F%2A%2A%2F%43%69%4C%48'
REMOTE_ADDR = '127.0.0.1'
REMOTE_PORT = '35918'
REQUEST_METHOD = 'HEAD'
SCRIPT_NAME = ''
SERVER_NAME = '127.0.0.1'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
SERVER_SOFTWARE = 'gunicorn/22.0.0'
gunicorn.socket = <socket.socket fd=4, family=2, type=1, proto=0, laddr=('127.0.0.1', 8000), raddr=('127.0.0.1', 35918)> wsgi.errors = <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7dddf0dddf60> wsgi.file_wrapper = <class 'gunicorn.http.wsgi.FileWrapper'> wsgi.input = <gunicorn.http.body.Body object at 0x7dddf0dde540> wsgi.input_terminated = True wsgi.multiprocess = False wsgi.multithread = False wsgi.run_once = False wsgi.url_scheme = 'http'
wsgi.version = '(1, 0)'
Settings:
Using settings module settings
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_UNIQUE_EMAIL = True
ADMINS = "(('Mailman Suite Admin', 'andrew(a)hodgson.io'),)"
ALLOWED_HOSTS = ['localhost', 'lists.hodgsonfamily.org'] APPEND_SLASH = True AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = PosixPath('/opt/mailman/web') CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
COMPRESSORS = {'css': 'compressor.css.CssCompressor', 'js': 'compressor.js.JsCompressor'} COMPRESS_CACHEABLE_PRECOMPILERS = '()'
COMPRESS_CACHE_BACKEND = 'default'
COMPRESS_CACHE_KEY_FUNCTION = '********************'
COMPRESS_CLEAN_CSS_ARGUMENTS = ''
COMPRESS_CLEAN_CSS_BINARY = 'cleancss'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = ''
COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_FILTERS = {'css': ['compressor.filters.css_default.CssAbsoluteFilter', 'compressor.filters.cssmin.rCSSMinFilter'], 'js': ['compressor.filters.jsmin.rJSMinFilter']}
COMPRESS_JINJA2_GET_ENVIRONMENT = <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7dddf3f61440> COMPRESS_MINT_DELAY = 30 COMPRESS_MTIME_DELAY = 10 COMPRESS_OFFLINE = True COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/static/'} COMPRESS_OFFLINE_MANIFEST = 'manifest.json'
COMPRESS_OFFLINE_MANIFEST_STORAGE = 'compressor.storage.OfflineManifestFileStorage'
COMPRESS_OFFLINE_MANIFEST_STORAGE_ALIAS = 'compressor-offine'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = "(('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'))"
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/opt/mailman/web/static'
COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage'
COMPRESS_STORAGE_ALIAS = 'compressor'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/static/'} COMPRESS_URL = '/static/'
COMPRESS_URL_PLACEHOLDER = '/__compressor_url_placeholder__/'
COMPRESS_VERBOSE = False
COMPRESS_YUGLIFY_BINARY = 'yuglify'
COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal'
COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal'
COMPRESS_YUI_BINARY = 'java -jar yuicompressor.jar'
COMPRESS_YUI_CSS_ARGUMENTS = ''
COMPRESS_YUI_JS_ARGUMENTS = ''
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_MASKED = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SAMESITE = 'Lax'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = ['https://lists.hodgsonfamily.org']
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'mailman', 'USER': 'mailman', 'PASSWORD': '********************', 'HOST': 'localhost', 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'CONN_HEALTH_CHECKS': False, 'OPTIONS': {}, 'TIME_ZONE': None, 'PORT': '', 'TEST': {'CHARSET': None, 'COLLATION': None, 'MIGRATE': True, 'MIRROR': None, 'NAME': None}}} DATABASE_ROUTERS = [] DATA_UPLOAD_MAX_MEMORY_SIZE = 2621440 DATA_UPLOAD_MAX_NUMBER_FIELDS = 1000 DATA_UPLOAD_MAX_NUMBER_FILES = 100 DATETIME_FORMAT = 'N j, Y, P'
DATETIME_INPUT_FORMATS = ['%Y-%m-%d %H:%M:%S', '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M', '%m/%d/%Y %H:%M:%S', '%m/%d/%Y %H:%M:%S.%f', '%m/%d/%Y %H:%M', '%m/%d/%y %H:%M:%S', '%m/%d/%y %H:%M:%S.%f', '%m/%d/%y %H:%M'] DATE_FORMAT = 'N j, Y'
DATE_INPUT_FORMATS = ['%Y-%m-%d', '%m/%d/%Y', '%m/%d/%y', '%b %d %Y', '%b %d, %Y', '%d %b %Y', '%d %b, %Y', '%B %d %Y', '%B %d, %Y', '%d %B %Y', '%d %B, %Y'] DEBUG = False DEBUG_PROPAGATE_EXCEPTIONS = False DECIMAL_SEPARATOR = '.'
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
DEFAULT_CHARSET = 'utf-8'
DEFAULT_EXCEPTION_REPORTER = 'django.views.debug.ExceptionReporter'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'postorius(a)lists.hodgsonfamily.org'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = '********************'
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_SSL_CERTFILE = None
EMAIL_SSL_KEYFILE = '********************'
EMAIL_SUBJECT_PREFIX = '[Django] '
EMAIL_TIMEOUT = None
EMAIL_USE_LOCALTIME = False
EMAIL_USE_SSL = False
EMAIL_USE_TLS = False
FILE_UPLOAD_DIRECTORY_PERMISSIONS = None FILE_UPLOAD_HANDLERS = ['django.core.files.uploadhandler.MemoryFileUploadHandler', 'django.core.files.uploadhandler.TemporaryFileUploadHandler']
FILE_UPLOAD_MAX_MEMORY_SIZE = 2621440
FILE_UPLOAD_PERMISSIONS = 420
FILE_UPLOAD_TEMP_DIR = None
FILTER_VHOST = False
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
HAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': '/opt/mailman/web/fulltext_index'}}
HYPERKITTY_ENABLE_GRAVATAR = True
IGNORABLE_404_URLS = []
INSTALLED_APPS = ['hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'django.contrib.humanize', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount'] INTERNAL_IPS = [] LANGUAGES = [('af', 'Afrikaans'), ('ar', 'Arabic'), ('ar-dz', 'Algerian Arabic'), ('ast', 'Asturian'), ('az', 'Azerbaijani'), ('bg', 'Bulgarian'), ('be', 'Belarusian'), ('bn', 'Bengali'), ('br', 'Breton'), ('bs', 'Bosnian'), ('ca', 'Catalan'), ('ckb', 'Central Kurdish (Sorani)'), ('cs', 'Czech'), ('cy', 'Welsh'), ('da', 'Danish'), ('de', 'German'), ('dsb', 'Lower Sorbian'), ('el', 'Greek'), ('en', 'English'), ('en-au', 'Australian English'), ('en-gb', 'British English'), ('eo', 'Esperanto'), ('es', 'Spanish'), ('es-ar', 'Argentinian Spanish'), ('es-co', 'Colombian Spanish'), ('es-mx', 'Mexican Spanish'), ('es-ni', 'Nicaraguan Spanish'), ('es-ve', 'Venezuelan Spanish'), ('et', 'Estonian'), ('eu', 'Basque'), ('fa', 'Persian'), ('fi', 'Finnish'), ('fr', 'French'), ('fy', 'Frisian'), ('ga', 'Irish'), ('gd', 'Scottish Gaelic'), ('gl', 'Galician'), ('he', 'Hebrew'), ('hi', 'Hindi'), ('hr', 'Croatian'), ('hsb', 'Upper Sorbian'), ('hu', 'Hungarian'), ('hy', 'Armenian'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('ig', 'Igbo'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('kab', 'Kabyle'), ('kk', 'Kazakh'), ('km', 'Khmer'), ('kn', 'Kannada'), ('ko', 'Korean'), ('ky', 'Kyrgyz'), ('lb', 'Luxembourgish'), ('lt', 'Lithuanian'), ('lv', 'Latvian'), ('mk', 'Macedonian'), ('ml', 'Malayalam'), ('mn', 'Mongolian'), ('mr', 'Marathi'), ('ms', 'Malay'), ('my', 'Burmese'), ('nb', 'Norwegian Bokmål'), ('ne', 'Nepali'), ('nl', 'Dutch'), ('nn', 'Norwegian Nynorsk'), ('os', 'Ossetic'), ('pa', 'Punjabi'), ('pl', 'Polish'), ('pt', 'Portuguese'), ('pt-br', 'Brazilian Portuguese'), ('ro', 'Romanian'), ('ru', 'Russian'), ('sk', 'Slovak'), ('sl', 'Slovenian'), ('sq', 'Albanian'), ('sr', 'Serbian'), ('sr-latn', 'Serbian Latin'), ('sv', 'Swedish'), ('sw', 'Swahili'), ('ta', 'Tamil'), ('te', 'Telugu'), ('tg', 'Tajik'), ('th', 'Thai'), ('tk', 'Turkmen'), ('tr', 'Turkish'), ('tt', 'Tatar'), ('udm', 'Udmurt'), ('uk', 'Ukrainian'), ('ur', 'Urdu'), ('uz', 'Uzbek'), ('vi', 'Vietnamese'), ('zh-hans', 'Simplified Chinese'), ('zh-hant', 'Traditional Chinese')] LANGUAGES_BIDI = ['he', 'ar', 'ar-dz', 'ckb', 'fa', 'ur'] LANGUAGE_CODE = 'en-us'
LANGUAGE_COOKIE_AGE = None
LANGUAGE_COOKIE_DOMAIN = None
LANGUAGE_COOKIE_HTTPONLY = False
LANGUAGE_COOKIE_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LANGUAGE_COOKIE_SAMESITE = None
LANGUAGE_COOKIE_SECURE = False
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'file': {'level': 'INFO', 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': '/opt/mailman/web/logs/mailmanweb.log', 'formatter': 'verbose', 'when': 'midnight', 'backupCount': 5}, 'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}}, 'loggers': {'django.request': {'handlers': ['mail_admins', 'file'], 'level': 'ERROR', 'propagate': True}, 'django': {'handlers': ['file'], 'level': 'ERROR', 'propagate': True}, 'hyperkitty': {'handlers': ['file'], 'level': 'DEBUG', 'propagate': True}, 'postorius': {'handlers': ['console', 'file'], 'level': 'INFO'}, 'q': {'level': 'WARNING', 'propagate': False, 'handlers': ['console', 'file']}}, 'formatters': {'verbose': {'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}} LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = 'list_index'
LOGIN_URL = 'account_login'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = 'account_logout'
MAILMAN_ARCHIVER_FROM = "('127.0.0.1', '::1')"
MAILMAN_ARCHIVER_KEY = '********************'
MAILMAN_REST_API_PASS = '********************'
MAILMAN_REST_API_URL = '********************'
MAILMAN_REST_API_USER = '********************'
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = '/'
MESSAGE_STORAGE = 'django.contrib.messages.storage.fallback.FallbackStorage'
MESSAGE_TAGS = {40: 'danger'}
MIDDLEWARE = "('allauth.account.middleware.AccountMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')"
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT = '********************'
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8000'
PREPEND_WWW = False
Q_CLUSTER = {'retry': 360, 'timeout': 300, 'save_limit': 100, 'orm': 'default', 'workers': 2} ROOT_URLCONF = 'mailman_web.urls'
SECRET_KEY = '********************'
SECRET_KEY_FALLBACKS = '********************'
SECURE_CONTENT_TYPE_NOSNIFF = True
SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin'
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_REFERRER_POLICY = 'same-origin'
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'postorius(a)lists.hodgsonfamily.org'
SESSION_CACHE_ALIAS = 'default'
SESSION_COOKIE_AGE = 1209600
SESSION_COOKIE_DOMAIN = None
SESSION_COOKIE_HTTPONLY = True
SESSION_COOKIE_NAME = 'sessionid'
SESSION_COOKIE_PATH = '/'
SESSION_COOKIE_SAMESITE = 'Lax'
SESSION_COOKIE_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.JSONSerializer'
SETTINGS_MODULE = 'settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_ID = 1
SOCIALACCOUNT_PROVIDERS = {'openid': {'SERVERS': [{'id': 'yahoo', 'name': 'Yahoo', 'openid_url': 'http://me.yahoo.com'}]}, 'google': {'SCOPE': ['profile', 'email'], 'AUTH_PARAMS': {'access_type': 'online'}}, 'facebook': {'METHOD': 'oauth2', 'SCOPE': ['email'], 'FIELDS': ['email', 'name', 'first_name', 'last_name', 'locale', 'timezone'], 'VERSION': 'v2.4'}} STATICFILES_DIRS = '()'
STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'compressor.finders.CompressorFinder')"
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/opt/mailman/web/static'
STATIC_URL = '/static/'
STORAGES = {'default': {'BACKEND': 'django.core.files.storage.FileSystemStorage'}, 'staticfiles': {'BACKEND': 'django.contrib.staticfiles.storage.StaticFilesStorage'}}
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.template.context_processors.csrf', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django_mailman3.context_processors.common', 'hyperkitty.context_processors.common', 'postorius.context_processors.postorius']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M'] TIME_ZONE = 'UTC'
USE_DEPRECATED_PYTZ = False
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = False
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'mailman_web.wsgi.application'
X_FRAME_OPTIONS = 'DENY'
YEAR_MONTH_FORMAT = 'F Y'
1 year, 5 months
Re: Postorius no connection to REST API
by Abhilash Raj
Apologies for the top-post in advance.
So, I am still catching up to this and I don’t very well understand apache2 config, so I’ll try to briefly describe what the setup should be and perhaps it can be translated into apache2 config. Since this thread is mostly about Web stuff, I am not going to talk about mail setup, but replacing `web server` with `mta` and appropriate port changes are the only major differences in mail setup.
Postorius (using Django library/web framework) speaks WSGI and can be run using a WSGI Server. There are multiple options for choosing a WSGI server like uwsgi, gunicorn etc. There are also some common web server plugins like mod_wsgi, which are essentially WSGI servers implemented as Apache2 plugin.
Web server reverse proxies the WSGI server which runs Postorius/Hyperkitty. You want WSGI Server to be configured to listen on either a socket or a port and then also configure web server to reverse proxy the socket or port.
*Ideally* you want to terminate TLS/SSL at the web server level and proxy the HTTP request to the local WSGI server. You don’t need to do anything special for Mailman for SSL if you do this, just follow the regular Web server documentation for SSL for any domains you are supporting in Mailman.
If you don’t want to terminate TLS at web server and instead want it down to the last step, WSGI server itself, then the setup is something we don’t have any docs for at the moment but if you go to the respective WSGI server’s docs, I think you’ll find some.
uwsgi is a WSGI server implementation, but it is a lot more than that, resulting in a bit more complicated configuration and issues, even though it is stable. The documentation for it exists, but it can be hard to parse if you don’t know a lot about WSGI stuff.
A few notable things about uWSGI that Mailman documentation uses are, (1) Ability to manage a daemon process like systemd and (2) ability to speak a new custom protocol called uWSGI with Web Server instead of HTTP that most other WSGI servers use to talk to Web Servers.
(1): This is specified as a part of the the “attach-daemon” configuration in the uwsgi.ini file. For Mailman, we use
# Setup the django_q related worker processes.
attach-daemon = /opt/mailman/venv/bin/mailman-web qcluster
Which will essentially start `mailman-web qcluster` command which starts and a daemon and manage that daemon. Putting it in the uWSGI makes it easy to manage the lifecycle of this and the WSGI server together. If you were using something else like gunicorn, this would be a separate systemd service which you’d start/stop along with mailman-web.
(2): This is *probably* what is causing the issue for you from what I can gather in this thread, but I am not sure. Web Server <—> uWSGI communication can be either HTTP or (named exactly same as the package name itself, which causes confusion I suppose) uWSGI protocol. Depending on how you configure uWSGI, you want to update your web server configuration to talk the same protocol.
```
uwsgi-socket = /run/mailman3-web/uwsgi.sock
or
uwsgi-socket = 0.0.0.0:8000
```
is the config to talk uwsgi protocol and you want to configure Web server to Proxy using the same protocol. You can find that in the uwsgi docs here: https://uwsgi-docs.readthedocs.io/en/latest/Apache.html You probably need an apache module to speak uwsgi, the docs should have the details.
Notice the URL is uwsgi:// instead of http://.
Other way is to configure uWSGI to speak HTTP, which can be done by replacing "uwsgi-socket" by "http-socket” in the uwsgi.ini configuration. This might be the easiest for you to try, do make sure to restart the mailman-web service after making the change in uwsgi.ini.
Abhilash
> On Aug 16, 2021, at 9:34 AM, Stephen J. Turnbull <turnbull.stephen.fw(a)u.tsukuba.ac.jp> wrote:
>
> Richard,
>
> Thanks for the details and the pointer to the full configs. That
> makes it possible to take a look, but I can't spend much time on it
> until next week.
>
> I'll see if I can prod Abhilash who is more expert than I on all this
> stuff (I just use mod_wsgi), but there's some more urgent (sorry, but
> it's security) stuff going on, and his absence speaks for his $DAYJOB,
> I guess.
>
> Richard Rosner writes:
>> That is entirely possible @Stephen. You can see the entire apache config a few posts back plus the additions from @Mark and mine from the last post. As I interpret it, apache is reverse proxying to the uwsgi app, now through http instead of the socket. But I have no idea if that's the right way round. I'm not sure is the config file templates for apache, nginx and uwsgi that you get with the Debian packages are added by the Debian team or if they are there any way and just have been modified to the Debian file layout, but I'd guess either way it's not that likely that they wrote it the wrong way around. But I'm not too experienced to be able to translate the nginx config to apache to see if that would result in something different.
>>
>> Also, while the nginx config is written as a standalone website, the apache config seems to have been written to just create a /mailman3 site under an existing website, while I use it as a standalone site. So it's entirely possible that I missed something when I modified the website from mailman2 to serve mailman3, but then it shouldn't have been able to show the website at the beginning.
>> _______________________________________________
>> Mailman-users mailing list -- mailman-users(a)mailman3.org
>> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>
>>
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
--
thanks,
Abhilash Raj (maxking)
4 years, 5 months
Re: users, users and users (was Re: Re: Cannot request password reset: "The e-mail address is not assigned to any user account")
by Mark Sapiro
On 1/28/22 00:41, IOhannes m zmölnig wrote:
>
> i'm afraid i still do not fully understand which types of "users" there
> are.
>
>
> afaics, there are three different types:
> - django users
> this is what get's listed under
> <https://lists.mailman3.org/admin/auth/user/>
Correct.
> - mailman accounts
> this is what is created when you visit
> <https://lists.mailman3.org/accounts/signup/>
No. That creates a Django user, not a Mailman user. What you think of as
a Mailman account is actually a Django account.
> - email addresses
> this is what is created when i subscribe to a list *without* having
> an account.
> e.g. via the "Subscribe" button on
> <https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/>
Mailman core has users and addresses. A user has one or more associated
addresses. When you subscribe to a list without having an account in
that way, or via email to list-join or list-subscribe or by being mass
subscribed by the list admin or by being imported by `mailman import21`,
assuming you are previously unknown, this creates a Mailman user with an
associated address and subscribes the user or address.
Each user has a primary address and zero or more additional linked
addresses. The user can be subscribed to a list as a user in which case,
delivery if any is to the user's primary address, or can be subscribed
as an address.
> afaiu, (multiple) "email addresses" can be associated with a single
> "mailman account" (but this is strictly optional).
Yes, see above.
> if an "email address" is first used to subscribe to a list without a
> mailman account, and later a mailman account is created with that very
> email address, they get automatically associated.
> a single "email address" cannot be associated with more than one
> "mailman accounts".
Based on the above, your "mailman accounts" are actually Django
accounts. With that in mind, the above is correct, but there is no real
link between Mailman users and Django users. When you are logged in to
the web UI you are logged in as a Django user, and Postorius and
HyperKitty know that user's email address and can therefore know if it
is a list member and know what address to subscribe or unsubscribe as
requested.
> i think i got this one right (as it seems pretty straightforward).
>
> what i don't fully grasp yet is the relation between "django users" and
> "mailman accounts".
As I have said, what you are calling a mailman account is a Django user
and not a Mailman user.
> intuitively, i would have thought that they are identical.
They are, but they are not Mailman core users.
> now mark wrote:
> > a Django user, which is distinct from a Mailman user. The users you
> > added via the web API are Mailman users, but in order to access their
> > lists via the web UI they have to `sign up` to create a Django
> > account.
>
> that seems to indicate, that a "django user" is a (strict) superset of a
> "mailman account".
No. A Django user is the same thing as what you call a mailman account.
A Mailman core user is a separate thing entirely.
> you (as admin) can create "mailman accounts" via the web API¹, but they
> are only expanded to "mailman accounts" if you (as user) go through the
> "Sign Up" process.
No. An admin can create Mailman users via the Postorius UI. A Django
superuser can also create Django users through the Django admin UI.
> otoh, if you create an initial "django user" by signing up, you
> automatically create a "mailman account".
Because they are the same thing. When you go to the Sign-up link on a
Postorius or Hyperkitty page you go to
https://example.com/accounts/signup/, and that's Django, not Mailman.
> so are the two distinct concepts that are just associated via some
> common property (e.g. the email address), or is there some intrinsic
> relationship between the two (e.g. parent-child inheritance relationship)?
They are distinct. Django users have email addresses and Mailman users
have email addresses and they can be associated in that way. There is no
other link.
> so my recent experiment (comparing the output of
> <https://lists.example.com/admin/auth/user/> with that of `[u for u in
> getUtility(IUserManager).users]`) indicates that they are indeed
> distinct objects that *can* be associated with each other.
>
> could you please clarify this?
I hope I have.
--
Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
4 years
ModuleNotFoundError: No module named 'settings'
by Michela
Hello!
I've just set up Mailman 3 with Hyperkitty and Postorius in venv via pip by using the guide at https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-inst… on Oracle Linux 8.3 with Python 3.6.8. The process seemed to go smoothly and without errors.
The log file, /opt/mailman/web/logs/uwsgi-error.log, contains the following stack trace, however. Note the bit toward the bottom: "ModuleNotFoundError: No module named 'settings'"
Traceback (most recent call last):
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 224, in fetch_command
app_name = commands[subcommand]
KeyError: 'qcluster'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/mailman/venv/bin/mailman-web", line 8, in <module>
sys.exit(main())
File "/opt/mailman/venv/lib64/python3.6/site-packages/mailman_web/manage.py", line 30, in main
execute_from_command_line(sys.argv)
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
utility.execute()
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 395, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/core/management/__init__.py", line 231, in fetch_command
settings.INSTALLED_APPS
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 76, in __getattr__
self._setup(name)
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 63, in _setup
self._wrapped = Settings(settings_module)
File "/opt/mailman/venv/lib64/python3.6/site-packages/django/conf/__init__.py", line 142, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/usr/lib64/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'settings'
[uwsgi-daemons] throttling "/opt/mailman/venv/bin/mailman-web qcluster" for 245 seconds
[uwsgi-daemons] respawning "/opt/mailman/venv/bin/mailman-web qcluster" (uid: 1002 gid: 1002)
Mailman and mailman-web do start without errors when I run them via their systemd unit files and Postorius serves up pages (without styles and such, which I'll fix later). SELinux is disabled, at least while I work through this issue. I've gone over the configuration files, and everything appears to be in order as written in the installation instructions, but that's likely not the case. :)
My configuration files outside of the Mailman virtual environment are in /etc/mailman/:
(venv) [mailman@host ~]$ ls /etc/mailman3/
mailman.cfg __pycache__ settings.py uwsgi.ini
When searching the web about this, I only found one result, on this very list, but it didn't have quite enough information for me to solve my issue. It might also not quite be the same problem: https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/…
Might you be able to point me in the right direction on solving this issue? Please tell me if there is any more information I can provide to that end.
Best,
Michela
4 years, 8 months
Re: Archiver "prototype" and disabling archiving at all
by Torge Riedel
Am 28.03.19 um 17:45 schrieb Abhilash Raj:
> On Thu, Mar 28, 2019, at 9:18 AM, Torge Riedel wrote:
>> Am 24.03.19 um 16:49 schrieb Mark Sapiro:
>>> On 3/24/19 5:40 AM, Torge Riedel wrote:
>>>> in the settings of a mailing list I can choose two archivers:
>>>> "Hyperkitty" and "prototype". What is this archive "prototype" and how
>>>> can I disable/remove/deinstall it? And how can I disable archiving at
>>>> all, so no archiver can be chosen in the settings.
>>> The prototype archiver stores messages individually in
>>> var/archives/prototype/LIST_NAME/.
>>>
>>> You can disable the prototype archiver by putting
>>>
>>> [archiver.prototype]
>>> enable: no
>>>
>>> in your mailman.cfg. To disable all archiving, just remove all the
>>> [archiver.*] sections from your mailman.cfg or set them to 'enable: no'
>>>
>>>
>> Hi Mark,
>>
>> thanks. This disabled the archivers, but there is still the "Archives"
>> link on top of the page. Is it possible to remove it? Cause there is
>> nothing to see there. I tried commenting "'hyperkitty'," in
>> INSTALLED_APPS, but then I got a 500.
> INSTALLED_APPS = (
> 'postorius',
> 'django_mailman3',
> # Uncomment the next line to enable the admin:
> 'django.contrib.admin',
> # Uncomment the next line to enable admin documentation:
> # 'django.contrib.admindocs',
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'django.contrib.messages',
> 'django.contrib.staticfiles',
> 'django_gravatar',
> 'allauth',
> 'allauth.account',
> 'allauth.socialaccount',
> )
>
>
> This is how it should look like if you want to remove Hyperkitty. There
> are a few other settings you should remove.
>
> https://gitlab.com/mailman/postorius/blob/master/example_project/settings.py
>
> This is a Postorius only configuration for reference.
>
>
>> _______________________________________________
>> 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/
>>
Hi,
I gave it a try, but I was not able to disable hyperkitty. I compared the settings in the link you gave and I see a lot of differences. Some of them I am not sure why they are missing in other example settings.
Currently I would say, I will keep the archive link there until it is more clear for me how to set things up. Since archiving is disabled, there will be no data in the archive. That is okay for the moment.
Regards
Torge
6 years, 9 months
Re: Change the default value for the General Archive Policy
by Stephen J. Turnbull
Markus Grandpré writes:
> many thanks for your reply. When I create a mailing list without an
> archive,
You cannot do that in Postorius. All of the "style" options provide
for an archive. "Ordinary discussion" and "announce" have public
archives, and the last option is "discussion with private archives".
How are you doing this?
> "Settings > Archiving > Archive policy" is always set to "Public
> archives". I was wondering if it's possible to change the default
> to "Do not archive this list" instead.
The choices for setting are defined at line 386 (or so) of
postorius/forms/list_forms.py:
archive_policy_choices = (
('public', _('Public archives')),
('private', _('Private archives')),
('never', _('Do not archive this list')),
)
This is implemented as a line of radio buttons. There is no default
for a *new* list, it's implied by the style choice. For an existing
list you are shown the current setting -- there's no default to change
to, you have to click on a button. If by "default" you mean "first in
the list", you can patch the form in Postorius, but we're not going to
change the order, since our primary audience is public discussion
lists.
In theory we could provide a mechanism to configure the order, but I
think that's very unlikely to happen -- Mailman isn't and doesn't want
to be Emacs.
--
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
7 months
Re: mailing list aliases
by Abhilash Raj
On Fri, 2018-01-19 at 16:30 -0800, Mark Sapiro wrote:
> On 01/19/2018 03:09 PM, Dmitry Makovey wrote:
> > Not sure whether to mark this "SOLVED" yet - but when I manually updated
> > postgres DB with the aliases I wanted - everything started to work as
> > expected.
> >
> > so it does sound like a bug in mailman-core 3.3.0 . Shall I file it or
> > was it already fixed in 3.3.1 (anouncement page didn't list that fix)
>
>
> As far as I know, this is not a bug in core. It is
> <https://gitlab.com/mailman/postorius/issues/58> however, this may in
> fact be a bug in the REST API in which case I don't think it's fixed in
> API 3.3.1
I guess we are all talking about the same thing, but just to mention, 3.1.1 is
the latest release (instead of 3.3.1).
>
> > > 2. Related to #1 - we've migrated our mailing lists from foo(a)my.com to
> > > foo(a)lists.my.com however we've preserved old addresses. But in new setup
> > > mail sent in gets stopped for moderation with: "X-Mailman-Rule-Hits:
> > > implicit-dest" . What's the best course of action here to get mailing
> > > list respond to multiple email addresses?
>
>
> acceptable_aliases is the way to address this, but as you note, it can't
> be properly set via Postorius and possibly via REST.
>
> _______________________________________________
> Mailman-users mailing list
> mailman-users(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
--
thanks,
Abhilash Raj
8 years
Re: moving list from mm3 -> mm3
by Mark Sapiro
On 12/8/23 08:01, Jens Günther wrote:
>
> This is a nice collection of the configuration of a certain list. Does
> anybody know how I would get this data back to the newly created list in
> the second working mm3-instance? Shouldn't it be possible via POST
> command? I thought of something like:
>
> curl -u restadmin:restpass -d @short.domain -H "Content-Type:
> application/json" localhost:8001/3.1/lists/&short.&domain/config
>
> But it returns {"title": "405 Method Not Allowed"} and I don't know
> where to look in the docs, since it shows almost always a way through
> mailman shell.
You need a PUT command, not POST. Try the above with `-X PUT`.
> ## Members, moderators, owners
>
> To export all members I normally run within mm-core-container as user
> mailman the following command:
>
> mailman members &short.&domain > &short.txt
>
> To fill them back in, it can be done in Postorius (or is there a way
> through API?).
You can use Postorius -> Mass operations -> Mass subscribe to add the
members, but you can't do that for owners and moderators. Also you lose
information about the members such as Delivery status, Delivery mode and
other user settings.
> What I would love to know is how to get out Owners of the corresponding
> lists and reimport them in the new one (which will be the same at the
> end :-D but different instance).
You can use the --role option with `mailman members` to get owners and
moderators, but short of a custom script, you have to add them manually.
> ## registered users
>
> This part is somehow tricky, since I have no clue how to do it. Some of
> the mailinglist-admins don't want to bother their list-owners again with
> registering newly on the other system. Is there a way to export all
> users (I think I found them in the DB in the table auth_users, somehow
> in combination with account_emailaddress) and get them over to the new
> instance (actually I just need part of them, but that's another question
> that I might solve lateron on my own).
>
> Maybe the answer is already here:
> https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/rest/docs/…
> -> but can somebody help to get this working (import/export)?
That is not the answer. Those are Mailman core users, not Django (web
login) users. You need to get the relevant entries from the auth_users
and account_emailaddress tables and add them to the new DB.
--
Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
2 years, 1 month
Re: Deactivate list without deleting it?
by Colin Watson
On Tue, Jan 16, 2018 at 10:59:28AM +0900, Stephen J. Turnbull wrote:
> Colin Watson writes:
>
> > Ideally, I'd like mailing lists to have a "deactivated" state in
> > addition to full deletion. In this state, the list would appear
> > nonexistent for most purposes: incoming email would be rejected,
> > Postorius would deny its existence, etc.
>
> [...]
>
> > Has there been any discussion of this in the past, or any advice as to
> > implementation strategy?
>
> I don't recall anybody discussing this. Your use case is your use
> case, but I think if we were going to implement this I'd probably want
> "partial" deactivation where the archives remain available but no mail
> is delivered, can't subscribe, etc. I'm also not sure I'd want
> Postorius to deny it ever existed. That seems rather unfriendly
> (again, I don't understand your use case, so that is not a comment on
> your requirements).
I possibly should have explained our situation in a little more detail.
The way we have things set up with Mailman 2.1 is that any team in
Launchpad (teams are basically just a collection of people, with varying
policies on who can join them etc.) can have a mailing list if its
administrators want one, and they enable it in the Launchpad web UI. If
you want to subscribe to one of these lists, you join the team in
question and you press the "Subscribe to mailing list" button.
Launchpad runs the show and tells Mailman exactly what to do. So in
fact we have all of Mailman's user interface disabled except for the
list archives, and Postorius wouldn't come into it in our case - I
probably shouldn't have confused things by bringing it up
hypothetically.
We'd probably want to do roughly the same kind of thing with Mailman 3,
at least to start with, though we may well want to make some of
HyperKitty's advanced features work with single-sign-on integration. I
haven't looked into that in any detail yet.
I can definitely see that both "preserve archives" vs. "hide archives"
are potentially useful things to do.
> It seems to me that dump, delete, and restore may be the best approach
> for the HyperKitty side because HyperKitty maintains all that state.
> Of course this could be done inside the database. Also, perhaps you
> can (ab)use the ArchivePolicy enum by adding an "inactive" element,
> but core has no way to enforce those on the archiver (which can be a
> third party host like mail-archive.com) and I'm not sure HyperKitty
> ever consults core about that once the archive is created.
I'd been thinking more of a new enum in HyperKitty for the visibility
state, since it does seem like quite an archiver-specific thing.
(Dump/delete/restore would of course be possible, but it's somewhat
cumbersome to do externally and it seems like an odd way to go about
things internally given the ability to change the DB schema.) I agree
that not all archiver implementations can support this.
> I'm not sure what you mean about IArchiver; as far as I can see that
> interface is sort of half-duplex: it provides the information core
> needs *about* the archiver to do core's side of archiving, not for
> core to communicate *with* the archiver. In fact all of the concrete
> code is callbacks provided by the archiver, and once a message is
> archived the core forgets about it. So this isn't "just" an
> extension; it's a fundamental redesign of IArchiver.
Well, IArchiver.archive_message sends a message from core to the
archiver. I'd been thinking of something like
IArchiver.set_list_visibility(mlist, visibility) which would send a
message from core to the archiver to instruct it to show/hide the
archives. It doesn't seem too out of line, though I'm not wedded to it
either.
I suppose that one alternative could be that we handle this in a
Launchpad-specific add-on to HyperKitty, since at a minimum we'll need
some of our own code there to deal with sign-in for private lists. So
the same bit of custom code that determines whether a list's archives
are private could hide them from everyone except their owner, or even
deny their existence entirely. It sounds like maybe we'd be better off
pursuing that?
> I'm not sure that's not a good thing, but we do need to think about
> it. ISTM we're gradually converging back on the monolithic approach
> to MLM, with the distribution, administration, and archiving quite
> tightly interwoven, and I'm not sure I like that. OTOH, we do get a
> lot of requests for ever more bundling.
Given our requirements, the decreased coupling in Mailman 3 is a very
good thing, and I'm definitely not looking for more bundling. I hope
I've clarified that above.
Thanks,
--
Colin Watson [cjwatson(a)ubuntu.com]
8 years