[Mailman-Developers] Re: Mailman 2.1.30 archives challenges

2020-04-24 Thread Mark Sapiro
On 4/24/20 6:32 PM, Thomas Coradeschi via Mailman-Developers wrote:
> 
> I have a test list (called ’test’) and can see that 
> /var/lib/mailman/archives/private/test/2020-April.txt and 
> /var/lib/mailman/archives/private/test.mbox/test.mbox have both been created 
> and have messages being written to them, but the html archive pages are not 
> being built.
> 
> manually running '/var/lib/mailman/bin/arch test’ gives me


Note, do not run /var/lib/mailman/bin/arch more than once on a list
without the --wipe option.


> #0 <1f9f4dc9-af84-4d49-b1ee-abdc0a612...@skylands.ibmwr.org>
> figuring article archives
> 2020-April
> Pickling archive state into 
> /var/lib/mailman/archives/private/test/pipermail.pck
> Traceback (most recent call last):
>   File "bin/arch", line 201, in 
> main()
>   File "bin/arch", line 189, in main
> archiver.processUnixMailbox(fp, start, end)
>   File "/var/lib/mailman/Mailman/Archiver/pipermail.py", line 596, in 
> processUnixMailbox
> self.add_article(a)
>   File "/var/lib/mailman/Mailman/Archiver/pipermail.py", line 640, in 
> add_article
> author = fixAuthor(article.decoded['author'])
>   File "/var/lib/mailman/Mailman/Archiver/pipermail.py", line 63, in fixAuthor
> while i>0 and (L[i-1][0] in lowercase or
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 26: 
> ordinal not in range(128)


This looks like a manifestation of an issue we've seen before. There are
multiple threads on this issue in the archive of the
mailman-us...@python.org list The bulk of it is at

in threads with

Subject: [Mailman-Users] Uncaught runner exception

The bottom line is in
. We
could never figure out where it was coming from, but the import

from string import lowercase

in /var/lib/mailman/Mailman/Archiver/pipermail.py was returning a string
that contained many accented characters in addition to the 26 letters
a-z, namely the iso-8859-1 encoding of

'abcdefghijklmnopqrstuvwxyzµßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'

This is some packaging quirk in (I think) Debian's Python.

If you follow all through the threads, you'll see several suggested
patches for diagnosis and avoidance, and there is also a thread at
.

All that notwithstanding, I think this is the best patch for
avoiding/fixing the issue.

=== modified file 'Mailman/Archiver/pipermail.py'
--- Mailman/Archiver/pipermail.py   2018-05-03 21:23:47 +
+++ Mailman/Archiver/pipermail.py   2020-04-25 02:13:46 +
@@ -60,7 +60,7 @@
 else:
 # Mixed case; assume that small parts of the last name will be
 # in lowercase, and check them against the list.
-while i>0 and (L[i-1][0] in lowercase or
+while i>0 and (L[i-1][0] in lowercase[:26] or
L[i-1].lower() in smallNameParts):
 i = i - 1
 author = SPACE.join(L[-1:] + L[i:-1]) + ', ' + SPACE.join(L[:i])


-- 
Mark Sapiro The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Mailman 2.1.30 archives challenges

2020-04-24 Thread Thomas Coradeschi via Mailman-Developers
Thanks for help with my earlier problem, figured out how to get Apache straight 
and all is good.

Now trying to get archiving to work properly. It worked fine under 2.1.20, but 
not now. Ubuntu 16.04, mailman 2.1.30

The raw archive file is being written ok. 

I have a test list (called ’test’) and can see that 
/var/lib/mailman/archives/private/test/2020-April.txt and 
/var/lib/mailman/archives/private/test.mbox/test.mbox have both been created 
and have messages being written to them, but the html archive pages are not 
being built.

manually running '/var/lib/mailman/bin/arch test’ gives me

#0 <1f9f4dc9-af84-4d49-b1ee-abdc0a612...@skylands.ibmwr.org>
figuring article archives
2020-April
Pickling archive state into /var/lib/mailman/archives/private/test/pipermail.pck
Traceback (most recent call last):
  File "bin/arch", line 201, in 
main()
  File "bin/arch", line 189, in main
archiver.processUnixMailbox(fp, start, end)
  File "/var/lib/mailman/Mailman/Archiver/pipermail.py", line 596, in 
processUnixMailbox
self.add_article(a)
  File "/var/lib/mailman/Mailman/Archiver/pipermail.py", line 640, in 
add_article
author = fixAuthor(article.decoded['author'])
  File "/var/lib/mailman/Mailman/Archiver/pipermail.py", line 63, in fixAuthor
while i>0 and (L[i-1][0] in lowercase or
UnicodeDecodeError: 'ascii' codec can't decode byte 0xaa in position 26: 
ordinal not in range(128)

The following is what’s in /var/lib/mailman/archives/private/test at this time

drwxrwsr-x 2 tcora list 4096 Apr 24 20:30 2020-April
-rw-rw-r-- 1 tcora list  300 Apr 24 20:30 2020-April.txt
-rw-rw-r-- 1 tcora list 1048 Apr 24 20:30 index.html
-rw-rw 1 tcora list  588 Apr 24 20:30 pipermail.pck

Kinda at a loss here, so any insight would be much appreciated!

Regards,

—
Tom Coradeschi
tjc...@icloud.com

___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Re: Question about REST API for Mailman 3

2020-04-24 Thread Abhilash Raj



On Fri, Apr 24, 2020, at 9:30 AM, Stephen J. Turnbull wrote:
> Shashikanth Komandoor writes:
> 
>  >   I am developing an application on which just clicking on submit
>  > with some input values loaded should invoke the REST API of Mailman 3
>  > running on another server and do some activities like adding of user(s) to
>  > a list or removal of user(s) from a list or so.
>  > 
>  >   Is it possible to do so ? If so, how ?
> 
> It's possible.  The REST API itself is documented here:
> 
> https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html
> 
> I haven't tried the examples with curl, but they probably should
> work; I don't think you need any special HTTP headers or anything like
> that.

Except for HTTP basic auth, which  you can usually just do with "--user" 
parameter in curl instead of creating the "Authorization" header and it's 
base64 encoded username password value yourself.

> 
> The "another server" part is possible, but a bad idea in production
> because the REST API is 100% not authenticated.  Security is
> maintained by running any applications that access the REST API on the
> same host.  If you really want to do this, it's explained in this
> thread:
> 
> https://lists.mailman3.org/archives/list/mailman-us...@mailman3.org/thread/M24EAWD7VK6PHDJVWI76XIXBI225FRF6/
> 
> Note that the context of this thread is a development environment and
> the idea is to restrict access to a small LAN.
> 
> Steve
> ___
> Mailman-Developers mailing list -- mailman-developers@python.org
> To unsubscribe send an email to mailman-developers-le...@python.org
> https://mail.python.org/mailman3/lists/mailman-developers.python.org/
> Mailman FAQ: https://wiki.list.org/x/AgA3
> 
> Security Policy: https://wiki.list.org/x/QIA9
>

-- 
  thanks,
  Abhilash Raj (maxking)
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Question about REST API for Mailman 3

2020-04-24 Thread Stephen J. Turnbull
Shashikanth Komandoor writes:

 >   I am developing an application on which just clicking on submit
 > with some input values loaded should invoke the REST API of Mailman 3
 > running on another server and do some activities like adding of user(s) to
 > a list or removal of user(s) from a list or so.
 > 
 >   Is it possible to do so ? If so, how ?

It's possible.  The REST API itself is documented here:

https://mailman.readthedocs.io/en/latest/src/mailman/rest/docs/rest.html

I haven't tried the examples with curl, but they probably should
work; I don't think you need any special HTTP headers or anything like
that.

The "another server" part is possible, but a bad idea in production
because the REST API is 100% not authenticated.  Security is
maintained by running any applications that access the REST API on the
same host.  If you really want to do this, it's explained in this
thread:

https://lists.mailman3.org/archives/list/mailman-us...@mailman3.org/thread/M24EAWD7VK6PHDJVWI76XIXBI225FRF6/

Note that the context of this thread is a development environment and
the idea is to restrict access to a small LAN.

Steve
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Re: Question about REST API for Mailman 3

2020-04-24 Thread Shashikanth Komandoor
Is it possible through CURL command in combination with some other
parameters?

If possible please mention an example of adding a member to a mailman 2 DL.

I am really clueless.


Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>

On Fri, Apr 24, 2020 at 8:19 PM Shashikanth Komandoor <
shashikanth.komand...@gmail.com> wrote:

> Hi team,
>
>   I am developing an application on which just clicking on submit
> with some input values loaded should invoke the REST API of Mailman 3
> running on another server and do some activities like adding of user(s) to
> a list or removal of user(s) from a list or so.
>
>   Is it possible to do so ? If so, how ?
>
> --
> Thanks & Regards,
> Shashi Kanth.K
> 9052671936
>
>
>
>
>
> 
>  Virus-free.
> www.avast.com
> 
> <#m_-7325779880407563152_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>


-- 
Thanks & Regards,
Shashi Kanth.K
9052671936
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9


[Mailman-Developers] Question about REST API for Mailman 3

2020-04-24 Thread Shashikanth Komandoor
Hi team,

  I am developing an application on which just clicking on submit
with some input values loaded should invoke the REST API of Mailman 3
running on another server and do some activities like adding of user(s) to
a list or removal of user(s) from a list or so.

  Is it possible to do so ? If so, how ?

-- 
Thanks & Regards,
Shashi Kanth.K
9052671936





Virus-free.
www.avast.com

<#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
___
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9