Re: Switching to Discourse

Cameron Simpson <[email protected]> Sun, 11 Dec 2022 08:51:55 +1100
Newsgroups gmane.comp.python.devel
Message-ID <Y5T/e+BLJUU9Uv/[email protected]>
I'm presuming we're talking about ways to bidirectionally mirror between 
mailman and a Discourse forum.

On 10Dec2022 21:21, Stephen J. Turnbull <[email protected]> wrote:
>Since Mailman (and its users!) expects messages to arrive
>asynchronously and handles that using threading information, as far as
>I can see the Mailman side is handled as well as it can be now that
>Discourse provides threading information, and you just subscribe
>Mailman to Discourse.

That would work for receiving Discourse posts into the Mailman mailing 
list.

>And obviously we can just sign up Discourse to
>Mailman.

Can we? If you're talking about posts from the mailing list appearing on 
Discourse, this isn't trivial.

>The latter direction may be harder, depending on whether
>Discourse can make sense of batches of messages being composed
>independently of its message flow.

It (anecdotally, link lower down) looks like you can make a new Topic 
(thread) on Discourse if your user has a sufficient trust level 
(discourse users become more trusted over time). But the message author 
needs to be a Discourse user. So either all the individual mailman users 
need to be Discourse members _or_ the from address needs to be a 
list-wide id (eg the list submission address), but then the posts won't 
have the right author on the Discourse side.

None of that is easy to fix - mailing lists essentially just forward 
messages, with some gatewaying of what messages they allow inbound 
depending on the list. By contrast, Discourse posts have authors which 
must be Discourse users.

>The fact that Discourse didn't
>provide threading information to email users in the past suggest that
>it has an alternative mechanism for organizing mail flows, and message
>IDs and Reference headers from email may not be so easily integrated.

No, that stuff works ok now.

For new Topics (threads) this post:
https://discourse.gnome.org/t/email-use-of-discourse-how-to-start-a-new-thread/12324/4
sugggests that you can email to a specific category and I presume it 
would appear as a new Topic. I suspect any `In-Reply-To` or `References` 
would be ignored.

For replies, the email goes to a post-specific address which is used to 
stitch the message into an existing Topic discussion thread. The 
outgoing `In-Reply-To` and `References` headers are made on the fly when 
Discourse sends the post as email to whichever users are set up to 
receive an email copy. The source `Message-ID` is preserved.

>I know nothing about Discourse internals, but I suspect that's going
>to be the difficult part if there is one.  With a little luck that
>will be no problem. ;-)

I know a little, but not a lot.

In short: copying the Discourse stuff to mailman could be done by 
subscribing the mailman list to the Discourse forum.  Letting 
_nonDiscourse_ users reply or post to Discourse is not trivial.

Cheers,
Cameron Simpson <[email protected]>