trouble with multipart and moderation

Hey all, I've been hanging out in IRC for a few days and checking all over the googles but I have not found a solution to these two problems yet.
I used to run a (entirely plain text) Mailman 2 list, but I'm now setting up Mailman 3, built last month by the mailman-bundler package.
Most things are working great! There are a couple problems I'm trying to work around, though.
I can't seem to find a way to send multipart emails. I have a script which generates a multipart email. It only has a plain text and a text/HTML segment. No matter how I have tried to send it into Mailman, the message that gets posted to the list is the raw multipart email as I sent it in. How do I get mailman to realize it's a multipart email and should be formatted as such?
I confirmed with the help of others that Mailman 3's behavior is the password you provide in making the django superuser is the password you can use to accept emails to be moderated by email. This always fails. You always get "Results: Confirmation token did not match" and "Unprocessed: Approved: <key>". However, Postorius still works for approving messages. Source: https://github.com/terencehonles/mailman/blob/master/src/mailman/rules/appro...
Lastly, it's already reported as a bug, but you can't open the Held Messages in Postorius unless you comment out the 443rd line in _client.py. Now it's working for us just fine.

On 02/12/2016 09:37 AM, Shea Alterio wrote:
I used to run a (entirely plain text) Mailman 2 list, but I'm now setting up Mailman 3, built last month by the mailman-bundler package.
Most things are working great! There are a couple problems I'm trying to work around, though.
We are working on setting up mailman3-users at mailman3.org (running on MM 3 of course), but there are still infrastructure issues to work out before that list will be operational.
In the mean time the best list for Mailman 3 and particularly HyperKitty, Postorius and MailmanBundler issues is mailman-developers@python.org or you can try the #mailman IRC channel on freenode.
It seems you are saying that you send a multipart/alternative message with text/plain and text/html alternative parts to the list and you receive back from the list a text/plain message whose content is the raw message body that you sent. Are you sure your script is generating the multipart/alternative mail correctly? What happens if you sen such a message from your MUA as opposed to your script? Is the problem with all such mail or just mail generated by your script?
Assuming MM 3.0, the code is <https://gitlab.com/mailman/mailman/blob/release-3.0/src/mailman/rules/approv...>.
In any case, that code is verifying the list's moderator_password which is not the Django super password. In fact, this is the core engine which knows nothing about Django or Postorius.
Now if you are talking about approving held mail via the Postorius Web UI, that's a different issue, and I *think* the Django superuser PW should work, but it has nothing to do with pre-approval via an Approved: <password> header which is the only thing mailman/rules/approved.py is doing. Other's, Particularly on mailman-developers or IRC will have more insight on this.
Lastly, it's already reported as a bug, but you can't open the Held Messages in Postorius unless you comment out the 443rd line in _client.py. Now it's working for us just fine.
OK.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thanks a bunch for your response, it was very helpful.
If I send it from a MUA, the text/plain+text/html is delivered without issue if sent directly to other accounts. It is properly formatted and looks as it should. If I send it into Mailman I get just a text/html+text/plain email, but all the html etc. Is shown as raw code, as if you were to paste html code into a word processor. This script to generate the text/plain+text/html email hasn't changed for over a decade, but it was being used with Lyris Listmanager, so I'm not sure if there's some nonstandard formatting in the script mailman is getting caught up on.
Thanks for your help, again. I'll try the other list and IRC.
Original Message From: Mark Sapiro Sent: Friday, February 12, 2016 7:55 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] trouble with multipart and moderation
On 02/12/2016 09:37 AM, Shea Alterio wrote:
I used to run a (entirely plain text) Mailman 2 list, but I'm now setting up Mailman 3, built last month by the mailman-bundler package.
Most things are working great! There are a couple problems I'm trying to work around, though.
We are working on setting up mailman3-users at mailman3.org (running on MM 3 of course), but there are still infrastructure issues to work out before that list will be operational.
In the mean time the best list for Mailman 3 and particularly HyperKitty, Postorius and MailmanBundler issues is mailman-developers@python.org or you can try the #mailman IRC channel on freenode.
It seems you are saying that you send a multipart/alternative message with text/plain and text/html alternative parts to the list and you receive back from the list a text/plain message whose content is the raw message body that you sent. Are you sure your script is generating the multipart/alternative mail correctly? What happens if you sen such a message from your MUA as opposed to your script? Is the problem with all such mail or just mail generated by your script?
Assuming MM 3.0, the code is <https://gitlab.com/mailman/mailman/blob/release-3.0/src/mailman/rules/approv...>.
In any case, that code is verifying the list's moderator_password which is not the Django super password. In fact, this is the core engine which knows nothing about Django or Postorius.
Now if you are talking about approving held mail via the Postorius Web UI, that's a different issue, and I *think* the Django superuser PW should work, but it has nothing to do with pre-approval via an Approved: <password> header which is the only thing mailman/rules/approved.py is doing. Other's, Particularly on mailman-developers or IRC will have more insight on this.
Lastly, it's already reported as a bug, but you can't open the Held Messages in Postorius unless you comment out the 443rd line in _client.py. Now it's working for us just fine.
OK.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/shea%40forcedexposure....

