signup / registration error - permissions and cert chains
I'd like for regular (non-admin) list subscribers to be able to manage their subscription preferences and view list archives.
However, when new users attempt to create logins from the Postorius "Sign Up" page, the server returns the error pasted below, and displays a "server error" page to users.
If I'm reading the error correctly, this is related to an inability to verify the cert chain. The /etc/mailman3/settings.py file points to the same cert and key files used by Nginx, Postfix, and Dovecot. Since TLS works OK with these other services, it appears the cert and key are valid. (Viewing the cert in a web browser also supports this.)
The keyfile has 0400 permissions. I tried changing this to 0640 and making the keyfile owned by root:mailman. Even after restarting mailman3 and mailmanweb the same error occurs. (Permissions in the cert and key directories and above are not blocking access.)
The etc/mailman3/settings.py file includes these settings:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 EMAIL_HOST_USER = 'dnewman@networktest.com' EMAIL_HOST_PASSWORD = 'wouldnt-you-like-to-know' EMAIL_USE_TLS = 'True' EMAIL_SSL_CERTFILE = '/etc/ssl/certs/myhost.crt' EMAIL_SSL_KEYFILE = '/etc/ssl/private/myhost.key'
But this might only be for email, not Postorius/Django. I checked the Mailman Web docs and settings reference but didn't see anything relevant on either page.
https://docs.mailman3.org/en/latest/config-web.html
https://docs.mailman3.org/projects/mailman-web/en/latest/settings.html
What additional configuration is needed to allow regular users to create and manage their own accounts?
Thanks.
dn
ERROR 2021-12-30 16:03:53,787 436935 django.request Internal Server Error: /accounts/signup/ Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper return bound_method(*args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper return view(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 230, in dispatch return super(SignupView, self).dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 74, in dispatch response = super(RedirectAuthenticatedUserMixin, self).dispatch( File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 204, in dispatch return super(CloseableSignupMixin, self).dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 102, in post response = self.form_valid(form) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 248, in form_valid return complete_signup( File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line 209, in complete_signup return perform_login( File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line 175, in perform_login send_email_confirmation(request, user, signup=signup, email=email) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line 346, in send_email_confirmation email_address.send_confirmation(request, signup=signup) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/models.py", line 62, in send_confirmation confirmation.send(request, signup=signup) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/models.py", line 169, in send get_adapter(request).send_confirmation_mail(request, self, signup) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/adapter.py", line 464, in send_confirmation_mail self.send_mail(email_template, emailconfirmation.email_address.email, ctx) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/adapter.py", line 136, in send_mail msg.send() File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/message.py", line 284, in send return self.get_connection(fail_silently).send_messages([self]) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 102, in send_messages new_conn_created = self.open() File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 67, in open self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile) File "/usr/lib/python3.9/smtplib.py", line 772, in starttls context = ssl._create_stdlib_context(certfile=certfile, File "/usr/lib/python3.9/ssl.py", line 787, in _create_unverified_context context.load_cert_chain(certfile, keyfile) PermissionError: [Errno 13] Permission denied
El viernes, 31 de diciembre de 2021 1:48:38 (CET) David Newman escribió:
I'd like for regular (non-admin) list subscribers to be able to manage their subscription preferences and view list archives.
That's a good way to go :-)
My response is more of a (very) old sysadmin and Django user (since 2008) hunch that a proper one based on code and documentation review, but I've been trying to contribute several times and always (super) Mark Sapiro beats me :-)
If I'm reading the error correctly, this is related to an inability to verify the cert chain. The /etc/mailman3/settings.py file points to the same cert and key files used by Nginx, Postfix, and Dovecot.
You are right in your diagnose but not in your interpretation (see my comment below inside the traceback). It is certificate related, but not for server TLS, but for CLIENT authentication.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 EMAIL_HOST_USER = 'dnewman@networktest.com' EMAIL_HOST_PASSWORD = 'wouldnt-you-like-to-know' EMAIL_USE_TLS = 'True' EMAIL_SSL_CERTFILE = '/etc/ssl/certs/myhost.crt' EMAIL_SSL_KEYFILE = '/etc/ssl/private/myhost.key'
All these settings above are used for SENDING messages and, if I'm not mistaken, the SSL key and cert are used for authenticating the user sending the email. Actually, using TLS and SMTP Auth for localhost is a bit too much. I've been configuring SMTP servers since 1990 and my mail servers just accept mail form localhost, if they are broken into, the user and password have already been exposed :-)
But this might only be for email, not Postorius/Django.
You are right (if I also am)
What additional configuration is needed to allow regular users to create and manage their own accounts?
I'd say that is more what is not needed (the SMTP TLS authentication)
I'll remove the "noise". These are the tell tale lines:
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smt p.py", line 67, in open self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile)
The SMTP Django backend is trying to connect to the mail server to send the Mailman account confirmation message and failing, probably because the user Django runs as cannot open the private key (which is a very sensible thing if that private key is the one used for the web facing TLS certificate, I can tell you how bad in private or search for my name, wasd, apache and VMS ;-))
That certificate is not needed for sending email from Django, and, as I said, not even SMTP Auth for sending via localhost. Actually, doing SMTP Auth on port 25 is not even recommended practice.
Happy, healthy, safe and well ventilated New Year to all.
-- Victoriano Giralt Innovation Director Digital Transformation Vicerectorate University of Malaga +34952131415 SPAIN
Note: signature.asc is the electronic signature of present message A: Yes.
Q: Are you sure ?
A: Because it reverses the logical flow of conversation.
Q: Why is top posting annoying in email ?
On Dec 31, 2021, at 03:43, Victoriano Giralt victoriano@uma.es wrote:
El viernes, 31 de diciembre de 2021 1:48:38 (CET) David Newman escribió:
I'd like for regular (non-admin) list subscribers to be able to manage their subscription preferences and view list archives.
That's a good way to go :-)
My response is more of a (very) old sysadmin and Django user (since 2008) hunch that a proper one based on code and documentation review, but I've been trying to contribute several times and always (super) Mark Sapiro beats me :-)
If I'm reading the error correctly, this is related to an inability to verify the cert chain. The /etc/mailman3/settings.py file points to the same cert and key files used by Nginx, Postfix, and Dovecot.
You are right in your diagnose but not in your interpretation (see my comment below inside the traceback). It is certificate related, but not for server TLS, but for CLIENT authentication.
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25 EMAIL_HOST_USER = 'dnewman@networktest.com' EMAIL_HOST_PASSWORD = 'wouldnt-you-like-to-know' EMAIL_USE_TLS = 'True' EMAIL_SSL_CERTFILE = '/etc/ssl/certs/myhost.crt' EMAIL_SSL_KEYFILE = '/etc/ssl/private/myhost.key'
All these settings above are used for SENDING messages and, if I'm not mistaken, the SSL key and cert are used for authenticating the user sending the email. Actually, using TLS and SMTP Auth for localhost is a bit too much. I've been configuring SMTP servers since 1990 and my mail servers just accept mail form localhost, if they are broken into, the user and password have already been exposed :-)
But this might only be for email, not Postorius/Django.
You are right (if I also am)
What additional configuration is needed to allow regular users to create and manage their own accounts?
I'd say that is more what is not needed (the SMTP TLS authentication)
I'll remove the "noise". These are the tell tale lines:
"/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smt p.py", line 67, in open self.connection.starttls(keyfile=self.ssl_keyfile, certfile=self.ssl_certfile)
The SMTP Django backend is trying to connect to the mail server to send the Mailman account confirmation message and failing, probably because the user Django runs as cannot open the private key (which is a very sensible thing if that private key is the one used for the web facing TLS certificate, I can tell you how bad in private or search for my name, wasd, apache and VMS ;-))
That certificate is not needed for sending email from Django, and, as I said, not even SMTP Auth for sending via localhost. Actually, doing SMTP Auth on port 25 is not even recommended practice.
Hi Victoriano,
Thanks for this. I could use some clarification on what specific changes you are suggesting. I *think* you are saying to remove the EMAIL_USE_TLS stuff and also move to another port (maybe 587), but I am not sure.
Also, the reason I added the TLS in the first place was that I was getting errors without it. And I am unclear why the cert / private key pair do not work for Django when they do work OK for Postfix, Nginx, and Dovecot.
Thanks for clarifying — and happy and safe 2022 to you as well!
dn
Happy, healthy, safe and well ventilated New Year to all.
-- Victoriano Giralt Innovation Director Digital Transformation Vicerectorate University of Malaga +34952131415 SPAIN
Note: signature.asc is the electronic signature of present message A: Yes.
Q: Are you sure ?
A: Because it reverses the logical flow of conversation.
Q: Why is top posting annoying in email ?
Mailman-users mailing list -- mailman-users@mailman3.org To unsubscribe send an email to mailman-users-leave@mailman3.org https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
On 12/30/21 4:48 PM, David Newman wrote:
The etc/mailman3/settings.py file includes these settings:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25
These 2 (localhost and port 25) are defaults.
EMAIL_HOST_USER = 'dnewman@networktest.com' EMAIL_HOST_PASSWORD = 'wouldnt-you-like-to-know'
Why are you authenticating? This should not be necessary.
EMAIL_USE_TLS = 'True' EMAIL_SSL_CERTFILE = '/etc/ssl/certs/myhost.crt' EMAIL_SSL_KEYFILE = '/etc/ssl/private/myhost.key'
And why are you trying to use TLS? This is only for SMTP between Django and the MTA on the loopback port. TLS is overkill.
But this might only be for email, not Postorius/Django.
Actually it is only for mail from Django
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 12/31/21 4:56 PM, Mark Sapiro wrote:
On 12/30/21 4:48 PM, David Newman wrote:
The etc/mailman3/settings.py file includes these settings:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25
These 2 (localhost and port 25) are defaults.
EMAIL_HOST_USER = 'dnewman@networktest.com' EMAIL_HOST_PASSWORD = 'wouldnt-you-like-to-know'
Why are you authenticating? This should not be necessary.
EMAIL_USE_TLS = 'True' EMAIL_SSL_CERTFILE = '/etc/ssl/certs/myhost.crt' EMAIL_SSL_KEYFILE = '/etc/ssl/private/myhost.key'
And why are you trying to use TLS? This is only for SMTP between Django and the MTA on the loopback port. TLS is overkill.
After stripping this down to the defaults:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25
and restarting mailman3 (necessary?) and mailmanweb, the system emails me (as alias for root) an error like the one pasted below after I try creating a new user account.
After changing EMAIL_HOST to the system's canonical FQDN and again restarting mailman3 and mailmanweb, the error is the same, and still from postorius@localhost.
Also, FWIW, the user is created and is visible in the Django admin panel, but any login attempt produces the same error as the one pasted below.
The hostname settings in postfix's main.cf are as follows:
# hostname myhostname = mail9.networktest.com myorigin = /etc/mailname mydomain = networktest.com
Here is the error, sanitized with 'dom1.tld' and 'dom2.tld' addresses. Thanks in advance for additional troubleshooting clues.
Internal Server Error: /accounts/signup/
SMTPRecipientsRefused at /accounts/signup/ {'newuser@dom1.tld': (504, b'5.5.2 postorius@localhost: Sender address rejected: need fully-qualified address')}
Request Method: POST Request URL: http://mail.dom2.tld/accounts/signup/ Django Version: 3.0.14 Python Executable: /opt/mailman/venv/bin/uwsgi Python Version: 3.9.2 Python Path: ['.', '', '/etc/mailman3', '/usr/lib/python39.zip', '/usr/lib/python3.9', '/usr/lib/python3.9/lib-dynload', '/opt/mailman/venv/lib/python3.9/site-packages'] Server time: Fri, 31 Dec 2021 17:30:30 -0800 Installed Applications: ['hyperkitty', 'postorius', 'django_mailman3', 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'django_gravatar', 'compressor', 'haystack', 'django_extensions', 'django_q', 'allauth', 'allauth.account', 'allauth.socialaccount'] Installed Middleware: ('django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.middleware.locale.LocaleMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', 'django.middleware.security.SecurityMiddleware', 'django_mailman3.middleware.TimezoneMiddleware', 'postorius.middleware.PostoriusMiddleware')
Traceback (most recent call last): File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/exception.py", line 34, in inner response = get_response(request) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 115, in _get_response response = self.process_exception_by_middleware(e, request) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/handlers/base.py", line 113, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 71, in view return self.dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/utils/decorators.py", line 43, in _wrapper return bound_method(*args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/views/decorators/debug.py", line 76, in sensitive_post_parameters_wrapper return view(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 230, in dispatch return super(SignupView, self).dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 74, in dispatch response = super(RedirectAuthenticatedUserMixin, self).dispatch( File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 204, in dispatch return super(CloseableSignupMixin, self).dispatch(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/django/views/generic/base.py", line 97, in dispatch return handler(request, *args, **kwargs) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 102, in post response = self.form_valid(form) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/views.py", line 248, in form_valid return complete_signup( File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line 209, in complete_signup return perform_login( File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line 175, in perform_login send_email_confirmation(request, user, signup=signup, email=email) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/utils.py", line 346, in send_email_confirmation email_address.send_confirmation(request, signup=signup) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/models.py", line 62, in send_confirmation confirmation.send(request, signup=signup) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/models.py", line 169, in send get_adapter(request).send_confirmation_mail(request, self, signup) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/adapter.py", line 464, in send_confirmation_mail self.send_mail(email_template, emailconfirmation.email_address.email, ctx) File "/opt/mailman/venv/lib/python3.9/site-packages/allauth/account/adapter.py", line 136, in send_mail msg.send() File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/message.py", line 284, in send return self.get_connection(fail_silently).send_messages([self]) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 109, in send_messages sent = self._send(message) File "/opt/mailman/venv/lib/python3.9/site-packages/django/core/mail/backends/smtp.py", line 125, in _send self.connection.sendmail(from_email, recipients, message.as_bytes(linesep='\r\n')) File "/usr/lib/python3.9/smtplib.py", line 885, in sendmail raise SMTPRecipientsRefused(senderrs)
Exception Type: SMTPRecipientsRefused at /accounts/signup/ Exception Value: {'newuser@dom1.tld': (504, b'5.5.2 postorius@localhost: Sender address rejected: need fully-qualified address')} Request information: USER: AnonymousUser
GET: No GET data
POST: csrfmiddlewaretoken = 'Nk6NjFAaf4bWPOWUZJzrKcTHvIHIXVjSdTb79KeRoM9LpRqK9ljKhXWdWKbfAwMf' email = 'newuser@dom1.tld' username = 'newuser@dom1.tld' password1 = '********************' password2 = '********************' next = '/accounts/login/'
FILES: No FILES data
COOKIES: roundcube_sessid = 'epth5c1jhmbjrfquire5p9chd9' csrftoken = 'uRqeKMsMSoItwOWLTRXT7dEwGoN0cCy2UqvyAR6t16Gi6RqB3tHcEYH27qhxPd1p'
META:
CONTENT_LENGTH = '217'
CONTENT_TYPE = 'application/x-www-form-urlencoded'
CSRF_COOKIE =
'uRqeKMsMSoItwOWLTRXT7dEwGoN0cCy2UqvyAR6t16Gi6RqB3tHcEYH27qhxPd1p'
HTTP_ACCEPT =
'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.9'
HTTP_CACHE_CONTROL = 'max-age=0'
HTTP_CONNECTION = 'close'
HTTP_COOKIE = 'roundcube_sessid=epth5c1jhmbjrfquire5p9chd9;
csrftoken=uRqeKMsMSoItwOWLTRXT7dEwGoN0cCy2UqvyAR6t16Gi6RqB3tHcEYH27qhxPd1p'
HTTP_DNT = '1'
HTTP_HOST = 'mail.dom2.tld'
HTTP_ORIGIN = 'https://mail.dom2.tld'
HTTP_REFERER = 'https://mail.dom2.tld/'
HTTP_SEC_FETCH_DEST = 'document'
HTTP_SEC_FETCH_MODE = 'navigate'
HTTP_SEC_FETCH_SITE = 'same-origin'
HTTP_SEC_FETCH_USER = '?1'
HTTP_SEC_GPC = '1'
HTTP_UPGRADE_INSECURE_REQUESTS = '1'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.110 Safari/537.36'
HTTP_X_FORWARDED_FOR = '75.82.86.131'
PATH_INFO = '/accounts/signup/'
QUERY_STRING = ''
REMOTE_ADDR = '127.0.0.1'
REQUEST_METHOD = 'POST'
REQUEST_URI = '/accounts/signup/'
SCRIPT_NAME = ''
SERVER_NAME = 'mail9'
SERVER_PORT = '8000'
SERVER_PROTOCOL = 'HTTP/1.0'
uwsgi.core = 1
uwsgi.node = b'mail9'
uwsgi.version = b'2.0.20'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input =
Settings:
Using settings module settings
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'http'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_UNIQUE_EMAIL = True
ADMINS = "(('Mailman Suite Admin', 'hostmaster@networktest.com'),)"
ALLOWED_HOSTS = ['localhost', '127.0.0.1', '162.251.233.247',
'mail9.networktest.com', 'lists.networktest.com', 'lists.dom1.tld',
'mail.dom2.tld']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = PosixPath('/opt/mailman/web')
CACHES = {'default': {'BACKEND':
'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
COMPRESSORS = {'css': 'compressor.css.CssCompressor', 'js':
'compressor.js.JsCompressor'}
COMPRESS_CACHEABLE_PRECOMPILERS = '()'
COMPRESS_CACHE_BACKEND = 'default'
COMPRESS_CACHE_KEY_FUNCTION = '********************'
COMPRESS_CLEAN_CSS_ARGUMENTS = ''
COMPRESS_CLEAN_CSS_BINARY = 'cleancss'
COMPRESS_CLOSURE_COMPILER_ARGUMENTS = ''
COMPRESS_CLOSURE_COMPILER_BINARY = 'java -jar compiler.jar'
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_FILTERS = {'css':
['compressor.filters.css_default.CssAbsoluteFilter',
'compressor.filters.cssmin.rCSSMinFilter'], 'js':
['compressor.filters.jsmin.rJSMinFilter']}
COMPRESS_JINJA2_GET_ENVIRONMENT =
dn
But this might only be for email, not Postorius/Django.
Actually it is only for mail from Django
On 12/31/21 5:37 PM, David Newman wrote:
After stripping this down to the defaults:
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend' EMAIL_HOST = 'localhost' EMAIL_PORT = 25
and restarting mailman3 (necessary?)
No
and mailmanweb, the system emails me (as alias for root) an error like the one pasted below after I try creating a new user account.
After changing EMAIL_HOST to the system's canonical FQDN and again restarting mailman3 and mailmanweb, the error is the same, and still from postorius@localhost.
localhost is better. If you set it to the system's canonical FQDN you need to ensure that that name or IP is in Postfix mynetworks.
...
Internal Server Error: /accounts/signup/
SMTPRecipientsRefused at /accounts/signup/ {'newuser@dom1.tld': (504, b'5.5.2 postorius@localhost: Sender address rejected: need fully-qualified address')} ... Settings: Using settings module settings ... DEFAULT_FROM_EMAIL = 'postorius@localhost'
Try setting this to a fully qualified address, e.g., something@networktest.com, not @localhost.
More info at https://docs.mailman3.org/en/latest/config-web.html#setting-up-email
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On 12/31/21 6:59 PM, Mark Sapiro wrote:
SMTPRecipientsRefused at /accounts/signup/ {'newuser@dom1.tld': (504, b'5.5.2 postorius@localhost: Sender address rejected: need fully-qualified address')}
...
Settings: Using settings module settings ... DEFAULT_FROM_EMAIL = 'postorius@localhost'
Try setting this to a fully qualified address, e.g., something@networktest.com, not @localhost.
Bingo. Thank you for this, and for helping so many MM users.
To a healthier, more clueful, and generally much improved 2022!
dn
More info at https://docs.mailman3.org/en/latest/config-web.html#setting-up-email
participants (3)
-
David Newman
-
Mark Sapiro
-
Victoriano Giralt