Would it be possible to create a private category usable only by a custom group and synchronise membership of that group with an external database?
I’m considering creating a category on a public forum for a mirror of a private mailing list. Not everyone on one would be on the other. For this to work, Discourse (or a separate script) would need to add and remove existing Discourse users to and from the custom group based on who is from time to time a member of the email list.
In that case, I would need to install Wordpress solely as a bridge between Mailman and Discourse. I am sure I could sync users between Mailman and Wordpress. But it would be a sledgehammer to crack a nut.
I’ve just had a look at the Discourse API documentation page. It’s possible to get a list of users (which contains usernames), get user by username (which contains the user’s groups), add user to group, and remove user from group. I guess I could run a cron job regularly to ensure only current Mailman list subscribers are members of the Discourse private group.
Something API solution like that is what I would recommend. I’m not aware of a mailman-to-discourse solution. If you’re running the mailman server, you could add hooks there to add/remove people from the Discourse group when their subscription status changes, but a daily cronjob that syncs them is probably easier and nearly as effective. Depending on how many subscribers and churn rate, you could also be even more low-tech and just let people request access to the group or contrive to Invite individual users to a group.