I’ve found an interesting and obscure bug with regard to how replies to posts to mailing lists that are mirrored on Discourse are filed.
I have evidence that replies to one mailing list can be incorrectly filed against a second mailing list (with a different readership) if the initial e-mail was sent to both mailing lists at the same time.
Imagine I sit on two mailing lists, A and B, subscribed with my Gmail address. They have potentially different readerships. The list server sends out a single copy of a message to those on both mailing lists but the To: line states the message was sent to lists A and B in the same e-mail. This e-mail comes to my Gmail address which then via a filter forwards a copy to listA@mydiscourse.org.uk, with Gmail picking one of the two lists in the To: line. Gmail is set to forward posts to A to listA@mydiscourse.org.uk and posts to B to listB@mydiscourse.org.uk. Discourse is set up with two categories with those two different incoming mirroring e-mail addresses (listA@mydiscourse.org.uk and listB@mydiscourse.org.uk).
The issue of the listserver and Gmail only send one copy is separate and not the subject of this bug.
After this, a copy of the e-mail sent to me at my Gmail account ends up displaying in the category associated with the listA@mydiscourse.org.uk incoming address after Gmail forwarded it.
All good so far (aside from the fact only one e-mail came in from the list server in the first place).
Now, a separate user, who is only on the B mailing list replies to that e-mail to the list server. The list server sends that message out to everyone on the B mailing list. This come to my Gmail address with a To: line indicating it was sent to the B list. Gmail forwards it to listB@mydiscourse.org.uk.
But then Discourse files it as if it was e-mailed to listA@mydiscourse.org.uk!
This therefore reveals to those with access to list A the contents of a member of list B’s post!
I suspect Discourse ignores the route the e-mail took to get into Discourse and filed it based on the message ID flags in the headers, thus circumventing the route in.
The original e-mail, sent to A and B, has a single message ID within it and I suspect filing based on that message id alone is occurring.
If the original e-mailer had written two separate e-mails to list A and list B this problem wouldn’t have occurred as the two messages would have had their own message ids.
Suggested fix: If a category is mirroring a mailing list and a message comes in through the mirroring address that appears from the headers to be in reply to another post which resides somewhere else on discourse, then a new post needs to be created (perhaps with no obvious parent) in the expected category, rather than the reply ending up in a category which is associated with a different mailing list.