On 02/13/2016 08:19 AM, Shea Alterio wrote to mailman-users:
I'm copying this to mailman-developers@python.org and requesting replies to go there.
What you see should obviously not be happening, but a cursory inspection of the doc tests which the code passes seems to show this situation is covered.
In the message received from Mailman, do you also see MIME headers and boundaries (i.e. headers such as Content-Type:) preceding the text/plain and text/html content, or do you just see the plain and html text?
Also, what is the python3 version that Mailman is using?
For further analysis of this can you create a very simple test message in an MUA and send it to a list? The body can be a simple line or two. Than can you post the entire, raw message source of the sent message and of the message as received back from the list.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

On 02/12/2016 09:37 AM, Shea Alterio wrote:
I used to run a (entirely plain text) Mailman 2 list, but I'm now setting up Mailman 3, built last month by the mailman-bundler package.
Most things are working great! There are a couple problems I'm trying to work around, though.
We are working on setting up mailman3-users at mailman3.org (running on MM 3 of course), but there are still infrastructure issues to work out before that list will be operational.
In the mean time the best list for Mailman 3 and particularly HyperKitty, Postorius and MailmanBundler issues is mailman-developers@python.org or you can try the #mailman IRC channel on freenode.
It seems you are saying that you send a multipart/alternative message with text/plain and text/html alternative parts to the list and you receive back from the list a text/plain message whose content is the raw message body that you sent. Are you sure your script is generating the multipart/alternative mail correctly? What happens if you sen such a message from your MUA as opposed to your script? Is the problem with all such mail or just mail generated by your script?
Assuming MM 3.0, the code is <https://gitlab.com/mailman/mailman/blob/release-3.0/src/mailman/rules/approv...>.
In any case, that code is verifying the list's moderator_password which is not the Django super password. In fact, this is the core engine which knows nothing about Django or Postorius.
Now if you are talking about approving held mail via the Postorius Web UI, that's a different issue, and I *think* the Django superuser PW should work, but it has nothing to do with pre-approval via an Approved: <password> header which is the only thing mailman/rules/approved.py is doing. Other's, Particularly on mailman-developers or IRC will have more insight on this.
Lastly, it's already reported as a bug, but you can't open the Held Messages in Postorius unless you comment out the 443rd line in _client.py. Now it's working for us just fine.
OK.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan

Thanks a bunch for your response, it was very helpful.
If I send it from a MUA, the text/plain+text/html is delivered without issue if sent directly to other accounts. It is properly formatted and looks as it should. If I send it into Mailman I get just a text/html+text/plain email, but all the html etc. Is shown as raw code, as if you were to paste html code into a word processor. This script to generate the text/plain+text/html email hasn't changed for over a decade, but it was being used with Lyris Listmanager, so I'm not sure if there's some nonstandard formatting in the script mailman is getting caught up on.
Thanks for your help, again. I'll try the other list and IRC.
Original Message From: Mark Sapiro Sent: Friday, February 12, 2016 7:55 PM To: mailman-users@python.org Subject: Re: [Mailman-Users] trouble with multipart and moderation
On 02/12/2016 09:37 AM, Shea Alterio wrote:
I used to run a (entirely plain text) Mailman 2 list, but I'm now setting up Mailman 3, built last month by the mailman-bundler package.
Most things are working great! There are a couple problems I'm trying to work around, though.
We are working on setting up mailman3-users at mailman3.org (running on MM 3 of course), but there are still infrastructure issues to work out before that list will be operational.
In the mean time the best list for Mailman 3 and particularly HyperKitty, Postorius and MailmanBundler issues is mailman-developers@python.org or you can try the #mailman IRC channel on freenode.
It seems you are saying that you send a multipart/alternative message with text/plain and text/html alternative parts to the list and you receive back from the list a text/plain message whose content is the raw message body that you sent. Are you sure your script is generating the multipart/alternative mail correctly? What happens if you sen such a message from your MUA as opposed to your script? Is the problem with all such mail or just mail generated by your script?
Assuming MM 3.0, the code is <https://gitlab.com/mailman/mailman/blob/release-3.0/src/mailman/rules/approv...>.
In any case, that code is verifying the list's moderator_password which is not the Django super password. In fact, this is the core engine which knows nothing about Django or Postorius.
Now if you are talking about approving held mail via the Postorius Web UI, that's a different issue, and I *think* the Django superuser PW should work, but it has nothing to do with pre-approval via an Approved: <password> header which is the only thing mailman/rules/approved.py is doing. Other's, Particularly on mailman-developers or IRC will have more insight on this.
Lastly, it's already reported as a bug, but you can't open the Held Messages in Postorius unless you comment out the 443rd line in _client.py. Now it's working for us just fine.
OK.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Users mailing list Mailman-Users@python.org https://mail.python.org/mailman/listinfo/mailman-users Mailman FAQ: http://wiki.list.org/x/AgA3 Security Policy: http://wiki.list.org/x/QIA9 Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/ Unsubscribe: https://mail.python.org/mailman/options/mailman-users/shea%40forcedexposure....

On 02/13/2016 08:19 AM, Shea Alterio wrote to mailman-users:
I'm copying this to mailman-developers@python.org and requesting replies to go there.
What you see should obviously not be happening, but a cursory inspection of the doc tests which the code passes seems to show this situation is covered.
In the message received from Mailman, do you also see MIME headers and boundaries (i.e. headers such as Content-Type:) preceding the text/plain and text/html content, or do you just see the plain and html text?
Also, what is the python3 version that Mailman is using?
For further analysis of this can you create a very simple test message in an MUA and send it to a list? The body can be a simple line or two. Than can you post the entire, raw message source of the sent message and of the message as received back from the list.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (2)
-
Mark Sapiro
-
Shea Alterio