
Daily Cronjob fails
by Stefan Tatschner
Hey hey,
I applied a recent Update from Debian Buster, und this night a received an email about a failing cronjob.
The traceback can be reproduced using:
# sudo -u www-data flock -n /var/run/mailman3-web/cron.daily /usr/share/mailman3-web/manage.py runjobs daily
ERROR OCCURED IN DAILY JOB: sync_mailman (APP: hyperkitty)
START TRACEBACK:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
psycopg2.IntegrityError: null value in column "description" violates not-null constraint
DETAIL: Failing row contains (2, hb-events(a)hackbrettl.de, hb-events, null, [hb-events] , 1, 2015-10-22 09:54:53.684306+00, hb-events.hackbrettl.de).
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/django_extensions/management/commands/runjobs.py", line 36, in runjobs
job().execute()
File "/usr/lib/python3/dist-packages/hyperkitty/jobs/sync_mailman.py", line 35, in execute
sync_with_mailman()
File "/usr/lib/python3/dist-packages/hyperkitty/lib/mailman.py", line 131, in sync_with_mailman
mlist.update_from_mailman()
File "/usr/lib/python3/dist-packages/hyperkitty/models/mailinglist.py", line 192, in update_from_mailman
self.save()
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 808, in save
force_update=force_update, update_fields=update_fields)
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 838, in save_base
updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 905, in _save_table
forced_update)
File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 955, in _do_update
return filtered._update(values) > 0
File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 667, in _update
return query.get_compiler(self.db).execute_sql(CURSOR)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1204, in execute_sql
cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 899, in execute_sql
raise original_exception
File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 889, in execute_sql
cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
File "/usr/lib/python3/dist-packages/django/db/utils.py", line 94, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/usr/lib/python3/dist-packages/django/utils/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
return self.cursor.execute(sql, params)
django.db.utils.IntegrityError: null value in column "description" violates not-null constraint
DETAIL: Failing row contains (2, hb-events(a)hackbrettl.de, hb-events, null, [hb-events] , 1, 2015-10-22 09:54:53.684306+00, hb-events.hackbrettl.de).
END TRACEBACK
Appearently there is something wrong with the database. Is there anything what I can do about this?
Running the migrations doesn't help:
# sudo -u www-data flock -n /var/run/mailman3-web/cron.daily /usr/share/mailman3-web/manage.py migrate
Operations to perform:
Apply all migrations: account, admin, auth, contenttypes, django_mailman3, django_q, hyperkitty, postorius, sessions, sites, socialaccount
Running migrations:
No migrations to apply.
Thanks!
Stefan
6 years, 3 months

Setting for archiving multi email domains?
by Stephen J. Turnbull
Duane Raymond writes:
> I have a Debian-postfix-postgres-nginx-Hyperkitty-Postorius setup
> with a primary domain (e.g. primarydomain.com) and several
> 'secondary' domains used for email lists (e.g. emaillistA.com and
> emaillistB.com) When sending emails to a list using the
> primarydomain.com address, the email is received, sent to
> subscribers and archived properly. But when it is sent to one of
> the secondary domains like tes(a)emaillistA.com - the email doesn't
> seem to be sent and isn't archived - despite it being set to be.
What do you mean by "set"? That the list has archiving enabled?
What is in the Postfix logs? Where does Postfix try to deliver the
second class of email (list-specific domains)? Is there a "bounce"
(more precisely, a Delivery Status Notice telling you that the mail
was not delivered, and with luck, why Postfix had a problem)? What is
in the Mailman logs?
I assume from your description (one server, multiple domains) that
these list-specific domains are "virtual" domains that are handled by
the single server. It seems likely that something is going wrong with
the routing in Postfix.
> What I've tried so far (after searching these archives and looking
> at the documentation) is to:
> 1) Adding emaillistA.com and emaillistB.com to the
> MAILMAN_ARCHIVER_FROM setting in the settings_local.py file (and
> then restart mailman)
> 2) Adding emaillistA.com and emaillistB.com to the mydestination
> setting in the postfix main.cf file (and the restarting
> postfix).
(2) above will allow receiving mail for those domains, but is unlikely
to be sufficient for routing to lists. You also need to inform
Mailman about the virtual domains, because the internal name of the
mailing list includes the domain.
Postfix has extensive support for virtual domains. This is somewhat
tricky. Are you familiar with this support, as documented in
http://www.postfix.org/VIRTUAL_README.html, and the general docs? For
Mailman's needs from Postfix, see
https://docs.mailman3.org/projects/mailman/en/latest/src/mailman/docs/mta.h….
If the above aren't sufficient hints, we need more information about
both the Postfix configuration and the Mailman configuration.
In a later message
https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message…,
you report at the end of the traceback (line folded for readability):
> AttributeError: 'NoneType' object has no attribute 'preferences'
> Mar 04 14:08:24 2021 (5044) SHUNTING:
> 1614866904.2741017+f1f320a5d0006e885586be5b33543e364e3829b4
This seems to indicate that either your list has a member that doesn't
exist in Mailman's subscriber database or (maybe) that there are no
subscribers, because it's trying to get profile information about a
nonexistent list member (represented by the Python 'None' object).
Did this occur only once? How many messages are in the "shunt" queue?
4 years, 3 months

