Re: Link to account
by Mark Sapiro
On 4/11/23 12:04, Lars Bjørndal wrote:
> Thanks a lot. Maybe I've done a mistake, it doesn.t work.
>
> At the bottom of /etc/mailman3/settings.py I have:
>
> ROOT_URLCONF = 'urls'
>
> `cat /etc/mailman3/urls.py`
>
> [...]
>
> urlpatterns = [
> path(
> '',
> RedirectView.as_view(url=reverse_lazy('list_index'), permanent=True),
> ),
> path('lists/mailman3/', include('postorius.urls')),
> path('lists/archives/', include('hyperkitty.urls')),
> path('lists/', include('django_mailman3.urls')),
> path('lists/accounts/', include('allauth.urls')),
> path('lists/admin/', admin.site.urls),
> ]
>
> In Apache config for the domain, I now have:
>
> <IfModule mod_proxy.c>
> ProxyPreserveHost On
> ProxyPass "lists/mailman3" "http://127.0.0.1:8000/lists/mailman3"
> ProxyPass "lists/archives" "http://127.0.0.1:8000/lists/archives"
> ProxyPass "lists/accounts" "http://127.0.0.1:8000/lists/accounts"
> ProxyPass "lists/admin" "http://127.0.0.1:8000/lists/admin"
> ProxyPass "lists/user-profile" "http://127.0.0.1:8000/lists/user-profile"
> </IfModule>
>
> Restarted mailmanweb, httpd and mailman3.
>
> If I go to list.punktskriftutvalget.no/mailman3/, I get a 404 Not Found response in browser.
>
> So what's wrong, do you think?
You followed
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/…
literally. The literal instructions where to access everything via URLs
like https://mydomain.org/lists/....
If you were to replace `lists` with `mailman3` everywhere in the abpve,
you would then access HyperKitty via a URL like
https://list.punktskriftutvalget.no/mailman3/archives/
and Postorius via
https://list.punktskriftutvalget.no/mailman3/mailman3/
If that's not what you want, it's more complicated and some things might
not be possible. What exactly do you want for access to Postorius,
HyperKitty, user accounts, user profiles and the Django admin UI?
--
Mark Sapiro <mark(a)msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
3 years, 5 months
Re: Installing mailman 3
by Rafael Mora
For testing purpose I turned back to false the DEBUG var and everything
started working fine with HyperKitty
I don't understand... this is the trace when I click Login from Postorius
to HyperKitty
[02/Aug/2017 16:43:42] "GET /postorius/lists/ HTTP/1.1" 200 3645
[02/Aug/2017 16:43:48] "GET /accounts/login/?next=/postorius/lists/
HTTP/1.1" 200 10950
[02/Aug/2017 16:43:49] "GET /static/CACHE/css/hyperkitty.2f591b4e31fe.css
HTTP/1.1" 200 156657
What should I check?
El mié., 2 ago. 2017 a las 10:56, Mark Sapiro (<mark(a)msapiro.net>) escribió:
> On 08/02/2017 07:55 AM, Rafael Mora wrote:
> > HyperKitty is looking for some files in /static/CACHE/... but it doesn't
> > find them:
> >
> > [02/Aug/2017 14:53:38] "GET /static/CACHE/css/b3547a2ab51b.css HTTP/1.1"
> > 404 107
> > [02/Aug/2017 14:53:38] "GET /static/CACHE/css/4c17bb8058aa.css HTTP/1.1"
> > 404 107
> > [02/Aug/2017 14:53:38] "GET /static/CACHE/css/2fa1cba00450.css HTTP/1.1"
> > 404 107
> > [02/Aug/2017 14:53:38] "GET /static/CACHE/js/4ce1260ef558.js HTTP/1.1"
> 404
> > 105
> > [02/Aug/2017 14:53:39] "GET /static/CACHE/js/4ce1260ef558.js HTTP/1.1"
> 404
> > 105
> >
> >
> > Should I run any command to activate the CACHE dir?
>
>
> You need to ensure you have a working sass compiler. As I said at
> <
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…
> >,
> See the third bullet under
> <http://docs.list.org/en/latest/prodsetup.html#dependencies>.
>
> Then you need to run commands like
>
> django-admin collectstatic --clear
> django-admin compress
>
>
> --
> 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
> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>
--
Atentamente / Best Regards
Ing. Rafael Mora
9 years, 1 month
Re: lmtp runner not starting
by Odhiambo Washington
On Sat, Apr 1, 2023 at 7:55 PM Guillermo Hernandez (Oldno7) via
Mailman-users <mailman-users(a)mailman3.org> wrote:
> This morning I upgraded the mailman3 installation of the less traffic
> server I have: a bunch of lists, with very slow traffic.
>
> (see pip lists at the end)
>
> I sent test mails to a pair of lists, but none were distributed or
> archived. postorius seemed working well. First I thought it was some I
> did wrong in the upgrade procedure, but then I realized the lmtp runner
> was not running.
>
> I followed old messages about similar problem (many of them in this same
> mailman-users list), but I cannot see what is wrong. There is no error
> logged in mailman.log. the mailman.cfg of the lmtp is the default (and
> was working at least a pair of weeks ago)
>
> *-*-*-*-*-*-*-*-* from mailman.cfg
>
> [mta]
> incoming: mailman.mta.postfix.LMTP
> outgoing: mailman.mta.deliver.deliver
> lmtp_host: 127.0.0.1
> lmtp_port: 8024
> smtp_host: localhost
> smtp_port: 25
> configuration: python:mailman.config.postfix
>
> *-*-*-*-*-*-*-*-*
>
> There is no one listening in port 8024. I tried changing the port (to
> 9024), with the same results.
>
> postfix seems working well. I's just there is nothing listening on port
> 8024 because lmtp runner is not running :)
>
> (from maillog):
>
> connect to 127.0.0.1[127.0.0.1]:8024: Connection refused
>
> (another simple test)
>
> root@www:/usr/local/mailman3 # telnet localhost 8024
> Trying 127.0.0.1...
> telnet: connect to address 127.0.0.1: Connection refused
>
> I'm running out of ideas. Any clue to somewhere to dig in?
>
>
> *-*-*-*-*-*-*-*-*-*-* runners started
>
> Apr 01 17:24:40 2023 (4681) out runner started.
> Apr 01 17:24:40 2023 (4680) virgin runner started.
> Apr 01 17:24:41 2023 (4679) command runner started.
> Apr 01 17:24:42 2023 (4688) retry runner started.
> Apr 01 17:24:43 2023 (4686) in runner started.
> Apr 01 17:24:44 2023 (4683) digest runner started.
> Apr 01 17:24:44 2023 (4684) nntp runner started.
> Apr 01 17:24:45 2023 (4682) archive runner started.
> Apr 01 17:24:46 2023 (4685) bounces runner started.
> Apr 01 17:24:47 2023 (4687) task runner started.
> Apr 01 17:24:47 2023 (4687) Task runner evicted 0 expired pendings
> Apr 01 17:24:47 2023 (4687) Task runner deleted 0 orphaned workflows
> Apr 01 17:24:47 2023 (4687) Task runner deleted 0 orphaned requests
> Apr 01 17:24:47 2023 (4687) Task runner deleted 0 orphaned messages
> Apr 01 17:24:47 2023 (4687) Task runner evicted expired cache entries
> Apr 01 17:24:48 2023 (4678) pipeline runner started.
> Apr 01 18:24:48 2023 (4687) Task runner evicted 0 expired pendings
> Apr 01 18:24:48 2023 (4687) Task runner deleted 0 orphaned workflows
> Apr 01 18:24:48 2023 (4687) Task runner deleted 0 orphaned requests
> Apr 01 18:24:48 2023 (4687) Task runner deleted 0 orphaned messages
> Apr 01 18:24:48 2023 (4687) Task runner evicted expired cache entries
>
> *-*-*-*-*-*-*-*-*-* pip lists with versions installed
>
> root@www:/usr/local/mailman3 # pip list | grep mailman
> django-mailman3 1.3.9
> mailman 3.3.8
> mailman-hyperkitty 1.2.1
> mailmanclient 3.3.5
>
> root@www:/usr/local/mailman3 # pip list | grep django
> django-allauth 0.51.0
> django-appconf 1.0.5
> django-compressor 4.0
> django-extensions 3.2.0
> django-gravatar2 1.4.4
> django-haystack 3.2.1
> django-mailman3 1.3.9
> django-picklefield 3.1
> django-q 1.3.9
> djangorestframework 3.13.1
>
> root@www:/usr/local/mailman3 # pip list | grep postorius
> postorius 1.3.8
>
>
Bumping either mailman|lmtp loglevel to DEBUG might help find out.
[logging.lmtp]
level: debug
And I think you can debug everything with (untested):
[logging.here]
level: debug
And restart mailman.
Maybe??
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
3 years, 5 months
Re: Introducing Mailman Web project
by Abhilash Raj
On Mon, Mar 25, 2019, at 5:25 PM, Ralph Seichter wrote:
> * Abhilash Raj:
>
> > For this reason, I decided to combine all the projects together into
> > a Django project which can be easily installed and run:
> >
> > $ pip install mailman-web
> > # Export Settings for commands to just work.
> > $ export DJANGO_SETTINGS=mailman_web.settings
> > $ django-admin migrate
> > $ django-admin runserver
>
> I've tried things a bit differently so I can use the latest version from
> GitLab, and Things Go Boom(TM):
>
> $ python3.7 -m venv venv
> $ . venv/bin/activate
> $ pip install -U pip setuptools
> $ git clone https://gitlab.com/mailman/mailman-web.git
> $ cd mailman-web/
> $ cp docs/mailman-web-example.toml mailman-web.toml
> $ pip install .
> $ DJANGO_SETTINGS_MODULE=mailman_web.settings django-admin migrate
> Traceback (most recent call last):
> [...]
> File
> "/var/lib/nginx/mailman/venv/lib/python3.7/site-packages/postorius/views/user.py", line 34, in <module>
> from postorius.models import List, MailmanUser
> File
> "/var/lib/nginx/mailman/venv/lib/python3.7/site-packages/postorius/models.py", line 223, in <module>
> class EmailTemplate(models.Model):
> File
> "/var/lib/nginx/mailman/venv/lib/python3.7/site-packages/django/db/models/base.py", line 95, in __new__
> "INSTALLED_APPS." % (module, name)
> RuntimeError: Model class postorius.models.EmailTemplate doesn't
> declare an explicit app_label
> and isn't in an application in INSTALLED_APPS.
>
> Did I miss something?
So, that's my fault ;-)
The example configuration is actually not a working example,
but only used for demonstrating how to write a TOML config.
But I see that it actually should be a valid configuration, I'll
open an issue and fix that.
Can you instead remove mailman-web.toml and then
again try:
$ DJANGO_SETTINGS_MODULE=mailman_web.settings django-admin migrate
This should mostly probably work :)
--
thanks,
Abhilash Raj (maxking)
7 years, 5 months
Re: How to subscribe members without sending unsubscribe message
by Stephen J. Turnbull
Flo via Mailman-users writes:
> Thank you. I don't why I don't find these things in Postorius
> easily?
There's a common saying among user interface developers that
"'intuitive' just means 'what you're used to'". It's not a "you"
problem, it's that people have different notions of where such things
"should be found" based on their unique experiences.
In this case, the "mass subscription" tool has controls for all the
things you might care about, including the welcome message. The "mass
removal" tool does not, but once you've used "mass subscription", a
control for the goodbye message is a reasonable expectation. I think
we should add it:
https://gitlab.com/mailman/postorius/-/issues/638
--
GNU Mailman consultant (installation, migration, customization)
Sirius Open Source https://www.siriusopensource.com/
Software systems consulting in Europe, North America, and Japan
1 year
Re: Accept these non-members
by Lars Bjørndal
Again, thank you for your reply!
You wrote:
> On 3/6/26 12:52, Lars Bjørndal wrote:
[...]
> > > > I have an announce only Mailman3 list. When I log into the web interface
> > > > as an admin user, and go to the specified list, and choose Settings, I find
> > > > the Message Acceptance tab. There, I find the edit field Accept these
> > > > non-members. But this field is empty, although I know that some people
> > > > have permissions and are able to post to this list. How can I find the
> > > > list of these non-members and add more people or delete someone?
[...]
> > > These are nonmembers whose moderation action is accept or defer. If your
> > > Postorius is >= 1.3.6, and the number of nonmembers is manageable you can
> > > just view the nonmembers list in Postorius and see their moderation action.
[...]
> > > Otherwise a `mailman shell` interaction like
> > > ```
> > > $ 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
> > > > > > for nm in m.nonmembers.members:
> > > ... if nm.moderation_action in (Action.accept, Action.defer):
> > > ... print(f'{nm} {nm.moderation_action}')
> > > ...
> > > > > >
> > > ```
> > > will print those nonmembers with Action.accept or Action.defer.
All addresses, both addresses that I know has sent messages to the list and others, are marked as MemberRole.nonmember> Action.defer
When I view non-members in postorius, I get some differences:
Some ar marked: Regular List default, and others Regular Default processing.
The list is imported from Mm 2.1 a long time ago. I don't know if that matters.
> > What's the difference between Action.accept and Action.defer?
>
>
> Action.accept accepts the message immediately with no further checks.
> Action.defer passes the membership checks but still goes on to check other
> things like
>
> mis-addressed email commands
> messages with implicit destination
> messages with too many explicit recipients
> messages that are bigger than a specified maximum
> messages with no, or empty, Subject headers
> messages with digest Subject or boilerplate quote
> messages matching a bounce_matching_header line
Hm, this is a mystery to me. Is there othere places I can search for addresses that are aloud to send to the list?
Thanks,
Lars
6 months, 2 weeks
[MM3-users]Re: mailman 2 vs. mailman 3: what happened to multipart/digest?
by John Hein
Mark Sapiro wrote at 12:18 -0700 on May 12, 2016:
> On 5/12/16 9:16 AM, deu8yz2mpq(a)snkmail.com 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.
10 years, 4 months
Re: Another interesting error...
by Darren Smith
As for the traceback - I'm assuming it's from postorius, as this happens
when attempting to load the held messages in the Postorius UI.
On Mon, Apr 23, 2018 at 3:29 PM, Darren Smith <silas.crutherton(a)gmail.com>
wrote:
> "It's in Mailman's database in the 'message' table."
>
> I can see the message table - is there a way to see where it is marked as
> "held"? All I'm seeing in that table is id, message_id, message_id_hash,
> and path.
>
> I'm wanting to be able to query for held messages for a given mailing
> list, as there are currently over 98,000 entries in the message table.
>
> -Darren
>
>
> On Mon, Apr 23, 2018 at 3:17 PM, Mark Sapiro <mark(a)msapiro.net> wrote:
>
>> On 04/23/2018 01:31 PM, Darren Smith wrote:
>> > So it appears that there was a message sent to one of our mailing lists
>> > that was put into the held message queue. However, when attempting to
>> go to
>> > the message to do the moderation, the web page returns and Error 500.
>> >
>> > Looking in the mailman log, I found this:
>> >
>> > Apr 23 14:21:02 2018 (17878) REST request handler error:
>> > Traceback (most recent call last):
>> > File "/opt/mailman3/conda/lib/python3.6/wsgiref/handlers.py", line
>> 137,
>> > in run
>> > self.result = application(self.environ, self.start_response)
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> database/transac
>> > tion.py", line 50, in wrapper
>> > rtn = function(*args, **kws)
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> rest/wsgiapp.py"
>> > , line 214, in __call__
>> > return super().__call__(environ, start_response)
>> > File "/opt/mailman3/conda/lib/python3.6/site-packages/falcon/api.py",
>> > line 227 , in __call__
>> > responder(req, resp, **params)
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> rest/post_modera
>> > tion.py", line 167, in on_get
>> > resource = self._make_collection(request)
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> rest/helpers.py"
>> > , line 159, in _make_collection
>> > for resource in collection]
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> rest/helpers.py"
>> > , line 159, in <listcomp>
>> > for resource in collection]
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> rest/post_modera
>> > tion.py", line 157, in _resource_as_dict
>> > resource = self._make_resource(request.id)
>> > File
>> > "/opt/mailman3/conda/lib/python3.6/site-packages/mailman/
>> rest/post_modera
>> > tion.py", line 100, in _make_resource
>> > make_header(decode_header(resource['subject'])))
>> > File "/opt/mailman3/conda/lib/python3.6/email/header.py", line 174,
>> in
>> > make_he ader
>> > h.append(s, charset)
>> > File "/opt/mailman3/conda/lib/python3.6/email/header.py", line 295,
>> in
>> > append
>> > s = s.decode(input_charset, errors)
>> > UnicodeDecodeError: 'gb2312' codec can't decode byte 0x87 in position 2:
>> > illegal multibyte sequence
>> >
>> > It LOOKS as if there might be a character in the email somewhere -
>> possibly
>> > in the subject or sender fields? - that is somehow unexpected.
>>
>>
>> It appears that the Subject: header is RFC 2047 encoded and there is an
>> encoded word with charset gb2312 that contains an invalid encoding.
>>
>> The message is apparently defective, but this kind of defect shouldn't
>> cause a 500 error.
>>
>> I can't tell for sure from the traceback if this is Postorius or some
>> other application accessing the REST api. Is it Postorius or something
>> else?
>>
>>
>> > I am attempting to find the held message - can someone point me where I
>> can
>> > go to see the message so that I can see what might be causing the
>> problem?
>>
>>
>> It's in Mailman's database in the 'message' table.
>>
>> --
>> 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
>> https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/
>>
>
>
8 years, 4 months
Django Internal Server Error on held_messages
by Hasan Berkay Çağır
Hello,
We've been running a Mailman3 instance with Debian 10's official package:
Mailman Core Version: GNU Mailman 3.2.1 (La Villa Strangiato)
Mailman Core API Version: 3.0
Mailman Core Python Version: 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0]
For some reason, and only on some lists, when we try to see held messages on Postorius, we get an error message "An error occurred while processing your request." and the following error email:
"""
Internal Server Error: /postorius/lists/list.example.com/held_messages
KeyError at /postorius/lists/list.example.com/held_messages
'file'
Request Method: GET
Request URL: https://mailman.example.com/postorius/lists/list.example.com/held_messages
Django Version: 1.11.29
Python Executable: /usr/bin/uwsgi-core
Python Version: 3.7.3
Python Path: ['.', '', '/usr/lib/python37.zip', '/usr/lib/python3.7', '/usr/lib/python3.7/lib-dynload', '/usr/local/lib/python3.7/dist-packages', '/usr/lib/python3/dist-packages']
Server time: Thu, 24 Mar 2022 08:39:10 +0000
Installed Applications:
('hyperkitty',
'postorius',
'django_mailman3',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount')
Installed Middleware:
('django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'django.middleware.security.SecurityMiddleware',
'django_mailman3.middleware.TimezoneMiddleware',
'postorius.middleware.PostoriusMiddleware')
Traceback:
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/contrib/auth/decorators.py" in _wrapped_view
23. return view_func(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/postorius/auth/decorators.py" in wrapper
58. return fn(*args, **kwargs)
File "/usr/lib/python3/dist-packages/postorius/views/list.py" in list_moderation
520. paginator_class=MailmanPaginator)
File "/usr/lib/python3/dist-packages/django_mailman3/lib/paginator.py" in paginate
72. objects = paginator.page(page_num)
File "/usr/lib/python3/dist-packages/django_mailman3/lib/paginator.py" in page
48. result = self.function(count=self.per_page, page=number)
File "/usr/lib/python3/dist-packages/mailmanclient/restobjects/mailinglist.py" in get_held_page
134. return Page(self._connection, url, HeldMessage, count, page)
File "/usr/lib/python3/dist-packages/mailmanclient/restbase/page.py" in __init__
37. self._create_page()
File "/usr/lib/python3/dist-packages/mailmanclient/restbase/page.py" in _create_page
62. response, content = self._connection.call(self._build_url())
File "/usr/lib/python3/dist-packages/mailmanclient/restbase/connection.py" in call
99. raise HTTPError(url, response.status, content, response, None)
During handling of the above exception (HTTP Error 500: b'A server error occurred. Please contact the administrator.'), another exception occurred:
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/usr/lib/python3/dist-packages/postorius/middleware.py" in __call__
39. return self.get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in inner
43. response = response_for_exception(request, exc)
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in response_for_exception
93. response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/usr/lib/python3/dist-packages/django/core/handlers/exception.py" in handle_uncaught_exception
135. extra={'status_code': 500, 'request': request},
File "/usr/lib/python3.7/logging/__init__.py" in error
1412. self._log(ERROR, msg, args, **kwargs)
File "/usr/lib/python3.7/logging/__init__.py" in _log
1519. self.handle(record)
File "/usr/lib/python3.7/logging/__init__.py" in handle
1529. self.callHandlers(record)
File "/usr/lib/python3.7/logging/__init__.py" in callHandlers
1591. hdlr.handle(record)
File "/usr/lib/python3.7/logging/__init__.py" in handle
905. self.emit(record)
File "/usr/lib/python3/dist-packages/django/utils/log.py" in emit
118. reporter = ExceptionReporter(request, is_email=True, *exc_info)
File "/usr/lib/python3/dist-packages/django/views/debug.py" in __init__
246. self.template_info = getattr(self.exc_value, 'template_debug', None)
File "/usr/lib/python3.7/tempfile.py" in __getattr__
614. file = self.__dict__['file']
Exception Type: KeyError at /postorius/lists/list.example.com/held_messages
Exception Value: 'file'
Request information:
USER: root
GET: No GET data
POST: No POST data
FILES: No FILES data
COOKIES:
rl_anonymous_id = '*'
rl_user_id = '*'
rl_group_id = '*'
rl_trait = '*'
rl_group_trait = '*'
rl_page_init_referrer = '*'
rl_page_init_referring_domain = '*'
csrftoken = '*'
sessionid = '*'
META:
CONTENT_LENGTH = ''
CONTENT_TYPE = ''
CSRF_COOKIE = '*'
DOCUMENT_ROOT = '/etc/nginx/html'
HTTPS = 'on'
HTTP_ACCEPT = 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8'
HTTP_ACCEPT_ENCODING = 'gzip, deflate, br'
HTTP_ACCEPT_LANGUAGE = 'en-US,en;q=0.5'
HTTP_CACHE_CONTROL = 'max-age=0'
HTTP_COOKIE = '*'
HTTP_DNT = '1'
HTTP_HOST = 'mailman.example.com'
HTTP_REFERER = 'https://mailman.example.com/postorius/lists/list.example.com/'
HTTP_SEC_FETCH_DEST = 'document'
HTTP_SEC_FETCH_MODE = 'navigate'
HTTP_SEC_FETCH_SITE = 'same-origin'
HTTP_TE = 'trailers'
HTTP_UPGRADE_INSECURE_REQUESTS = '1'
HTTP_USER_AGENT = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:98.0) Gecko/20100101 Firefox/98.0'
PATH_INFO = '/postorius/lists/list.example.com/held_messages'
QUERY_STRING = ''
REMOTE_ADDR = '::1'
REMOTE_PORT = '58290'
REQUEST_METHOD = 'GET'
REQUEST_SCHEME = 'https'
REQUEST_URI = '/postorius/lists/list.example.com/held_messages'
SCRIPT_NAME = ''
SERVER_NAME = 'mailman.example.com'
SERVER_PORT = '443'
SERVER_PROTOCOL = 'HTTP/2.0'
uwsgi.core = 0
uwsgi.node = b'example.com'
uwsgi.version = b'2.0.18-debian'
wsgi.errors = <_io.TextIOWrapper name=2 mode='w' encoding='UTF-8'>
wsgi.file_wrapper = ''
wsgi.input = <uwsgi._Input object at 0x7f8f7a6bf870>
wsgi.multiprocess = False
wsgi.multithread = True
wsgi.run_once = False
wsgi.url_scheme = 'https'
wsgi.version = '(1, 0)'
Settings:
Using settings module settings
ABSOLUTE_URL_OVERRIDES = {}
ACCOUNT_AUTHENTICATION_METHOD = 'username_email'
ACCOUNT_DEFAULT_HTTP_PROTOCOL = 'https'
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = 'mandatory'
ACCOUNT_UNIQUE_EMAIL = True
ADMINS = "(('Mailman Suite Admin', 'admin(a)example.com'),)"
ALLOWED_HOSTS = ['*']
APPEND_SLASH = True
AUTHENTICATION_BACKENDS = "('django.contrib.auth.backends.ModelBackend', 'allauth.account.auth_backends.AuthenticationBackend')"
AUTH_PASSWORD_VALIDATORS = '********************'
AUTH_USER_MODEL = 'auth.User'
BASE_DIR = '/usr/share/mailman3-web'
CACHES = {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}}
CACHE_MIDDLEWARE_ALIAS = 'default'
CACHE_MIDDLEWARE_KEY_PREFIX = '********************'
CACHE_MIDDLEWARE_SECONDS = 600
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_COMPRESSOR = 'compressor.css.CssCompressor'
COMPRESS_CSS_FILTERS = ['compressor.filters.css_default.CssAbsoluteFilter']
COMPRESS_CSS_HASHING_METHOD = 'mtime'
COMPRESS_DATA_URI_MAX_SIZE = 1024
COMPRESS_DEBUG_TOGGLE = None
COMPRESS_ENABLED = True
COMPRESS_JINJA2_GET_ENVIRONMENT = <function CompressorConf.JINJA2_GET_ENVIRONMENT at 0x7f8f7b50d598>
COMPRESS_JS_COMPRESSOR = 'compressor.js.JsCompressor'
COMPRESS_JS_FILTERS = ['compressor.filters.jsmin.JSMinFilter']
COMPRESS_MINT_DELAY = 30
COMPRESS_MTIME_DELAY = 10
COMPRESS_OFFLINE = True
COMPRESS_OFFLINE_CONTEXT = {'STATIC_URL': '/mailman3/static/'}
COMPRESS_OFFLINE_MANIFEST = 'manifest.json'
COMPRESS_OFFLINE_TIMEOUT = 31536000
COMPRESS_OUTPUT_DIR = 'CACHE'
COMPRESS_PARSER = 'compressor.parser.AutoSelectParser'
COMPRESS_PRECOMPILERS = "(('text/less', 'lessc {infile} {outfile}'), ('text/x-scss', 'sassc -t compressed {infile} {outfile}'), ('text/x-sass', 'sassc -t compressed {infile} {outfile}'))"
COMPRESS_REBUILD_TIMEOUT = 2592000
COMPRESS_ROOT = '/var/lib/mailman3/web/static'
COMPRESS_STORAGE = 'compressor.storage.CompressorFileStorage'
COMPRESS_TEMPLATE_FILTER_CONTEXT = {'STATIC_URL': '/mailman3/static/'}
COMPRESS_URL = '/mailman3/static/'
COMPRESS_URL_PLACEHOLDER = '/__compressor_url_placeholder__/'
COMPRESS_VERBOSE = False
COMPRESS_YUGLIFY_BINARY = 'yuglify'
COMPRESS_YUGLIFY_CSS_ARGUMENTS = '--terminal'
COMPRESS_YUGLIFY_JS_ARGUMENTS = '--terminal'
COMPRESS_YUI_BINARY = 'java -jar yuicompressor.jar'
COMPRESS_YUI_CSS_ARGUMENTS = ''
COMPRESS_YUI_JS_ARGUMENTS = ''
CSRF_COOKIE_AGE = 31449600
CSRF_COOKIE_DOMAIN = None
CSRF_COOKIE_HTTPONLY = False
CSRF_COOKIE_NAME = 'csrftoken'
CSRF_COOKIE_PATH = '/'
CSRF_COOKIE_SECURE = False
CSRF_FAILURE_VIEW = 'django.views.csrf.csrf_failure'
CSRF_HEADER_NAME = 'HTTP_X_CSRFTOKEN'
CSRF_TRUSTED_ORIGINS = []
CSRF_USE_SESSIONS = False
DATABASES = {'default': {'ENGINE': 'django.db.backends.mysql', 'NAME': 'mailman3web', 'USER': 'mailman3web', 'PASSWORD': '********************', 'HOST': 'localhost', 'PORT': '', 'OPTIONS': {'init_command': "SET sql_mode='STRICT_TRANS_TABLES'", 'charset': 'utf8mb4'}, 'ATOMIC_REQUESTS': False, 'AUTOCOMMIT': True, 'CONN_MAX_AGE': 0, 'TIME_ZONE': None, 'TEST': {'CHARSET': None, 'COLLATION': None, '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_CONTENT_TYPE = 'text/html'
DEFAULT_EXCEPTION_REPORTER_FILTER = 'django.views.debug.SafeExceptionReporterFilter'
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
DEFAULT_FROM_EMAIL = 'postorius(a)example.com'
DEFAULT_INDEX_TABLESPACE = ''
DEFAULT_TABLESPACE = ''
DISALLOWED_USER_AGENTS = []
EMAILNAME = 'example.com'
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 = None
FILE_UPLOAD_TEMP_DIR = None
FILTER_VHOST = False
FIRST_DAY_OF_WEEK = 0
FIXTURE_DIRS = []
FORCE_SCRIPT_NAME = None
FORMAT_MODULE_PATH = None
FORM_RENDERER = 'django.forms.renderers.DjangoTemplates'
HAYSTACK_CONNECTIONS = {'default': {'ENGINE': 'haystack.backends.whoosh_backend.WhooshEngine', 'PATH': '/var/lib/mailman3/web/fulltext_index'}}
HOSTNAME = 'localhost.local'
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'), ('ia', 'Interlingua'), ('id', 'Indonesian'), ('io', 'Ido'), ('is', 'Icelandic'), ('it', 'Italian'), ('ja', 'Japanese'), ('ka', 'Georgian'), ('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'), ('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_NAME = 'django_language'
LANGUAGE_COOKIE_PATH = '/'
LOCALE_PATHS = []
LOGGING = {'version': 1, 'disable_existing_loggers': False, 'filters': {'require_debug_false': {'()': 'django.utils.log.RequireDebugFalse'}}, 'handlers': {'mail_admins': {'level': 'ERROR', 'filters': ['require_debug_false'], 'class': 'django.utils.log.AdminEmailHandler'}, 'file': {'level': 'INFO', 'class': 'logging.handlers.RotatingFileHandler', 'filename': '/var/log/mailman3/web/mailman-web.log', 'formatter': 'verbose'}, 'console': {'class': 'logging.StreamHandler', 'formatter': 'simple'}}, 'loggers': {'django.request': {'handlers': ['mail_admins', 'file'], 'level': 'INFO', 'propagate': True}, 'django': {'handlers': ['file'], 'level': 'INFO', 'propagate': True}, 'hyperkitty': {'handlers': ['file'], 'level': 'INFO', 'propagate': True}, 'postorius': {'handlers': ['file'], 'level': 'INFO', 'propagate': True}}, 'formatters': {'verbose': {'format': '%(levelname)s %(asctime)s %(process)d %(name)s %(message)s'}, 'simple': {'format': '%(levelname)s %(message)s'}}}
LOGGING_CONFIG = 'logging.config.dictConfig'
LOGIN_REDIRECT_URL = 'list_index'
LOGIN_URL = 'account_login'
LOGOUT_REDIRECT_URL = None
LOGOUT_URL = 'account_logout'
MAILMAN_ARCHIVER_FROM = "('127.0.0.1', '::1')"
MAILMAN_ARCHIVER_KEY = '********************'
MAILMAN_REST_API_PASS = '********************'
MAILMAN_REST_API_URL = '********************'
MAILMAN_REST_API_USER = '********************'
MANAGERS = []
MEDIA_ROOT = ''
MEDIA_URL = ''
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')"
MIDDLEWARE_CLASSES = ['django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware']
MIGRATION_MODULES = {}
MONTH_DAY_FORMAT = 'F j'
NUMBER_GROUPING = 0
PASSWORD_HASHERS = '********************'
PASSWORD_RESET_TIMEOUT_DAYS = '********************'
POSTORIUS_TEMPLATE_BASE_URL = 'https://mailman.example.com/'
PREPEND_WWW = False
Q_CLUSTER = {'timeout': 300, 'save_limit': 100, 'orm': 'default', 'poll': 5}
ROOT_URLCONF = 'urls'
SECRET_KEY = '********************'
SECURE_BROWSER_XSS_FILTER = False
SECURE_CONTENT_TYPE_NOSNIFF = False
SECURE_HSTS_INCLUDE_SUBDOMAINS = False
SECURE_HSTS_PRELOAD = False
SECURE_HSTS_SECONDS = 0
SECURE_PROXY_SSL_HEADER = None
SECURE_REDIRECT_EXEMPT = []
SECURE_SSL_HOST = None
SECURE_SSL_REDIRECT = False
SERVER_EMAIL = 'root(a)example.com'
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_SECURE = False
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
SESSION_FILE_PATH = None
SESSION_SAVE_EVERY_REQUEST = False
SESSION_SERIALIZER = 'django.contrib.sessions.serializers.PickleSerializer'
SETTINGS_MODULE = 'settings'
SHORT_DATETIME_FORMAT = 'm/d/Y P'
SHORT_DATE_FORMAT = 'm/d/Y'
SIGNING_BACKEND = 'django.core.signing.TimestampSigner'
SILENCED_SYSTEM_CHECKS = []
SITE_ID = 1
SOCIALACCOUNT_PROVIDERS = {}
STATICFILES_DIRS = '()'
STATICFILES_FINDERS = "('django.contrib.staticfiles.finders.FileSystemFinder', 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 'compressor.finders.CompressorFinder')"
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
STATIC_ROOT = '/var/lib/mailman3/web/static'
STATIC_URL = '/mailman3/static/'
TEMPLATES = [{'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [], 'APP_DIRS': True, 'OPTIONS': {'context_processors': ['django.template.context_processors.debug', 'django.template.context_processors.i18n', 'django.template.context_processors.media', 'django.template.context_processors.static', 'django.template.context_processors.tz', 'django.template.context_processors.csrf', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'django_mailman3.context_processors.common', 'hyperkitty.context_processors.common', 'postorius.context_processors.postorius']}}]
TEST_NON_SERIALIZED_APPS = []
TEST_RUNNER = 'django.test.runner.DiscoverRunner'
THOUSAND_SEPARATOR = ','
TIME_FORMAT = 'P'
TIME_INPUT_FORMATS = ['%H:%M:%S', '%H:%M:%S.%f', '%H:%M']
TIME_ZONE = 'UTC'
USE_ETAGS = False
USE_I18N = True
USE_L10N = True
USE_THOUSAND_SEPARATOR = False
USE_TZ = True
USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_PORT = False
WSGI_APPLICATION = 'wsgi.application'
X_FRAME_OPTIONS = 'SAMEORIGIN'
YEAR_MONTH_FORMAT = 'F Y'
"""
I've tried to debug this issue as much as I can but couldn't figure out anything. I wonder if anyone has encountered something like this or might have a clue about what's the problem here?
Thanks in advance,
Berkay
4 years, 5 months
Can login at /admin, but cannot login at the account/login page.
by pabsta@gmail.com
Hi All,
thanks for your contibution to opensource softwares. I have done the installation walkthrough on the wiki page (thanks to Brian Carpenter) and I am almost there. I can run the three services and they provide the relevant web interfaces (admin, postorius, hyperkitty). In comparison to the walkthrough, I did two changes; First, I used different port numbers , as it would otherwise conflict with other services on the server. Second, I disabled the social accounts authentification mechanisms. I am still running on sqllite, as I am still testing things (one task at a time).
Using my "superuser" credentials, I can log to the admin section in a fraction of a second. The server response time is less than one second. Once logged in, I can navigate through all the site as an authenticated user, including in the postorius pages related to list management. The services work normally.
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 and the nginx error logs just show a connection drop:
2021/08/12 18:11:09 [error] 26026#26026: *31 upstream prematurely closed connection 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/"
Two additional clues may help understanding what is going on:
1- If I attempt to login with improper credentials, the services respond normally, and I get the expected red box with "invalid credentials" message on the postorius page. It is only when proper credentials are given that the connection fails.
2- If I attempt to register a new email adress, the services also fail to respond (although with no DIGEST-MD5 message registered).
It thus seems to be a post "POST" problem, but what puzzles me is that it is not an issue for the admin page.
Below the relevant sections of my settings.py page. The skipped ([...]) sections are as in the walkthrough files. In particular, the AUTH_PASSWORD_VALIDATORS, the EMAIL_BACKEND are as is and the "USE_X_FORWARDED_HOST" is still commented.
##Settings.py
[...]
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '[redacted]'
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = False
ADMINS = (
('ME', 'my@email'),
)
SITE_ID = 1
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangoproject.com/en/1.8/ref/settings/#allowed-hosts
ALLOWED_HOSTS = [
"localhost", # Archiving API from Mailman, keep it.
"[domain]",
# Add here all production URLs you may have.
]
# Mailman API credentials
MAILMAN_REST_API_URL = 'http://localhost:8005'
MAILMAN_REST_API_USER = '[redacted]'
MAILMAN_REST_API_PASS = '[redacted]'
MAILMAN_ARCHIVER_KEY = '[redacted]'
MAILMAN_ARCHIVER_FROM = ('127.0.0.1', '::1')
# Application definition
INSTALLED_APPS = (
'hyperkitty',
'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',
'rest_framework',
'django_gravatar',
'compressor',
'haystack',
'django_extensions',
'django_q',
'allauth',
'allauth.account',
'allauth.socialaccount',
#'django_mailman3.lib.auth.fedora',
#'allauth.socialaccount.providers.openid',
#'allauth.socialaccount.providers.github',
#'allauth.socialaccount.providers.gitlab',
#'allauth.socialaccount.providers.google',
#'allauth.socialaccount.providers.facebook',
#'allauth.socialaccount.providers.twitter',
#'allauth.socialaccount.providers.stackexchange',
)
[...]
# Database
# https://docs.djangoproject.com/en/1.8/ref/settings/#databases
DATABASES = {
'default': {
# Use 'sqlite3', 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'ENGINE': 'django.db.backends.sqlite3',
# DB name or path to database file if using sqlite3.
'NAME': os.path.join(BASE_DIR, 'mailmansuite.db'),
# The following settings are not used with sqlite3:
'USER': 'XXX',
'PASSWORD': 'XXX',
# HOST: empty for localhost through domain sockets or '127.0.0.1' for
# localhost through TCP.
'HOST': '',
# PORT: set to empty string for default.
'PORT': '',
# OPTIONS: for mysql engine only, do not use with other engines.
# 'OPTIONS': {'charset': 'utf8mb4'} # Enable utf8 4-byte encodings.
}
}
[...]
# Password validation
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME':
'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME':
'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# Internationalization
# https://docs.djangoproject.com/en/1.8/topics/i18n/
LANGUAGE_CODE = 'fr'
TIME_ZONE = 'America/New_York'
[...]
# If you enable internal authentication, this is the address that the emails
# will appear to be coming from. Make sure you set a valid domain name,
# otherwise the emails may get rejected.
# https://docs.djangoproject.com/en/1.8/ref/settings/#default-from-email
# DEFAULT_FROM_EMAIL = "mailing-lists(a)you-domain.org"
DEFAULT_FROM_EMAIL = 'username@domain'
# If you enable email reporting for error messages, this is where those emails
# will appear to be coming from. Make sure you set a valid domain name,
# otherwise the emails may get rejected.
# https://docs.djangoproject.com/en/1.8/ref/settings/#std:setting-SERVER_EMAIL
# SERVER_EMAIL = 'root(a)your-domain.org'
SERVER_EMAIL = 'username@domain'
# Change this when you have a real email backend
EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
[...]
#
# Social auth
#
AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
)
# Django Allauth
ACCOUNT_AUTHENTICATION_METHOD = "username_email"
ACCOUNT_EMAIL_REQUIRED = True
ACCOUNT_EMAIL_VERIFICATION = "mandatory"
# You probably want https in production, but this is a dev setup file
ACCOUNT_DEFAULT_HTTP_PROTOCOL = "https"
ACCOUNT_UNIQUE_EMAIL = True
#
# Asynchronous tasks
#
Q_CLUSTER = {
'timeout': 300,
'save_limit': 100,
'retry':360,
'orm': 'default',
}
[...]
# Only display mailing-lists from the same virtual host as the webserver
FILTER_VHOST = True
POSTORIUS_TEMPLATE_BASE_URL = 'http://localhost:8006'
## (End of settings.py)
I'm happy to provide additional information if it can help.
Best,
Pier-André
5 years, 1 month