Search results for query "sapiro"
- 6281 messages
[MM3-users] Re: UnicodeEncodeError: 'ascii' codec can't encode character
by Marvin Gülker
Hi,
Am 11. Dezember 2019 um 13:49 Uhr -0800 schrieb Mark Sapiro:
>OK. I have verified that this is due to
><https://bugs.python.org/issue32330> and has actually been reported as
><https://gitlab.com/mailman/mailman/issues/441> and worked around in
>Mailman by <https://gitlab.com/mailman/mailman/merge_requests/350> which
>is included in Mailman 3.2.0 and up.
Thanks, and sorry for bugging you about old versions then. I'm going to
forward the problem to Ubuntu's bugtracker then.
But I now have a different problem. I've removed all offending messages
(it were more than just one that caused the UnicodeEncodeError), but I
still can't access the page for the held messages queue. It gives an
error 500, now with a different exception in the log. I've included it
below. It looks to me that the messages haven't properly been deleted.
What I did was this: for each offending message hash
1. I ran the DELETE query
2. I deleted the file from the file system
3. I ran the delete_message() function
I originally wanted to run only the delete_message() function, but a
quick check on the DB and the file system after running it for one hash
told me that it neither deletes the message from the DB nor from the
file system. So I did everything at once. I do have a backup of both the
DB and the filesystem from before I started this, in case this broke
something.
Is there something left that I have to do now?
Here's the exception:
Dec 12 08:34:30 2019 (9570) REST request handler error:
Traceback (most recent call last):
File "/usr/lib/python3.6/wsgiref/handlers.py", line 137, in run
self.result = application(self.environ, self.start_response)
File "/usr/lib/python3/dist-packages/mailman/database/transaction.py", line 50, in wrapper
rtn = function(*args, **kws)
File "/usr/lib/python3/dist-packages/mailman/rest/wsgiapp.py", line 214, in __call__
return super().__call__(environ, start_response)
File "falcon/api.py", line 215, in falcon.api.API.__call__ (falcon/api.c:2872)
File "falcon/api.py", line 189, in falcon.api.API.__call__ (falcon/api.c:2419)
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 167, in on_get
resource = self._make_collection(request)
File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 159, in _make_collection
for resource in collection]
File "/usr/lib/python3/dist-packages/mailman/rest/helpers.py", line 159, in <listcomp>
for resource in collection]
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 157, in _resource_as_dict
resource = self._make_resource(request.id)
File "/usr/lib/python3/dist-packages/mailman/rest/post_moderation.py", line 78, in _make_resource
resource['msg'] = msg.as_string()
AttributeError: 'NoneType' object has no attribute 'as_string'
--
Blog: https://mg.guelker.eu
6 years, 7 months
[MM3-users] Re: Clearing webserver cache - Nginx
by Odhiambo Washington
On Mon, Aug 5, 2024 at 8:19 PM Mark Sapiro <mark(a)msapiro.net> wrote:
> On 8/5/24 07:04, Odhiambo Washington via Mailman-users wrote:
> > I am having an ugly-looking https://mm3-lists.kictanet.or.ke/archives/
> page
> > because of cached content:
> >
> > ```
> > 2024/08/05 17:00:31 [error] 694#694: *9562 open()
> > "/opt/mailman/mm/static/CACHE/css/output.6dab123e4897.css" failed (2: No
> > such file or directory), client: 172.70.111.39, server:
> > mm3-lists.kictanet.or.ke, request: "GET
> > /static/CACHE/css/output.6dab123e4897.css HTTP/2.0", host: "
> > mm3-lists.kictanet.or.ke", referrer: "
> > https://mm3-lists.kictanet.or.ke/archives/"
> > 2024/08/05 17:00:31 [error] 694#694: *9564 open()
> ...
> > That IP address appearing there is not my actual IP, but Cloudflare's,
> > which is acting as proxy for the site.
>
>
> I **think** you may have something like
>
> location /static/ {
> alias /opt/mailman/web/static/;
> }
>
> in nginx on cloudflare, but since cloudflare is not the Mailman server,
> /opt/mailman/web/static/ doesn't exist there.
>
Actually, what I mean is that CF is proxying requests to the host named
m3-lists.kictanet.or.ke.
I do not have any configuration other than DNS proxying at CF.
I can't be sure on how to configure this without knowing the details of
> how requests get from cloudflare to mm3-lists.kictanet.or.ke and from
> there to the wsgi server.
>
When you ping m3-lists.kictanet.or.ke, the IP you get is CFs, not the
actual IP of the host.
So when you talk to m3-lists.kictanet.or.ke via a browser, it's CF IP who
you talk to and it in turn talks to the host directly.
So the IP address you see in the logs is CF's IP address, not yours, not
mine and CF are doing some caching. That's why
they are requesting for expired files.
> However, if cloudflare just proxies the request for /static/ to the
> Mailman server and nginx on that server has the above `location`
> directive, that may do it.
>
I suppose it's possible to configure Nginx to NOT ALLOW caching of content
from the /static/ location.
Being new to Nginx, time to say hi to uncle G again.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
In an Internet failure case, the #1 suspect is a constant: DNS.
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]
1 year, 11 months
[MM3-users] Re: A little stuck with installation of MM3 - ModuleNotFoundError: No module named 'flufl.lock'
by Odhiambo Washington
On Sat, 25 Jul 2020 at 22:11, Mark Sapiro <mark(a)msapiro.net> wrote:
> On 7/25/20 11:37 AM, Odhiambo Washington wrote:
> > On Sat, 25 Jul 2020 at 19:58, Mark Sapiro <mark(a)msapiro.net> wrote:
> >>
> >> This is a packaging glitch with the flufl modules. Remove and reinstall
> >> them.
> >>
> >> pip uninstall flufl.bounce flufl.i18n flufl.lock
> >> pip install flufl.bounce flufl.i18n flufl.lock
> >>
> >>
> > It would appear that luck isn't just on my side:
> >
> > root@gw:/opt/mailman/mm # pip uninstall flufl.bounce flufl.i18n
> flufl.lock
> ...
>
>
> You need to run these pip commands in your venv. I.e. do this
>
> > [root@gw /opt/mailman/mm]# source /opt/mailman/mm/venv/bin/activate
>
> before the pip uninstall and pip install.
> <https://lists.mailman3.org/mailman3/lists/mailman-users.mailman3.org/>
That has solved the problem. Thank you very much.
I have taken note of that. for my NOTES.
Finally, I have adapted your init script to get some rudimentary one that I
could use on FreeBSD.
I have to change /opt/mailman to be owned by mailman3:mailman3 (because I
have "live" MLs on this server, using mailman-2.1.34.
I am not sure if they can co-exist. I suppose they could, but what might be
the security implication, if any??
This is what the init script looks like (rudimentary!!):
(venv) [root@gw /usr/local/etc/rc.d]# less mailman3
### BEGIN INIT INFO
# Provides: GNU Mailman
# Short-Description: Mailman3 Service
# Description: service control for Mailman3
### END INIT INFO
PATH=/opt/mailman/mm/bin:/opt/mailman/mm/venv/bin:/usr/sbin:/usr/bin:/bin:/sbin:
DESC="GNU Mailman service"
DAEMON=/opt/mailman/mm/bin/mailman
NAME=mailman
USER=mailman3
GROUP=mailman3
# Needed by click
export LANG=en_US.UTF-8
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
#. /lib/init/vars.sh
# Define LSB log_* functions.
# Depend on lsb-base (>= 3.2-14) to ensure that this file is present
# and status_of_proc is working.
#. /lib/lsb/init-functions
case "$1" in
start)
[ "$VERBOSE" != no ] && echo "Starting $DESC" "$NAME"
# use --force to remove a stale lock.
/usr/local/bin/sudo -u $USER $DAEMON start --force
;;
stop)
[ "$VERBOSE" != no ] && echo "Stopping $DESC" "$NAME"
/usr/local/bin/sudo -u $USER $DAEMON stop
;;
status)
/usr/local/bin/sudo -u $USER $DAEMON status
;;
reopen)
/usr/local/bin/sudo -u $USER $DAEMON reopen
;;
restart)
log_daemon_msg "Restarting $DESC" "$NAME"
/usr/local/bin/sudo -u $USER $DAEMON restart
;;
*)
echo "Usage: $SCRIPTNAME {start|stop|status|reopen|restart}" >&2
exit 3
;;
esac
It does start mailman3 for sure, but also complains after a few seconds
with the message:
(venv) [root@gw /usr/local/etc/rc.d]#
*/opt/mailman/mm/venv/lib/python3.7/site-packages/mailman-3.3.2b1-py3.7.egg/mailman/rest/wsgiapp.py:180:
DeprecatedWarning: Call to deprecated function __init__(...). API class may
be removed in a future release, use falcon.App instead.*
* **kws)*
But:
(venv) [root@gw /usr/local/etc/rc.d]# ps ax | grep mailman
11677 - Is 0:00.01 /usr/local/bin/python
/usr/local/mailman/bin/mailmanctl -s -q start (python2.7)
15860 - S 0:07.86 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=ArchRunner:0:1 -s (python2.7)
16310 - S 0:07.43 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=BounceRunner:0:1 -s (python2.7)
16928 - S 0:07.07 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=CommandRunner:0:1 -s (python2.7)
17335 - S 0:07.47 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=IncomingRunner:0:1 -s (python2.7)
17975 - S 0:07.02 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=NewsRunner:0:1 -s (python2.7)
18419 - S 0:20.06 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s (python2.7)
19015 - S 0:07.13 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=VirginRunner:0:1 -s (python2.7)
19131 - I 0:00.15 /usr/local/bin/python
/usr/local/mailman/bin/qrunner --runner=RetryRunner:0:1 -s (python2.7)
27273 - Is 0:01.64 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/master --force -C /opt/mailman/mm/mailman.cfg
(python3.7)
28526 - S 0:01.70 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=archive:0:1 (python3.7)
28627 - I 0:01.77 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=bounces:0:1 (python3.7)
28988 - S 0:01.70 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=command:0:1 (python3.7)
29341 - S 0:01.69 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=in:0:1 (python3.7)
29978 - S 0:01.68 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=lmtp:0:1 (python3.7)
30843 - S 0:01.70 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=nntp:0:1 (python3.7)
31541 - S 0:01.70 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=out:0:1 (python3.7)
31675 - S 0:01.70 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=pipeline:0:1 (python3.7)
32181 - S 0:01.77 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=rest:0:1 (python3.7)
33166 - I 0:01.65 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=retry:0:1 (python3.7)
33694 - S 0:01.70 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=virgin:0:1 (python3.7)
34600 - S 0:01.69 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=digest:0:1 (python3.7)
41250 - S 0:00.01 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=rest:0:1 (python3.7)
41533 - S 0:00.01 /opt/mailman/mm/venv/bin/python
/opt/mailman/mm/venv/bin/runner -C /opt/mailman/mm/mailman.cfg
--runner=rest:0:1 (python3.7)
98450 - I 0:00.45 httpd: mailman-web (httpd)
59886 0 S+ 0:00.00 grep mailm
Assuming that I am using mod_wsgi with Apache, and that I have configured
apache right using
https://wiki.list.org/DOC/Mailman%203%20installation%20experience?action=At…
..
should I be able to access the MM3 web UI??
At that point, I am feeling somewhat confused as to what to try next.
(venv) [root@gw /opt/mailman/mm/var/logs]# less mailman.log
Jul 25 22:53:16 2020 (40670) Master started
Jul 25 22:53:18 2020 (42036) bounces runner started.
Jul 25 22:53:18 2020 (45205) out runner started.
Jul 25 22:53:19 2020 (41191) archive runner started.
Jul 25 22:53:19 2020 (46670) retry runner started.
Jul 25 22:53:19 2020 (44567) nntp runner started.
Jul 25 22:53:19 2020 (43069) in runner started.
Jul 25 22:53:19 2020 (46960) virgin runner started.
Jul 25 22:53:20 2020 (45720) pipeline runner started.
Jul 25 22:53:20 2020 (47326) digest runner started.
Jul 25 22:53:20 2020 (43755) lmtp runner started.
Jul 25 22:53:20 2020 (45922) rest runner started.
[2020-07-25 22:53:20 +0300] [45922] [INFO] Starting gunicorn 20.0.4
[2020-07-25 22:53:20 +0300] [45922] [INFO] Listening at:
http://127.0.0.1:8001 (45922)
[2020-07-25 22:53:20 +0300] [45922] [INFO] Using worker: sync
[2020-07-25 22:53:20 +0300] [54732] [INFO] Booting worker with pid: 54732
[2020-07-25 22:53:20 +0300] [55467] [INFO] Booting worker with pid: 55467
Jul 25 22:53:21 2020 (42743) command runner started.
How do I access the web UI for MM3 now?
Thanks in advance.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", grep ^[^#] :-)
6 years
[MM3-users] Re: postfix malformed address with confirm replies
by Stephen Mats Mats
> On Feb 28, 2021, at 01:32, Stephen J. Turnbull <turnbull.stephen.fw(a)u.tsukuba.ac.jp> wrote:
>
> Mark Sapiro writes:
>> On 2/27/21 4:36 AM, Stephen J. Turnbull wrote:
>
>>> is legal, and I think that most servers will accept it, but RFC
>>> 5321 sets a limit of 64 octets on mailboxes[1], and your
>>> confirmation mailbox is 67 octets.
>>
>> Since the -confirm+<token> part is fixed at 49 octets, this would imply
>> a limit in list names of 15 octets. Ouch!
>
> I'm pretty sure we would have run into this before, if there were a
> lot of servers out there imposing this limit. 15 octets is pretty
> darn short, there are probably quite a few list names out there longer
> than that. Not to mention that the RFC itself says "you SHOULD NOT be
> a jerk about this". :-) So I don't think this is a big problem in
> practice, and I hope Steve can reconfigure the obstructive server to
> not be so picky.
>
To be clear the 'obstructive server’ is mailman-core. :)
[ec2-user@ip-172-31-18-xxx ~]$ telnet 172.19.199.2 8024
Trying 172.19.199.2...
Connected to 172.19.199.2.
Escape character is '^]'.
220 mailman-core GNU Mailman LMTP runner 2.0
LHLO ip-172-31-18-xxx.us-west-2.compute.internal
250-mailman-core
250-SIZE 33554432
250-8BITMIME
250 HELP
MAIL FROM:<stephen.s.w.matsmats(a)gmail.com>
250 OK
RCPT TO:<matsmats-mm3-test1-confirm+d6f77a2572ef55a8b2c4ca0d77de8493fbb55856(a)mm3.aca-aws.s.uw.edu>
553 5.1.3 Error: malformed address
RCPT TO:<matsmats-mm3-test1-confirm+d6f77a2572ef55a8b2c4ca0d77de8493fbb55(a)mm3.aca-aws.s.uw.edu>
250 OK
quit
221 Bye
Didn’t really dig but my guess would be the LMTP from aiosmtpd.lmtp is actually throwing the 553.
For a bit of context, of the 25,801 mailman2 lists we have here at University of Washington 5,211 have names longer than 15 characters (we don’t have any lists with multibyte characters in their names). Our longest list name is 33 characters. I didn’t dump every config to see the number of lists that subscribe_policy set to confirm or confirm and approve. But I expect it’s a small minority.
steve
> For Mailman, I doubt we need a full SHA1 (?) for the purpose. We can
> truncate the thing, probably opportunistically (ie, so the whole
> confirmation mailbox fits in 64 octets, or we could even parse the
> bounce message and resend only if we run into a problem).
>
> Steve
> _______________________________________________
> 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, 4 months
[MM3-users] Non-ascii characters missing from Pipermail archive txt and gz downloads
by Mark Dale
Mailman 2.1.34
Debian 10
Postfix
Hi
I'm hoping someone can shine a light on character encoding issue I've encountered.
A plain-text email with non-ascii characters in the body gets posted to the list.
As per Mark Sapiro's guide I've captured the incoming message to file.
- https://www.mail-archive.com/mailman-users@python.org/msg73469.html
The message is received by Mailman with the non-ascii characters displaying correctly.
The header of that message has:
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.9.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-AU
Content-Transfer-Encoding: 8bit
In the list's mbox file and archive webpage, the message displays the non-ascii characters correctly.
In the archive's downloaded .txt (and also .gz) file, the non-ascii characters are missing and displayed as "?".
I've copied the message text in below, from both the correct one from the email and the erroneous .txt file. Hopefully they won't get scrambled up when I send this.
Any advice on getting the non-ascii characters written into the archive .txt file would be gratefully received.
Thanks,
Mark
=== Message text as okay in mbox and as shown on the archive webpage ===
If one goes by the definition of veḷippaṭai as given in the Tamil Lexicon that the meaning of an ambiguous word should be disambiguated by a qualifying word, then aruvi āmpal does not conform to that definition since in the case of aruvi āmpal in Patiṟṟuppattu 63, aruvi is really made up of aru+vi, a compound. Moreover, the expression aṭai aṭuppu aṟiyā is already there to clarify that āmpal is a number and not a flower. Thus, aruvi simply provides information in addition to aṭai aṭuppu aṟiyā that āmpal is not a flower. The modern commentator Aruḷampalavaṉār also does not call it veḷippaṭai.
===
=== Message text with missing characters in te archive's txt and gz downloads ==
If one goes by the definition of ve?ippa?ai as given in the Tamil Lexicon that the meaning of an ambiguous word should be disambiguated by a qualifying word, then aruvi ?mpal does not conform to that definition since in the case of aruvi ?mpal in Pati??uppattu 63, aruvi is really made up of aru+vi, a compound. Moreover, the expression a?ai a?uppu a?iy? is already there to clarify that ?mpal is a number and not a flower. Thus, aruvi simply provides information in addition to a?ai a?uppu a?iy? that ?mpal is not a flower. The modern commentator Aru?ampalava??r also does not call it ve?ippa?ai.
===
5 years, 3 months
[MM3-users] Re: Message-Footer after migrating to Mailman3
by Abhilash Raj
> On Jul 9, 2021, at 9:15 AM, christopher.claus(a)tgcamberg1848.de wrote:
>
> Mark Sapiro wrote:
>>> ERROR 2021-05-24 16:22:22,895 1648 django.security.DisallowedHost Invalid HTTP_HOST header: 'tgc_mailman_web:8000'. The domain name provided is not valid according to RFC 1034/1035.
>>> WARNING 2021-05-24 16:22:22,896 1648 django.request Bad Request: /postorius/api/templates/list/homepage.gruppe.tgcamberg1848.de/list:member:regular:footer
>>> It appears you created the new template with Postorius, but there is an
>> issue for Postorius templates. Possibly your Django setting for
>> POSTORIUS_TEMPLATE_BASE_URL needs to be adjusted.
>>> Obviously I have a problem with the hostname. I set
>>> [code]
>>> POSTORIUS_TEMPLATE_BASE_URL=http://tgc_mailman_web:8000
>>> [/code]
>>> where tgc_mailman_web is my container name. This URL ist stored in the DB-table "template" for the name=list:member:regular:footer. A call to my fqdn or to localhost
>>> [code]
>>> wget http://localhost:8000/postorius/api/templates/list/homepage.gruppe.tgcamberg...
>>> [/code]
>>> will return the footer itself - this works fine. Therefore, should i set POSTORIUS_TEMPLATE_BASE_URL to http://localhost:8000?
>>> If that works, yes.
>
> Hi Mark,
>
> thanks for your reply and excuse my delay. I was very busy in the last weeks but made some tests. Newly created templates with POSTORIUS_TEMPLATE_BASE_URL=http://localhost:8000 did not work. I changed it to my fqdn - at the moment I am able to access the template via this URl (e.G. http://lists.example.de:8000/postorius/api/templates/list/homepage.lists.ex…)
> But if I try to send an email I got the following error:
You want the URL at which Postorius (postorius) is available from Core (mailman-core container). The default for that in the container images is set to http://mailman-web:8000. Does that not work for you?
If you want to verify, you want to exec into the Core’s container (`docker exec -it mailman-core bash`) and see if you can curl the URL from inside there. If you are using the default docker-compose-postorius.yaml then there is a /etc/hosts entry created by docker for the mailman-web container, hence `http://mailman-web:8000` works there (but it won’t work on the host, since docker doesn’t modify the host’s /etc/hosts).
There might also be a bug in play here which would cause such connection refused errors when subscribing/unsubscribing when there was a template configured for the list. Is that the case for you or are you seeing always when trying to send the email (which would imply that the Web container simply isn’t reachable from Core).
--
thanks,
Abhilash Raj (maxking)
4 years, 11 months
[MM3-users] Re: Core, Hyperkitty and Postorius releases
by Odhiambo Washington
On Sat, May 15, 2021 at 12:24 AM Abhilash Raj <maxking(a)asynchronous.in>
wrote:
>
>
> On Fri, May 14, 2021, at 2:16 PM, Odhiambo Washington wrote:
> > On Sat, May 15, 2021 at 12:01 AM Mark Sapiro <mark(a)msapiro.net> wrote:
> >
> > > On 5/14/21 1:54 PM, Odhiambo Washington wrote:
> > > >
> > > > /usr/local/include/sass
> > > >
> > > > That is the only thing found that is in the base system.
> > >
> > > And that's the one you want. What is it's mode?
> > >
> >
> > root@gw:/usr/home/wash # ls -al /usr/local/include/sass
> > total 104
> > drwxr-xr-x 2 root wheel 512 Apr 16 16:49 .
> > drwxr-xr-x 176 root wheel 10240 Apr 19 18:05 ..
> > -rw-r--r-- 1 root wheel 2369 Apr 8 11:08 base.h
> > -rw-r--r-- 1 root wheel 10742 Apr 8 11:08 context.h
> > -rw-r--r-- 1 root wheel 6632 Apr 8 11:08 functions.h
> > -rw-r--r-- 1 root wheel 6489 Apr 8 11:08 values.h
> > -rw-r--r-- 1 root wheel 198 Apr 8 11:08 version.h
> >
> > I imagined I needed an executable.
>
> This sounds like a result of you running `pip3 install sass`, probably
> with sudo
> which failed mid-way due to the exception you posted above.
>
Closer to the truth! It failed. I was running this from within the
virtualenv.
> Which OS are you using?
FreeBSD.
> On debian/ubuntu, you can install:
>
> sudo apt install sassc
>
Do I need to install sassc in the base OS or in the virtualenv?
> I am not exactly sure how it got removed during your upgrade
> to the new version of Mailman since it shouldn't affect your system
> packages.
>
The funny part is my MM3 used to run. Mark took so much hand-holding for me
to get it running.
Then one day I used the update process and things got hosed.
The happy part is that I had not put any production lists on MM3 as I
hadn't developed the confidence of managing it.
Did you install Mailman initially using system packages or instructions
> provided at [1]?
>
> [1]:
> https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-inst…
No. I relied on
https://wiki.list.org/DOC/Mailman%203%20installation%20experience. This is
way back!
Your new link is recent, no?
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v "^$|^.*#" :-)
5 years, 2 months
[MM3-users] Re: Errors while importing mm2 list archives - SOLVED
by Odhiambo Washington
On Tue, Dec 20, 2022 at 9:50 AM Odhiambo Washington <odhiambo(a)gmail.com>
wrote:
>
>
> On Tue, Dec 20, 2022 at 3:52 AM Mark Sapiro <mark(a)msapiro.net> wrote:
>
>> On 12/17/22 23:22, Odhiambo Washington wrote:
>> >
>> > I have dropped the DB, recreated, ...
>>
>> When you created the DB did you specify `CHARACTER SET utf8mb4`, e.g.
>>
>> CREATE DATABASE mailmansuite CHARACTER SET utf8mb4
>>
>
> Yes. That is what I do at the minimum for my databases unless specific
> instructions exist against it.
> So it seems like I have done everything that is commonly expected, but the
> import still fails on several messages.
>
It turns out that all this time I was barking up the wrong tree!
I was having all my modifications in /etc/mailman3/*.
When I did run 'mailman info', the information that came out is that
mailman was actually reading /opt/mailman/mm/mailman.cfg
I then just moved all the files I had put in /etc/mailman3/ to
/opt/mailman/mm/.
There is a WARNING on
https://docs.list.org/en/latest/install/virtualenv.html#virtualenv-install
which says one must create the config file as /etc/mailman3/mailman.cfg
How to force mailman to read that file is something I haven't understood,
but turns out to be what has taken me days trying to get things right.
Ultimately, when I did the import, there was only one email from the
archives that failed to be imported - which I honestly don't mind, but
maybe there is a solution for this
"'utf-8' codec can't encode character '\udcae' in position 331: surrogates
not allowed" ??
(venv) [mailman@gw ~/mm]$ /opt/mailman/mm/bin/django-admin
hyperkitty_import -l kictanet(a)lists.kictanet.or.ke
/usr/local/mailman2/archives/private/kictanet.mbox/kictanet.mbox
Importing from mbox file
/usr/local/mailman2/archives/private/kictanet.mbox/kictanet.mbox to
kictanet(a)lists.kictanet.or.ke
21%*Failed adding message
<1260802782.6596.1350003565(a)webmail.messagingengine.com
<1260802782.6596.1350003565(a)webmail.messagingengine.com>>: 'utf-8' codec
can't encode character '\udcae' in position 331: surrogates not allowed*
Computing thread structure
Synchronizing properties with Mailman
915 emails left to refresh, checked 0
767 emails left to refresh, checked 0
Warming up cache
The full-text search index is not updated for this list. It will not be
updated by the 'minutely' incremental update job. To update the index for
this list, run the Django admin command with arguments
'update_index_one_list kictanet(a)lists.kictanet.or.ke'.
(venv) [mailman@gw ~/mm]$
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
3 years, 7 months
[MM3-users] Re: "Delete this thread" -> 'HTTP-500 -> NoneType' object has no attribute 'all'
by Simon Liebold
Am 28.05.2017 um 21:16 schrieb Mark Sapiro:
>
> I just tested this on another list on this server. and both 'delete
> message' and 'delete thread' worked for me with the latest release
> Hyperkitty 1.1.0, django_mailman3 1.1.0 and Django-1.10.7.
>
> Did you get to the confirmation page and then get the 500 or did the 500
> come before getting the confirmation page? Is there a full traceback in
> mailman_web.log?
>
I didn't find a 'delete message' button. But "Delete this thread" went
straight to the 500. Both, Hyperkitty and django-mailman are up-to-date
with master.
ERROR 2017-05-28 13:04:14,496 29835 django.request Internal Server
Error:
/hyperkitty/list/simsimmer@lists.simonliebold.de/thread/4I2TRZTFXMMH2XRQAS73IAEIYROFE5YM/delete
Traceback (most recent call last):
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/exception.py",
line 41, in inner
response = get_response(request)
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/base.py",
line 249, in _legacy_get_response
response = self._get_response(request)
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/base.py",
line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/core/handlers/base.py",
line 185, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/contrib/auth/decorators.py",
line 23, in _wrapped_view
return view_func(request, *args, **kwargs)
File "/opt/mailman/hyperkitty/hyperkitty/lib/view_helpers.py", line
141, in inner
return func(request, *args, **kwargs)
File "/opt/mailman/hyperkitty/hyperkitty/views/message.py", line 306,
in delete
form = MessageDeleteForm(initial={"email": initial})
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/forms/forms.py",
line 96, in __init__
self.fields = copy.deepcopy(self.base_fields)
File "/usr/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/lib/python2.7/copy.py", line 328, in _reconstruct
args = deepcopy(args, memo)
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 237, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/lib/python2.7/copy.py", line 230, in _deepcopy_list
y.append(deepcopy(a, memo))
File "/usr/lib/python2.7/copy.py", line 174, in deepcopy
y = copier(memo)
File
"/opt/mailman/venv-2.7/local/lib/python2.7/site-packages/Django-1.11rc1-py2.7.egg/django/forms/models.py",
line 1168, in __deepcopy__
result.queryset = self.queryset.all()
AttributeError: 'NoneType' object has no attribute 'all'
Simon
9 years, 1 month
[MM3-users] Re: Mailman issues after re-boot
by Odhiambo Washington
On Sat, Sep 16, 2023 at 5:49 PM Paul Rubin <paulrubin37(a)gmail.com> wrote:
> *<< I sent this to the mailman3 issues on gitlab and Mark replied but asked
> me to move to this list, so I copied everything and inserted responses. I
> hope this makes sense and someone can help me.>>*
>
> After a lengthy power failure I had to reboot a machine that has been
> running for several years. the WEB-UI does not seem to be able to see
> mailman-core. I have looked for log entries that might explain what the
> issue is and I am stumped to even find logs that will update when I get an
> error on the browser. Mailman is definitely running, postgres is running
> and mailman web is running. if I go to the lists page I see lists, if I try
> to access a specific list I get Server error: An error occurred while
> processing your request.
>
> I looked in /var/logs/mailman /opt/mailman/web/mailmanweb
>
> All I can find is:
>
> django.urls.exceptions.NoReverseMatch: Reverse for
> 'list_unsubscription_requests' not found.
> 'list_unsubscription_requests' is not a valid view function or pattern
> name.16688 ERROR 2023-09-12 13:56:58,430 1760 django.request Internal
> Server Error: /mailman3/lists/goodstein.goodstein.org/ File
> "/opt/mailman/venv/lib64/python3.8/site-packages/haystack/admin.py",
> line 8, in <module> from django.utils.translation import
> ungettextImportError: cannot import name 'ungettext' from
> 'django.utils.translation'
>
> (/opt/mailman/venv/lib64/python3.8/site-packages/django/utils/translation/__init__.py)
>
> Also I have to run mailman from "mailman start" because the systemctl
> returns this:
>
> ● mailman3.service - GNU Mailing List Manager Loaded: loaded
> (/etc/systemd/system/mailman3.service; enabled; vendor preset:
> disabled) Active: failed (Result: exit-code) since Tue 2023-09-12
> 10:06:31 EDT; 13s ago Process: 31159
> ExecStart=/opt/mailman/venv/bin/mailman start (code=exited,
> status=1/FAILURE) CPU: 806msSep 12 10:06:31 mail
> mailman[31159]: Error in atexit._run_exitfuncs:Sep 12 10:06:31 mail
> mailman[31159]: Traceback (most recent call last):Sep 12 10:06:31 mail
> mailman[31159]: File "/usr/lib64/python3.8/logging/__init__.py",
> line 2126, in shutdownSep 12 10:06:31 mail mailman[31159]:
> h.flush()Sep 12 10:06:31 mail mailman[31159]: File
> "/opt/mailman/venv/lib64/python3.8/site-packages/mailman/core/logging.py",
> line 67, in flushSep 12 10:06:31 mail mailman[31159]: if
> self._stream:Sep 12 10:06:31 mail mailman[31159]: AttributeError:
> 'ReopenableFileHandler' object has no attribute '_stream'Sep 12
> 10:06:31 mail systemd[1]: mailman3.service: Control process exited,
> code=exited, status=1/FAILURESep 12 10:06:31 mail systemd[1]:
> mailman3.service: Failed with result 'exit-code'.Sep 12 10:06:31 mail
> systemd[1]: Failed to start GNU Mailing List Manager.
>
> Please tell me where to start looking or adjusting.
>
>
> Reply from Mark Sapiro,* Edited to include responses:*
>
> Mark Sapiro <https://gitlab.com/msapiro>@msapiro
> <https://gitlab.com/msapiro>· 1 day ago
> <https://gitlab.com/mailman/mailman-web/-/issues/23#note_1557601916>
> Owner
> Add reaction
> More actions
>
> The mailman-users(a)mailman3.org list is probably a more appropriate place
> for issues like this.
>
> django.urls.exceptions.NoReverseMatch: Reverse for
> 'list_unsubscription_requests' not found. 'list_unsubscription_requests' is
> not a valid view function or pattern name. 16688 ERROR 2023-09-12
> 13:56:58,430 1760 django.request Internal Server Error: /mailman3/lists/
> goodstein.goodstein.org/
>
> /opt/mailman/venv/lib64/python3.8/site-packages/postorius/urls.py should
> contain
>
> re_path( r'^unsubscription_requests$',
> list_views.list_unsubscription_requests,
> name='list_unsubscription_requests', ),
>
> Y
>
> *Yes this exists*
>
> and /opt/mailman/venv/lib64/python3.8/site-packages/postorius/views/list.py
> should define list_unsubscription_requests.
>
> *Yes there is a method by this name defined*
>
> File "/opt/mailman/venv/lib64/python3.8/site-packages/haystack/admin.py",
> line 8, in from django.utils.translation import ungettext ImportError:
> cannot import name 'ungettext' from 'django.utils.translation'
> (/opt/mailman/venv/lib64/python3.8/site-packages/django/utils/translation/
> *init*.py)
>
> See
>
> https://docs.djangoproject.com/en/4.2/internals/deprecation/#deprecation-re…
> -
> ungettext() is removed from django>=4.0
>
> Sep 12 10:06:31 mail mailman[31159]: AttributeError:
> 'ReopenableFileHandler' object has no attribute '_stream'
>
> I don't understand this one offhand, but what is the content of
> /etc/systemd/system/mailman3.service, in particular the settings for User,
> Group and ExecStart?
>
> *The service looks right:*
>
> 1 [Unit]
> 2 Description=GNU Mailing List Manager
> 3 After=syslog.target network.target postgresql.service
> 4
> 5 [Service]
> 6 Type=forking
> 7 PIDFile=/opt/mailman/mm/var/master.pid
> 8 User=mailman
> 9 Group=mailman
> 10 ExecStart=/opt/mailman/venv/bin/mailman start
> 11 ExecReload=/opt/mailman/venv/bin/mailman restart
> 12 ExecStop=/opt/mailman/venv/bin/mailman stop
> 13
> 14 [Install]
> 15 WantedBy=multi-user.target
>
> *It seems I may have two versions of the mailman script:*
>
> mail:/opt/mailman # which mailman
> /usr/bin/mailman
> mail:/opt/mailman # ls -al /usr/bin/mailman
> -rwxr-xr-x 1 root root 382 May 10 2021 /usr/bin/mailman
> mail:/opt/mailman # ls -al /opt/mailman/venv/bin/mailman
> -rwxr-xr-x 1 mailman mailman 231 Sep 12 10:02 /opt/mailman/venv/bin/mailman
>
> Somehow, your installation is corrupted. I don't know how
>
> *I need to know what to remove, how to correctly update, etc., That said
> the two scripts appear to be very similar:*
>
> mail:/opt/mailman # head /usr/bin/mailman
>
> #!/usr/bin/python3
> # EASY-INSTALL-ENTRY-SCRIPT: 'mailman==3.3.4','console_scripts','mailman'
> __requires__ = 'mailman==3.3.4'
> import re
> import sys
> from pkg_resources import load_entry_point
>
> if __name__ == '__main__':
> sys.argv[0] = re.sub(r'(-script\.pyw?|\.exe)?$', '', sys.argv[0])
> sys.exit(
>
>
> mail:/opt/mailman # head /opt/mailman/venv/bin/mailman
> #!/opt/mailman/venv/bin/python3
> # -*- coding: utf-8 -*-
> import re
> import sys
> from mailman.bin.mailman import main
> if __name__ == '__main__':
> sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
> sys.exit(main())
> mail:/opt/mailman #
>
> *Given the two years since the last reboot I also tried following *
> https://docs.mailman3.org/en/latest/upgrade-guide.html *to make sure I was
> running the latest*
>
> pip install -U mailman postorius django-mailman3 hyperkitty mailman-web
>
Why don't you try and do a fresh virtualenv install and move your configs
into it?
1. cd /opt
2. mv mailman _mailman.BAK
3. Create a backup of the database.
Then follow this:
https://docs.mailman3.org/en/latest/install/virtualenv.html#virtualenv-inst…,
but do not create the database as it already exists.
You also do not need to run any database migrations, so you can actually
skip those
You just need to ensure that `mailman info` says that its configuration
files are in /etc/mailman3/
Create the necessary directories as per the above installation instructions.
--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254 7 3200 0004/+254 7 2274 3223
"Oh, the cruft.", egrep -v '^$|^.*#' ¯\_(ツ)_/¯ :-)
[How to ask smart questions:
http://www.catb.org/~esr/faqs/smart-questions.html]
2 years, 10 months