re-sending confirmation mails (was Re: Re: pending subscriptions lost?)
by IEM Network Operation Center (IOhannes m zmölnig)
On 3/14/22 18:36, Mark Sapiro wrote:
> On 3/14/22 09:18, IEM Network Operation Center (IOhannes m zmölnig) wrote:
>>
>> this is with "Postorius Version 1.2.4" (as installed by the mailman3
>> Debian package).
>
> The Debian packages are OK for people who want to install things via a
> package manager, but they are quite out of date.
i know.
the problem is, that right now i have a running (Debian-based, thus
outdated) mailman3 installation, and I still haven't found a proper
strategy to upgrade and keep staying up-to-date.
so for the time being i'm stuck with what i have.
>
> Something like the following in `mailman shell` can do it.
thanks a lot.
afaiu, this snippet allows me to purge outdated pending subscriptions.
modifying it slightly, also allows me to just list the pending
subscriptions along with their tokens and print them out.
is it still possible to just use these tokens to confirm the pending
subscription (even though it is long overdue)?
if so, i could just send out a reminder to those 50 or so people who
have not confirmed yet.
while investigating this a bit, i also noticed that it seems that with
mailman3 the only option to confirm a pending subscription is via email
("leaving the subject intact") - at least that is the only option that
is listed in the confirmation mail.
now i would like to massage this into what i think is a bit more
user-friendly.
first of all: most email confirmation systems allow me to either "reply
by email" or "click this link".
is there a way to do this for mailman3? that is: is there a (hidden) URL
that would accept the token in order to confirm a subscription?
also: the confirmation mail says that the subject must be kept intact.
however, i noticed that the actual "From" address of the confirmation
mail already contains the token.
would it be enough if people just sent an email to this special
email-address (that contains the token), regardless of the subject?
i'm thinking of sending a rather personalized email that has a more
attractive subject than "confirm flkdsajfsalkjflsajfsoisjdl".
finally: what else is required to approve the confirmation? will the
sender's email-address be taken into account? (e.g. if they subscribed
"foo+mylist(a)example.com" but send the confirmation-reply from
"foo(a)example.com", will that still work?
sorry for so many questions.
i *did* search the documentation, but simply haven't found anything that
would help me.
i've probably looked in the wrong places, but mailman3 is rather huge so
it's easy to miss the imprtant parts.
gmdsa
IOhannes
3 years, 2 months

