Restrict Mailing List Mode to Usergroup


we have a userbase with a quite old in age community that uses our Forum a lot via mailing list mode and is used to this. We want to keep this group as they bring a lot of knowledge to the discussion.

As new members join I would like to restrict mailing list mode, because it is a constant thread and produces costs, to the old users and not allow new users to use it.

Is there any way to accomplish this?


You can disable it in your site settings, via

disable mailing list mode

I think this will still allow existing users who have it enabled for it to work? The description text says

Disallow users from enabling mailing list mode.

But I’ll ask @sam – would this turn off mailing list mode for everyone, or just hide the setting?

1 Like

I think that you might hide the setting worth css. You could also not hide it for those that you want to be able to use it (or turn it off!).

I believe that turning off the site setting will disable the feature altogether, though I’ve not looked at the code (or tried it) to be sure.

It just hides the setting. A possible downside of that is that it prevents users who had previously enabled mailing list mode from disabling it via the UI.


Thanks for your investigations!
So just to be sure.
If I disable mailinglist mode the old users will stay in mailing list mode. If some of them want to switch to the standard mode of receiving summaries they would have to contact me?

How would I then change their settings? I only see the same settings like them. Sounds like I would need CLI for every request?

After having selected the disable mailing list mode setting, the easiest way to disable mailing list mode for a user who had previously enabled it would be to temporarily deselect the disable mailing list mode setting, go to the user’s preferences page and disable mailing list mode for them, then enable the disable mailing list mode setting again.

The other approach would be to use the Rails console. For example, if you already know the user’s ID:

uo = UserOption.find_by(user_id: <user_id>)

uo.update(mailing_list_mode: false)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

Since Discourse now sets the default value of the disable mailing list mode setting to true, I looked into this some more. When disable mailing list mode is set to true, no mailing list emails are sent from Discourse. This means that the setting completely disables mailing list mode for the site. The user’s options are not changed though - if you set disable mailing list mode to false after having set it to true, users who had previously selected the mailing list mode option will start to receive mailing list emails again. This seems like the correct behaviour to me.

1 Like