Re: Verification links to localhost
by Lars Bjørndal
Hi!
You wrote:
> On Sun, Feb 5, 2023 at 10:23 AM Lars Bjørndal <[1]lars(a)lamasti.net> wrote:
>
> Hi, and than you for your quick reply!
>
> You wrote:
>
> > On Sun, Feb 5, 2023 at 9:51 AM Lars Bjørndal <[1][2]lars(a)lamasti.net>
> wrote:
> >
> > The verification link I get back when trying to add an account,
> referes
> > to localhost, e.g.
> >
> > To confirm this is correct, go to [2][3]https://localhost:8000/
> accounts/
> > confirm-email/Mw:1...
> >
> > Where do I change that?
> >
> >
> > What do you have as POSTORIUS_TEMPLATE_BASE_URL value in settings?
>
> I don't have this variable anywhere in /etc/mailman3. However, I found it
> here:
>
> ./venv/lib/python3.10/site-packages/mailman_web/settings/
> mailman.py:POSTORIUS_TEMPLATE_BASE_URL = '[4]http://localhost:8000'
>
> In which config file should that variable be set, and how do I set it so
> that mailman can works for multiple domains?
>
>
> Because it is still too early in your quest to get to run Mailman3, I'd advise
> that you take your time to follow this guide:
> [5]https://docs.mailman3.org/en/latest/install/virtualenv.html#
> It is the official installation guide.
Yes, I've followed it, maybe with some errors.
> There is a step where it tells you to create a file named settings.py, in a
> particular path. You really need that step.
Yes, I have the file /etc/mailman3/settings.py, but in that file, I didn't have the variable in question.
> Regarding your question about multiple domains, that is already well taken care
> of when you create a list either via Postorius or the cli:
> (venv) [mailman@gw /opt/mailman]$mailman create [6]list1(a)domain1.name
> (venv) [mailman@gw /opt/mailman]$mailman create [7]another-lis(a)domain2.name
>
> Mailman will know how to handle this in conjunction with your MTA.
That's right. But, still, when I set the SITE_ID = 0, I get an server error when trying to connect. I also get mail from Django that states the error. I'm not sure how to fix it.
Thanks, Lars
[...]
> References:
>
> [1] mailto:lars@lamasti.net
> [2] mailto:lars@lamasti.net
> [3] https://localhost:8000/accounts/
> [4] http://localhost:8000/
> [5] https://docs.mailman3.org/en/latest/install/virtualenv.html#
> [6] mailto:list1@domain1.name
> [7] mailto:another-lis@domain2.name
1 year, 9 months
What is this EMail trying to tell me
by Martin Lorenz
Since I rebootet my VPS yesterday I get tons of these and can't find out what's wrong.
Please help.
-------- Weitergeleitete Nachricht --------
Betreff: [Django] ERROR (EXTERNAL IP): Service Unavailable: /mailman3/lists/ku-venne-2020.list.poc.im/
Datum: Fri, 09 Dec 2022 04:58:15 -0000
Von: django(a)poc.im
An: root@localhost
Service Unavailable: /mailman3/lists/ku-venne-2020.list.poc.im/
Report at /mailman3/lists/ku-venne-2020.list.poc.im/
Service Unavailable: /mailman3/lists/ku-venne-2020.list.poc.im/
Request Method: GET
Request URL: http://list.holoclan.de/mailman3/lists/ku-venne-2020.list.poc.im/
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, 9 Dec 2022 04:58:15 +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')
Request information:
USER: AnonymousUser
GET: No GET data
POST: No POST data
FILES: No FILES data
COOKIES: No cookie data
META:
HTTP_ACCEPT = '*/*'
HTTP_ACCEPT_CHARSET = 'utf-8;q=0.7,iso-8859-1;q=0.2,*;q=0.1'
HTTP_CONNECTION = 'close'
HTTP_HOST = 'list.holoclan.de'
HTTP_USER_AGENT = 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help(a)moz.com)'
HTTP_X_FORWARDED_FOR = '216.244.66.197'
HTTP_X_FORWARDED_HOST = 'list.holoclan.de'
HTTP_X_FORWARDED_PROTO = 'http'
PATH_INFO = '/mailman3/lists/ku-venne-2020.list.poc.im/'
QUERY_STRING = ''
REMOTE_ADDR = '127.0.0.1'
REQUEST_METHOD = 'GET'
REQUEST_URI = '/mailman3/lists/ku-venne-2020.list.poc.im/'
SCRIPT_NAME = ''
SERVER_NAME = 'arda.holoclan.de'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
uwsgi.core = 1
uwsgi.node = b'arda.holoclan.de'
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 0x7f8d77ae15f0>
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 = 'https'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_UNIQUE_EMAIL = True
ADMINS = "(('Mailman Suite Admin', 'root@localhost'),)"
ALLOWED_HOSTS = ['localhost', '127.0.0.1', 'list.holoclan.de', 'list.poc.im', 'list.lorenz.im']
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 0x7f8d816d30d0>
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_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': 'mailmanweb', '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)list.poc.im'
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_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': '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 = 'django(a)poc.im'
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'
1 year, 11 months
Issues encountered while upgrading to 3.3.7
by Odhiambo Washington
Hello everyone,
I am starting a new thread on this so that the issues I encountered do not
get mixed up with the other discussions.
Over the weekend I upgraded an MM3 installation to the latest versions of
the components.
I started off by creating a new venv, installing and then migrating the
configurations and the scripts.
In the end, I ended up with MM3 Core ==3.3.7,
postorius==1.3.7, HyperKitty==1.3.6, django==4.1.3.
1. SQLAlchemy - At the stage where one runs 'mailman info', I encountered
the first error:
: sqlalchemy.exc.NoSuchModuleError: Can't load plugin:
sqlalchemy.dialects:postgres
This is solved by a change in mailman.cfg so that the URI starts with
postgresql:// instead of postgres://.
SQLAlchemy used to accept both but has removed support for the postgres
name.
<https://github.com/sqlalchemy/sqlalchemy/issues/6083#issuecomment-801478013>
2. Django==4.x
At the point of running the post-update processes, particularly the
"migrate" bit, I got the following error:
: ImportError: cannot import name 'url' from 'django.conf.urls'
(/opt/mailman/mm/venv/lib/python3.9/site-packages/django/conf/urls/__init__.py)
I understand this is a consequence of the django.conf.urls.url() having
been deprecated starting version 3 and has been removed in version 4 of
Django.
https://docs.djangoproject.com/en/4.1/releases/4.0/#features-removed-in-4-0
The upgrade process seems to have brought in the newer version of Django
because now I have 4.1.3 up from 3.x
If anyone wants, I found an elaborate explanation at
https://bobbyhadz.com/blog/python-importerror-cannot-import-name-url-from-d…
.
My Google-fu found suggestions that in urls.py, I should import re_path and
use it, or alias it for url for the migrate to work.
The solution I used was to alias url to re_path, but I am considering just
doing away with url altogether. Not sure which is the better option between
using re_path or path.
So here is the patch I have used:
(venv) mailman@lists:~/mm$ diff -u urls.py.bak urls.py
--- urls.py.bak 2022-12-03 12:20:28.028090659 +0300
+++ urls.py 2022-12-03 12:36:20.298875624 +0300
@@ -17,7 +17,8 @@
# Postorius. If not, see <http://www.gnu.org/licenses/>.
-from django.conf.urls import include, url
+from django.conf.urls import include
+from django.urls import re_path as url
from django.contrib import admin
from django.urls import reverse_lazy
from django.views.generic import RedirectView
3. The last issue that I encountered is one I kind of solved, but
completely don't understand the consequences of the solution I applied:
/opt/mailman/mm/bin/django-admin migrate
<CUT>
System check identified some issues:
WARNINGS:
django_mailman3.MailDomain: (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
DjangoMailman3Config.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
django_mailman3.Profile: (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
DjangoMailman3Config.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Attachment: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Email: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Favorite: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.LastView: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.MailingList: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Profile: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Tag: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Tagging: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Thread: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.ThreadCategory: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
hyperkitty.Vote: (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
HyperKittyConfig.default_auto_field attribute to point to a subclass of
AutoField, e.g. 'django.db.models.BigAutoField'.
postorius.EmailTemplate: (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
PostoriusConfig.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
</CUT>
Here again, Google-fu came to the rescue. I added the following line to
settings_local.py and the warnings were suppressed.
DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'
I need to understand how this affects everything and how this is likely to
impact the functionality of MM3. What is the proper solution for this?
And should it be django.db.models.BigAutoField or
django.db.models.AutoField? Which is which?
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
1 year, 11 months
Re: Member Issue Discovered
by Brian Carpenter
On 10/19/20 9:04 PM, Mark Sapiro wrote:
> I suppose it could be considered a bug, but what's happening is your
> initial subscribe created a user and and address and set the user's
> preferred address to the created address. It also set the display_name
> of the address and it subscribed the user to the list or possibly the
> address to the list depending on what actually did the subscribe.
>
> When the user/address was unsubscribed, it is removed from the list's
> membership and the list was removed from the user's memberships, but the
> user and address still existed.
>
> Then when you resubscribed, the existing user/address was made a member
> of the list, but not updated so the "new" display_name was ignored. I
> think this is also the case if the original address had no display_name.
>
> You could say this is a bug and the display_name associated with this
> new subscription should replace the prior one, but what if that address
> was subscribed to other lists and didn't want the display_name changed
> on those lists.
>
> Ideally (perhaps) there could be multiple address records with the same
> email address and different display_names, but address records are keyed
> by email address, so this can't be.
>
> One workaround would be for a user who wanted to have an address with
> different display_names for different lists to have multiple addresses
> likeaddress+list1@example.com,address+list2@example.com, etc.
>
> Is this really an issue that should be fixed or just a curiosity?
No. No. No.
No one set their preferred address here at all. The first incident was
an imported list member who was not a registered user. They wanted their
real name changed to something else. The list owner tried to figured out
how to do that, found no way to do it, figured out it was just easier to
unsubscribe them, and resubscribed them to the list using a different
name. The old name showed up again. This is a bug and please fix it
soon. This has nothing to do with being subscribed to other lists. I can
probably come up with a workaround using Affinity (one of the benefits
of moving away from Postorius) but I can't imagine this not being a
serious issue as Mailman 3/Postorius is more widely adopted.
--
Brian Carpenter
Harmonylists.com
Emwd.com
4 years, 1 month
Re: Easiest way to install a new mailman3 deployment?
by Allan Hansen
All,
I asked Brian to help with the installation of Mailman after I and 2 experts each made attempts and got bogged down in incomprehensible installation instructions and gave up. Brian did it in short order and has been extremely helpful since.
No, he is not paying me for this. No, I have not invested in EMWD.
Yes, I just want to recommend a service that is more than worth it.
Happy New Year to all. Especially to the tireless people who have supported Mailman installations for decades, including my own installations.
Without you, not many installations would be humming.
Yours,
Allan Hansen
hansen(a)rc.org
> On Dec 31, 2020, at 17:28 , Brian Carpenter <brian_carpenter(a)emwd.com> wrote:
>
>
>
> On 12/31/20 8:13 PM, ieso(a)johnwillson.com wrote:
>> So I've been trying for the last two weeks to get a new mailman3 server running on a virtualized server (any server), and I'm turning to this list after having failed many times and running out of holiday time.
>>
>> I started trying a non-docker installation on Ubuntu 18.04 (https://docs.google.com/document/d/1xIcSsoNFp2nHi7r4eQys00s9a0k2sHhu1V5Plan…) , which got me the closest. Except I had a problem with inbound email only being triggered when it came from certain accounts. But that clearly wasn't good enough for production, so after many attempts to figure out where it was failing, I decided to turn to docker as a solution that should be cleaner.
>>
>> A few attempts at doing a docker installation on digitalocean.com failed, which I realized might be due to it not routing private IP addresses, so I moved to AWS after checking that their VPC policy would fit mailman's docker requirements. I found a great but slightly outdated guide on how to do this (https://xiaoxing.us/2018/01/01/deploy-mailman-3-on-aws-using-docker/). By this point I knew enough to correct a number of places where the environment had changed since the procedure was written, but postorius still failed at the curl test.
>>
>> The challenge for me has been the difficulty to know how to troubleshoot the different different systems and network infrastructure that are used to keep mailman3 humming. I've tried about 7 different installation walkthroughs (there are no recent ones on Youtube by the way, in case anyone wants to seize that opportunity!), and the good guides provide ways to check each stage to try to help you a bit on that front.
>>
>> Nonetheless, I feel stuck and thought I'd ask the simple question... for a completely basic, barebones new installation, what's the easiest way to get a mailman3 installation up-and running? (e.g. Which server provider? Which operating system and version? Docker or otherwise?)
>>
>> Any pointers highly appreciated. Google Groups is clearly on its way out, as it no longer allows for people to easily join groups by sending an email or clicking a link, so that should be a big opportunity for mailman3 to step up and help give those mailing list migrants a new home... which is what we're looking for. We're just not quite as smart as you guys. ;-)
>> _______________________________________________
>> 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/
>
> If you are looking for commercial assistance, please visit our Mailman 3 hosting site at https://mailmanhost.com (Harmony Lists). Feel free to contact me off list if you have any questions.
>
> For us, we chose Debian 10, Postfix, Nginx, and PostgreSQL as the server environment for Mailman 3. We used PIP via a Python virtual environment to install Mailman 3 from source. The Debian packages I believe have older versions of Mailman 3/Postorius/Hyperkitty which is why we went with source. I have a walk-through that is a work in project at:
>
> https://wiki.list.org/DOC/Howto_Install_Mailman3_On_Debian10
>
> I am available to hire to install Mailman 3 for you if you want to run your own server.
>
> With Harmony Lists, we went a step further with Mailman 3 and created our own custom interfaces: Affinity (admin) and Empathy (forum/archive). However they are only available to our own Mailman 3 clients.
>
> Have a Happy New Year.
>
> --
> Brian Carpenter
> Harmonylists.com
> Emwd.com
> _______________________________________________
> Mailman-users mailing list -- mailman-users(a)mailman3.org
> To unsubscribe send an email to mailman-users-leave(a)mailman3.org
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
3 years, 10 months
Re: [Mailman-Developers] How to know the URLs for CURL while getting or modifying the data of mailman 3
by Stephen J. Turnbull
Shashi,
This whole thread is off-topic for the developers list. This list is
for development of Mailman, not for teaching people to use it. Read
the whole recommended documentation before you ask busy developers to
tutor you in very basic things. There's a mailman-users(a)mailman3.org
list for users to help each other. All of the Mailman developers who
might be willing to answer your questions are there as well, but there
are also many experienced users, some of whom have experimented with
the REST API who will also help. Please reply there for further
help. (Reply-To is set.)
That said, there are plenty of URLs in the API documentation. Here's
a hint: search for "dump_json". That function takes an URL. You may
want https: instead of http: in your URLs, and you may need to change
the port from 9001, depending on the configuration of your REST
server. Try it with simple GET requests for information first, such
as for domains or lists. You can also do these requests with an
ordinary web browser, though I don't know what it will do with the
JSON-formatted reply.
If you don't have domains and lists configured, I suppose the
informational requests will come back as empty JSON objects. It
should be safe to make them. You can either use Postorius to
bootstrap a few example domains, lists, and users, or (the hard way)
figure out how to POST appropriate requests. I don't recommend trying
to update the backend DBMS by hand; the schema is quite complicated.
I don't know how to use curl to update Mailman's databases. That
requires a POST request which I have never done with curl. The POST
request needs to be valid JSON.
The more I think about this, the less I think your idea of using curl
is worthwhile, because formatting JSON requests by hand is going to be
a real annoyance and a great way to mess up your database with
spurious information. You're really going to want programmatic
support for this. But that's already all available in Python in the
Mailman system.
It's up to you, but I feel a responsibility to warn you that using
curl is not going to be simpler than learning enough Python to do
these things.
Regards,
4 years, 7 months
Re: Is there a way of recording bounce messages?
by Mohsen Masoudfar
Thank you Mark!
[EXTERNAL EMAIL]
On 9/26/23 11:29, Mohsen Masoudfar wrote:
>
> I'm dealing with the same issue. Upon reviewing the logs, I've noticed a significant number of bounced emails for a particular mailing list. Gmail users have reported not receiving emails.
> I haven't been able to locate the "munge from" information. My current setup is using Mailman 3.1.1. I read it has been introduced in 3.2.
DMARC mitigations were introduced in Mailman 3.1.0. They should be
available in 3.1.1. They were first exposed in Postorius 1.1.0.
Where are you looking for DMARC mitigations?
>> Sorry, It was my misunderstanding. DMARC mitigation is functioning well for newly created lists, even with Gmail addresses.
>> I am suspicious that Gmail might be rejecting or bouncing emails from the list due to the reputation of those lists.
>> It's worth noting that I am not the owner of the lists, but admin the Mailman3 infrastructure. My objective is to determine if our suspicious is accurate, whether Gmail is rejecting emails because of the bad reputation. We have asked Google, but no response so far.
>> I am interested to know more about the reasons behind these bounces, they are all handled by Postfix and deleted.
> The Question is what to do with Mailman 3.1.1, if the upgrade is not an option.
>
> I get in the logs messages like below with several Queue-ids:
>
> Sep 25 09:03:55 localhost postfix/smtpd[26692]: 147583E927: client=a14-93.smtp-out.amazonses.com[54.240.14.93]
> Sep 25 09:03:55 localhost postfix/cleanup[26696]: 147583E927: message-id=<0100018acb94b326-fdf39193-144e-4fdc-8faf-0d3df54eb4ee-000000(a)email.amazonses.com>
> Sep 25 09:03:55 localhost postfix/qmgr[1298]: 147583E927: from=<>, size=24934, nrcpt=1 (queue active)
> Sep 25 09:03:55 localhost postfix/lmtp[26697]: 147583E927: to=<listname-bounces@servername>, relay=127.0.0.1[127.0.0.1]:8024, delay=0.03, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (250 Ok)
> Sep 25 09:03:55 localhost postfix/qmgr[1298]: 147583E927: removed
This only says that some Amazon MTA has relayed a bounce to Mailman. It
says nothing about why the message bounced.
>> Is there a way to send them to a mailbox? Or prevent them from being deleted, so that I can look into the message body?
--
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://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.mai…<https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/>
Archived at: https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.mai…<https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…>
This message sent to mmasoudf(a)aaas.org
1 year, 2 months
Re: list admin via email
by Mark Sapiro
On 10/28/21 9:33 AM, Christian Stalberg via Mailman-users wrote:
> I'm unclear on how to approve via email a message sent to a list.
>
> As list owner you receive a 'requires approval' email. It then says:
>
> "If you reply to this message, keeping the Subject: header intact, Mailman
> will discard the held message. Do this if the message is spam. If you
> reply to this message and include an Approved: header with the list password
> in it, the message will be approved for posting to the list. The Approved:
> header can also appear in the first line of the body of the reply."
>
> Question: if I want to approve the message, where do I "...include an
> Approved: header with the list password in it" ?
First of all, the required password is the list's moderator password. If
the list was imported from Mailman 2.1 and the list's moderator password
was set there, it was imported. Otherwise, you must set one. You can't
currently do this via postorius it has to be done via `mailman shell` or
via the REST API. Via REST, something like
```
curl --user restadmin:restpass -X PATCH --data
'moderator_password=new_password'
http://localhost:8001/3.1/lists/list.example.com/config
```
should do it. Via `mailman shell` you need to encrypt the password
before setting it. e.g.
```
mailman shell -l list.example.com
Welcome to the GNU Mailman shell
Use commit() to commit changes.
Use abort() to discard changes since the last commit.
Exit with ctrl+D does an implicit commit() but exit() does not.
The variable 'm' is the list.example.com mailing list
>>> from mailman.config import config
>>> m.moderator_password =
config.password_context.encrypt('new_password').encode('utf-8')
```
That said, the message to which you refer has three MIME parts and what
you quote is from the message/rfc822 part at the end and "reply to this
message" means reply to the message in that part, not to the message you
received. I.e you have to reply to the -request address with the
appropriate `confirm <token>` in the Subject:
Then if your MUA makes it easy, you can include the password as the
value of an Approved: header in that reply. Otherwise, you can include
```
Approved: ...
```
as the first line of the plain text reply.
--
Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
3 years
Re: Can login at /admin, but cannot login at the account/login page.
by Abhilash Raj
> On Aug 15, 2021, at 11:33 AM, Mark Sapiro <mark(a)msapiro.net> wrote:
>
> On 8/14/21 9:34 PM, Stephen J. Turnbull wrote:
>> I'm sorry, I'm in a "second vaccination" fog at the moment (mending
>> but concentration lasts only about 10 minutes), so I'll answer what I
>> know offhand since Abhilash is busy and Mark is probably offline for
>> vacation by now.
>
>
> Not quite, but very soon.
>
>
>> pabsta(a)gmail.com writes:
>> > However, if logout and attempt to login from the postorius website,
>> > I get a « 502 bad gateway » error after roughly 30 seconds. The
>> > logs in Systemctl for gunicorn register a "DIGEST-MD5 common mech
>> > free" error message
> >
>> I would guess this is also just a connection drop because it doesn't
>> receive the expected response within timeout.
>
>
> I'm sure that's right.
>
>
>> > and the nginx error logs just show a connection drop:
>> >
>> > 2021/08/12 18:11:09 [error] 26026#26026: *31 upstream prematurely closed connbection while reading response header from upstream, client: [ip redacted], server:
>> > [domain redacted], request: "POST /accounts/login/ HTTP/2.0", upstream: "http://127.0.0.1:8006/accounts/login/", host: "[domain redacted]", referrer: "https://[domain redacted]/accounts/login/?next=/mailman3/lists/"
>> a >
>
> I see in the above `upstream: "http://127.0.0.1:8006/accounts/login/",` but in your settings
>
> ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
>
>
> I suspect you may be getting a redirect from http to https which is losing POST data and you need to change
>
> proxy_pass http://127.0.0.1:8006;
>
> in your nginx configuration to
>
> proxy_pass https://127.0.0.1:8006;
>
> or set
>
> ACCOUNT_DEFAULT_HTTP_PROTOCOL = "http"
>
This configuration actually doesn’t really dictate connection related configs, but mostly, the protocol to use in the emails generated by django-allauth to verify email and such. It shouldn’t have affect on the problem IMO.
> --
> 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)
3 years, 3 months
Getting rid of held messages from the command line
by Aymeric Mansoux
Hello,
We're currently running some of Mailman software, as available via pip, namely:
- mailman 3.1.1 (pip3)
- postorius 1.1.2 (pip2)
- hyperkitty 1.1.4 (pip2)
- mailmanclient 3.1.1 (pip3)
So far so good, however, for some reasons, a couple of our lists have started to accumulate held messages that cannot be manipulated via the REST API. Regardless if we use the web interface or mailmanclient, it ends up with:
Mar 14 10:58:32 2018 (24287) REST request handler error:
Traceback (most recent call last):
File "/usr/lib/python3.5/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/local/lib/python3.5/dist-packages/mailman/database/transaction.py", line 50, in wrapper
rtn = function(*args, **kws)
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/wsgiapp.py", line 214, in __call__
return super().__call__(environ, start_response)
File "/usr/local/lib/python3.5/dist-packages/falcon/api.py", line 244, in __call__
responder(req, resp, **params)
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/post_moderation.py", line 167, in on_get
resource = self._make_collection(request)
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/helpers.py", line 159, in _make_collection
for resource in collection]
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/helpers.py", line 159, in <listcomp>
for resource in collection]
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/post_moderation.py", line 157, in _resource_as_dict
resource = self._make_resource(request.id)
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/post_moderation.py", line 70, in _make_resource
resource = super()._make_resource(request_id)
File "/usr/local/lib/python3.5/dist-packages/mailman/rest/post_moderation.py", line 39, in _make_resource
results = requests.get_request(request_id)
File "/usr/local/lib/python3.5/dist-packages/mailman/database/transaction.py", line 85, in wrapper
return function(args[0], config.db.store, *args[1:], **kws)
File "/usr/local/lib/python3.5/dist-packages/mailman/model/requests.py", line 120, in get_request
result.data_hash, expunge=False)
File "/usr/local/lib/python3.5/dist-packages/mailman/database/transaction.py", line 85, in wrapper
return function(args[0], config.db.store, *args[1:], **kws)
File "/usr/local/lib/python3.5/dist-packages/mailman/model/pending.py", line 138, in confirm
value = json.loads(keyvalue.value)
File "/usr/lib/python3.5/json/__init__.py", line 319, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.5/json/decoder.py", line 339, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.5/json/decoder.py", line 355, in raw_decode
obj, end = self.scan_once(s, idx)
json.decoder.JSONDecodeError: Unterminated string starting at: line 1 column 1 (char 0)
Mar 14 10:58:32 2018 (24287) 127.0.0.1 - - "GET /3.1/lists/xx(a)xx.xx/held HTTP/1.1" 500 59
Is there a way to manipulate/see/remove these mails differently? Right now this prevent moderation of any held messages (note: some lists do not suffer from this and the held panel or mailmanclient works perfectly fine).
Thanks!
6 years, 8 months