Re: Twitter OAuth2
by Odhiambo Washington
On Thu, Dec 29, 2022 at 3:44 AM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 12/28/22 11:37, Odhiambo Washington wrote:
> > On Wed, Dec 28, 2022 at 8:23 PM Mark Sapiro <mark(a)msapiro.net> wrote:
> >
> >> On 12/27/22 21:46, Odhiambo Washington wrote:
> >>> On Tue, Dec 27, 2022 at 8:08 PM Mark Sapiro <mark(a)msapiro.net> wrote:
> >>>>
> >>>> I see from another post that you've decided against using Twitter, but
> >>>> to answer the question, Twitter does not require adding anything to
> >>>> SOCIALACCOUNT_PROVIDERS.
> >>>>
> >>>
> >>> I tried it and ended up with:
> >>>
> >>> ERROR 2022-12-28 08:40:18,895 97440 django.request Internal Server
> Error:
> >>> /accounts/twitter/login/
> >>> Traceback (most recent call last):
> >> ...
> >>> allauth.socialaccount.models.SocialApp.DoesNotExist: SocialApp matching
> >>> query does not exist.
> >>
> >>
> >> Do you have
> >>
> >> 'allauth.socialaccount.providers.twitter',
> >>
> >> in INSTALLED_APPS?
> >>
> >
> > Here is what I have in settings_local.py:
> >
> > 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',
> > )
>
>
> Did you add an app at https://site.name/admin/socialaccount/socialapp/
> with twitter as a provider? See
>
> https://django-allauth.readthedocs.io/en/latest/providers.html#twitter-oaut…
Exactly, and I have entered all the credentials from the "OAuth 2.0 Client
ID and Client Secret"
of the twitter developer portal.
https://webmail.kictanet.or.ke/~wash/twitter-oauth.png
I have checked my settings_local.py several times trying to find out why
the entry is ignored.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
2 years, 5 months

Re: Hyperkitty "All Threads" results in error
by Mark Dadgar
Anyone have thoughts on this? Anyone? Buehler? Anyone?
- Mark
-----
mark(a)pdc-racing.net | 408-348-2878
> On Oct 4, 2020, at 10:34 AM, Mark Dadgar <mark(a)pdc-racing.net> wrote:
>
> So I have been wrestling with this problem for a while now. Most times, but not every time, when someone clicks on the All Threads link in hyperkitty, a 500 error is generated.
>
> I googled it, obviously, and at first I thought it was related to this issue, but that has not proven to be the case:
>
> https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/… <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/thread/…>
>
> I’ve attached a “backtrace” below.
>
> The archives were imported from a previous mm3 install a couple of months ago. The problem occurs even with a list state full of immediately recent posts.
>
> Anyone have thoughts on how I can fix this?
>
> - Mark
> -----
> mark(a)pdc-racing.net | 408-348-2878
>
> —
>
> Internal Server Error: /archives/list/trackjunkies(a)pdc-racing.net <mailto:archives/list/trackjunkies@pdc-racing.net>/latest
>
> VariableDoesNotExist at /archives/list/trackjunkies(a)pdc-racing.net <mailto:archives/list/trackjunkies@pdc-racing.net>/latest
> Failed lookup for key [sender] in None
>
> Request Method: GET
> Request URL: https://mail.pdc-racing.net/archives/list/trackjunkies@pdc-racing.net/latest <https://mail.pdc-racing.net/archives/list/trackjunkies@pdc-racing.net/latest>
> Django Version: 2.2.14
> Python Executable: /opt/mailman/mm/venv/bin/python
> Python Version: 3.8.2
> Python Path: ['/opt/mailman/mm', '/opt/mailman/mm/', '/opt/mailman/mm/bin', '/usr/lib/python38.zip', '/usr/lib/python3.8', '/usr/lib/python3.8/lib-dynload', '/opt/mailman/mm/venv/lib/python3.8/site-packages']
> Server time: Sun, 4 Oct 2020 10:27:10 -0700
> 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 "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _resolve_lookup
> 829. current = current[bit]
>
> During handling of the above exception ('NoneType' object is not subscriptable), another exception occurred:
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _resolve_lookup
> 837. current = getattr(current, bit)
>
> During handling of the above exception ('NoneType' object has no attribute 'sender'), another exception occurred:
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _resolve_lookup
> 843. current = current[int(bit)]
>
> During handling of the above exception (invalid literal for int() with base 10: 'sender'), another exception occurred:
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/handlers/exception.py" in inner
> 34. response = get_response(request)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
> 115. response = self.process_exception_by_middleware(e, request)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/core/handlers/base.py" in _get_response
> 113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/lib/view_helpers.py" in inner
> 134. return func(request, *args, **kwargs)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/views/mlist.py" in archives
> 114. return _thread_list(request, mlist, threads, extra_context=extra_context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/hyperkitty/views/mlist.py" in _thread_list
> 143. return render(request, template_name, context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/shortcuts.py" in render
> 36. content = loader.render_to_string(template_name, context, request, using=using)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/loader.py" in render_to_string
> 62. return template.render(context, request)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/backends/django.py" in render
> 61. return self.template.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 171. return self._render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _render
> 163. return self.nodelist.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 937. bit = node.render_annotated(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render_annotated
> 904. return self.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/loader_tags.py" in render
> 150. return compiled_parent._render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _render
> 163. return self.nodelist.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 937. bit = node.render_annotated(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render_annotated
> 904. return self.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/loader_tags.py" in render
> 62. result = block.nodelist.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 937. bit = node.render_annotated(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render_annotated
> 904. return self.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/defaulttags.py" in render
> 209. nodelist.append(node.render_annotated(context))
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render_annotated
> 904. return self.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/loader_tags.py" in render
> 188. return template.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 173. return self._render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _render
> 163. return self.nodelist.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 937. bit = node.render_annotated(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render_annotated
> 904. return self.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/defaulttags.py" in render
> 513. return self.nodelist.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render
> 937. bit = node.render_annotated(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in render_annotated
> 904. return self.render(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/templatetags/i18n.py" in render
> 132. context.update({var: val.resolve(context) for var, val in self.extra_context.items()})
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/templatetags/i18n.py" in <dictcomp>
> 132. context.update({var: val.resolve(context) for var, val in self.extra_context.items()})
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in resolve
> 692. arg_vals.append(arg.resolve(context))
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in resolve
> 796. value = self._resolve_lookup(context)
>
> File "/opt/mailman/mm/venv/lib/python3.8/site-packages/django/template/base.py" in _resolve_lookup
> 848. raise VariableDoesNotExist("Failed lookup for key "
>
> Exception Type: VariableDoesNotExist at /archives/list/trackjunkies(a)pdc-racing.net <mailto:archives/list/trackjunkies@pdc-racing.net>/latest
> Exception Value: Failed lookup for key [sender] in None
>
> _______________________________________________
> 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/
4 years, 7 months

Re: Digests not working correctly
by Joel Lord
The May 4th digest that went out was _also_ size-triggered, so this may
have nothing to do with periodic digests at all, and possibly my
periodic digests aren't working. I'm not on any of my own lists in
digest mode, I'm slowly extracting diagnostic information out of people
who are. Also, since this is a ~2 month cycle, it's really difficult to
get data points to work with. I'll need to remember to go in and look
when this settles down again (new cycle of activity started last night)
to see if there's anything left pending.
(venv) root@host2:/home/lists/mailman/venv/bin# pip freeze | grep -i hyper
HyperKitty==1.3.7
On 6/4/2023 10:05 PM, Mark Sapiro wrote:
> On 6/4/23 18:35, Joel Lord wrote:
>>
>> The periodic digests do seem to be coming out. I also now have
>> confirmation that the one message in this morning's digest that was
>> from May 4th was also included in the last digest back on May 4th, so
>> it seems that the one message was left behind in the digest queue when
>> the periodic digest was sent.
>
> I don't see how that can happen. The process that sends a digest renames
> the var/lists/<list-id>/digest.mmdf mailbox file in which the messages
> are accumulated to var/lists/<list-id>/digest.<volume>.<issue>.mmdf,
> where <volume> and <issue> are the volume and issue numbers of that
> digest, and then queues a message in the `digest` queue to tell the
> digest runner to create the digest from the messages in that mbox and
> send it. Thus, it leaves no var/lists/<list-id>/digest.mmdf mailbox file
> behind and that is created anew when the next post arrives. Further, if
> there is a non-empty digest.mmdf file, its messages should be sent no
> later than the next 11 PM `cron digests`.
>
>
>> There was one earlier message to the list back on May 4th, before the
>> one that got duplicated, but I can't tell if that triggered a
>> size-based digest to be sent: the logs aren't clear enough on that
>> detail for me to tell >
>
> OK
>
>
>> Just to inform things:
>>
>> (venv) lists@host2:~/mailman/venv/bin$ pip freeze | grep mailman
>> django-mailman3==1.3.9
>> mailman==3.3.8
>> mailman-hyperkitty==1.2.1
>> mailman-web==0.0.6
>> mailmanclient==3.3.5
>> (venv) lists@host2:~/mailman/venv/bin$ pip freeze | grep hyper
>> mailman-hyperkitty==1.2.1
>
> Actually, it's HyperKitty, not hyperkitty, but I assume HyperKitty is up
> to date as are the others.
>
>> (venv) lists@host2:~/mailman/venv/bin$ pip freeze | grep post
>> postorius==1.3.8
>>
>>
>
--
Joel Lord
2 years

using SSH/TLS with external MTA
by Roland Giesler
I have managed thus far to get things working on my new install, but I
need to use a secure logon to send mail from an external MTA. I have
set up:
/etc/mailman/mailman.cfg:
smtp_host: box2.gtahardware.co.za
smtp_port: 465
smtp_user: roland(a)giesler.za.net
smtp_pass: <hidden>
smtp_secure_mode: smtps
smtp_verify_cert: no
smtp_verify_hostname: no
I'll get a cert installed later, for now just want to get it going.
This error occurs when I try to create a new user in postorius.
ERROR 2024-07-24 15:29:45,572 2150 django.request Internal Server Error:
/accounts/login/
Traceback (most recent call last):
File
"/usr/lib/python3/dist-packages/django/core/handlers/exception.py", line
47, in inner
response = get_response(request)
File "/usr/lib/python3/dist-packages/django/core/handlers/base.py",
line 181, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python3/dist-packages/django/views/generic/base.py",
line 70, in view
return self.dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/django/utils/decorators.py",
line 43, in _wrapper
return bound_method(*args, **kwargs)
File
"/usr/lib/python3/dist-packages/django/views/decorators/debug.py", line
89, in sensitive_post_parameters_wrapper
return view(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line
146, in dispatch
return super(LoginView, self).dispatch(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line
74, in dispatch
response = super(RedirectAuthenticatedUserMixin, self).dispatch(
File "/usr/lib/python3/dist-packages/django/views/generic/base.py",
line 98, in dispatch
return handler(request, *args, **kwargs)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line
102, in post
response = self.form_valid(form)
File "/usr/lib/python3/dist-packages/allauth/account/views.py", line
159, in form_valid
return form.login(self.request, redirect_url=success_url)
File "/usr/lib/python3/dist-packages/allauth/account/forms.py", line
196, in login
ret = perform_login(
File "/usr/lib/python3/dist-packages/allauth/account/utils.py", line
175, in perform_login
send_email_confirmation(request, user, signup=signup, email=email)
File "/usr/lib/python3/dist-packages/allauth/account/utils.py", line
346, in send_email_confirmation
email_address.send_confirmation(request, signup=signup)
File "/usr/lib/python3/dist-packages/allauth/account/models.py", line
62, in send_confirmation
confirmation.send(request, signup=signup)
File "/usr/lib/python3/dist-packages/allauth/account/models.py", line
169, in send
get_adapter(request).send_confirmation_mail(request, self, signup)
File "/usr/lib/python3/dist-packages/allauth/account/adapter.py",
line 464, in send_confirmation_mail
self.send_mail(email_template,
emailconfirmation.email_address.email, ctx)
File "/usr/lib/python3/dist-packages/allauth/account/adapter.py",
line 136, in send_mail
msg.send()
File "/usr/lib/python3/dist-packages/django/core/mail/message.py",
line 284, in send
return self.get_connection(fail_silently).send_messages([self])
File
"/usr/lib/python3/dist-packages/django/core/mail/backends/smtp.py", line
109, in send_messages
sent = self._send(message)
File
"/usr/lib/python3/dist-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.10/smtplib.py", line 901, in sendmail
raise SMTPRecipientsRefused(senderrs)
smtplib.SMTPRecipientsRefused: {'roland(a)giesler.za.net': (454, b'4.7.1
<roland(a)giesler.za.net>: Relay access denied')}
However, the mailserver is in daily use and accept logon all the time.
I believe I'm missing something that should be installed to make SMTPS
(SSL) work, but what?
10 months, 2 weeks

Re: Updating from Ubuntu-20.04 LTE installation
by Abhilash Raj
On Sat, May 23, 2020, at 8:28 PM, Mark Sapiro wrote:
> On 5/23/20 7:02 PM, Peter Adebahr via Mailman-users wrote:
> >
> > Our installation was done by "apt-get install" in Ubuntu 20, thus still
> > running MM 3.2.2 (and python 3.8.2).
> >
> > Do you have any advise, how to upgrade from there to your current
> > version? I know this might be a bit dangerous, but with today's VMs the
> > risk is much less than it used to be:
>
>
> It shouldn't be difficult, but I can't give you details because I don't
> know exactly how the Debian/Ubuntu package installs things. Also I don't
> know whether "current version" refers to the 3.3.1 release or the head
> of the https://gitlab.com/mailman/mailman master branch.
>
>
> > Do you think it would be possible, just to replace the code and library
> > parts, keeping the database and config files as is?
>
>
> Yes. It should be fairly straightforward. You first need to find where
> the Mailman Core package is. You should be able to just replace the
> contents of the `mailman` package directory with ours. You may be able
> to do this via pip
>
> pip install --upgrade mailman
>
> globally or within Mailman's virtualenv if it is installed in a virtualenv.
This is probably not a good idea, global install quite often breaks a lot of stuff (Like I broke Yum on my work computer since I wanted something newer than 10yo python packages).
A better idea would be to install Mailman from scratch inside a virtualenv somewhere in /opt/mailman and then letting it consume the same configurations. I think Ubuntu/Debian have their configurations in `/etc/mailman3/` and Mailman Core installed anywhere should just pick that up without any special work.
Same goes for Postorius/Django stuff. You can switch to a different Django project and just point to Debian/Ubuntu's settings.py (location of which should be in README.debian of the Debian package I presume).
> However, there are caveats. There are Debian patches at
> <https://sources.debian.org/patches/mailman3/3.2.2-1/>. The big `0002`
> patch replaces importlib_resources with importlib.resources because
> importlib_resources is not available in Debian. Most of the patches
> apply to tests, and for the actual working code, we fixed this
> differently as of Mailman 3.3.1, so I don't think you need the Debian
> patches.
>
>
> --
> 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)
5 years

Hyperkitty issue(s)
by Bryan Loniewski
Hello --
I'm stuck trying to integrate Hyperkitty. I see the following errors in mailman.log and mailmansuite.log respectively:
<snipped>
[2020-05-27 16:42:11 -0400] [5140] [ERROR] Error handling request /3.1/lists/bry_test4.lists-test.rutgers.edu/archivers
Traceback (most recent call last):
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 134, in handle
self.handle_request(listener, req, client, addr)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/gunicorn/workers/sync.py", line 175, in handle_request
respiter = self.wsgi(environ, resp.start_response)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/mailman/database/transaction.py", line 50, in wrapper
rtn = function(*args, **kws)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/mailman/rest/wsgiapp.py", line 193, in __call__
return super().__call__(environ, start_response)
File "falcon/api.py", line 274, in falcon.api.API.__call__
File "falcon/api.py", line 269, in falcon.api.API.__call__
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/mailman/rest/lists.py", line 406, in on_get
for archiver in archiver_set.archivers
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/mailman/rest/lists.py", line 407, in <dictcomp>
if archiver.system_archiver.is_enabled}
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/mailman/model/mailinglist.py", line 587, in system_archiver
raise AssertionError('Archiver not found: {}'.format(self.name))
AssertionError: Archiver not found: hyperkitty
and
<snipped>
Traceback (most recent call last):
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 34, in inner
response = get_response(request)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/postorius/middleware.py", line 42, in __call__
return self.get_response(request)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 36, in inner
response = response_for_exception(request, exc)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 90, in response_for_exception
response = handle_uncaught_exception(request, get_resolver(get_urlconf()), sys.exc_info())
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 125, in handle_uncaught_exception
return debug.technical_500_response(request, *exc_info)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/views/debug.py", line 89, in technical_500_response
reporter = ExceptionReporter(request, exc_type, exc_value, tb)
File "/opt/mailman/mm/venv/lib/python3.6/site-packages/django/views/debug.py", line 254, in __init__
self.template_info = getattr(self.exc_value, 'template_debug', None)
File "/opt/mailman/mm/venv/lib/python3.6/tempfile.py", line 479, in __getattr__
file = self.__dict__['file']
KeyError: 'file'
Note that I've kinda followed the Virtualenv route along with using Mark's helpful webpage re: his experiences.
Some relevant? config files...
mailman.cfg:
<snip>
[archiver.prototype]
enable: yes
[archiver.hyperkitty]
class: mailman_hyperkitty.Archiver
enable: yes
configuration: /opt/mailman/mm/mailman-hyperkitty.cfg
<snip>
mailman-hyperkitty.cfg:
[general]
base_url: https://a_real_domain/mm3/hyperkitty
api_key: <movealong>
I can provide additional conf file setups if warranted? I am curious (and perhaps this is in fact the issue) why when I run mailman conf I don't see the archiver.hyperkittty section even though its in the mailman.cfg file? While at the same time I do see archiver.{mail_archive,mhonarc}? I know it's reading my mailman.cfg based on other sections I've already setup/manipulated.
Another data point:
$ grep -i hyperkitty requirements.txt
HyperKitty==1.3.2
mailman-hyperkitty==1.1.0
Any suggestions?
________________________
Bryan Loniewski
Rutgers University
OIT:EAS:Messaging and Collaboration Services
System Administrator
5 years

Re: HYPERKITTY_ATTACHMENT_FOLDER
by Ugnius S
Could You please confirm that this parameter should be placed in
mailman-hyperkitty.cfg file?
I have checked mailman/postorius/hyperkitty owner user can write files
there and web user group
has privileges to write and to read, but *no any files appear there*.
Mailman works, it is possible to download
attachments from hyperkitty. Mailman restarted, uwsgi restarted, runjobs
restarted. No files in
/full/path/to/folder/
File looks like:
[general]
base_url: https://flistserv.example.com/hyperkitty/
api_key: BlaBlabla
HYPERKITTY_ATTACHMENT_FOLDER = /full/path/to/folder/
BR
Ugnius
2019-09-11, tr, 21:21 Ugnius S <ugniusviln(a)gmail.com> rašė:
> Thank You so much.
>
> 1) https://hyperkitty.readthedocs.io/en/latest/install.html
> Close to the end before the "UPDATE" topic, chapter "Customization".
>
> 2)
> https://buildmedia.readthedocs.org/media/pdf/hyperkitty/stable/hyperkitty.p…
> Page 10, chapter 2.8 "Customization"
>
> BR
> Ugnius
>
> 2019-09-11, tr, 20:16 Abhilash Raj <maxking(a)asynchronous.in> rašė:
>
>>
>>
>> On Wed, Sep 11, 2019, at 9:52 AM, Ugnius S wrote:
>> > Hi.
>> >
>> > Can anybody send example how to set it? It is mentioned in
>> documentation,
>> > but very vaguely.
>>
>> If you can point out where did you find it in docs, I can update it.
>> Information is kind of duplicated in a few places.
>>
>> > HYPERKITTY_ATTACHMENT_FOLDER = /full/unix/path
>>
>> This is the right value.
>>
>> It is a path on the filesystem, where the user running Hyperkitty is
>> allowed to write.
>>
>> >
>> > HYPERKITTY_ATTACHMENT_FOLDER = http://localhost:8000/something
>> >
>> > HYPERKITTY_ATTACHMENT_FOLDER = ./var/data/something/
>> >
>> > Has anybody experience of using this, maybe have recommendations of
>> using
>> > it? Better under project user or better under web content owner where
>> the
>> > static content is. I would like to store attachments separately to avoid
>> > growing database.
>> > Hyperkitty documentation:
>> > By default, HyperKitty stores the email attachments in the database.
>> If
>> > you would rather have them stored on the filesystem, you can set the
>> > HYPERKITTY_ATTACHMENT_FOLDER configuration value to a directory.
>> > Make sure that the user running the Django process (for example, apache
>> or
>> > www-data) has the permissions to write in this directory.
>> >
>> > -------------
>> > _______________________________________________
>> > 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)
>> _______________________________________________
>> 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/
>>
>
5 years, 8 months