This guide describes how you can use Discourse for creating a read-only mirror of a mailing list.
Discourse acts as an archive for the mailing list and allows registered users to use most of its features.
Do you want to see it in action? Take a look at our mirror of the Ruby-Talk mailing list.
Are you ready to setup your own mailing list mirror? Here we go!
The following guide uses two email addresses as placeholders. You need to replace them with your actual addresses.
![]()
discourse@example.com
is address for incoming emails on your Discourse
![]()
mailing-list@foo.test
is the address where emails get sent by the mailing list
Site Settings
You can skip the first step if you are on a hosting plan that pre-configures your incoming email.
-
Make sure you configured POP3 polling or manual polling via API, so that it polls the account associated with
discourse@example.com
-
Enable
email_in
to allow incoming emails. -
Make sure that
enable_staged_users
is enabled. -
Optional: Allow all incoming attachments by setting
authorized_extensions
to*
or add all the file extensions you want to allow. -
Optional: Enable
always_show_trimmed_content
in order to allow every user to see trimmed content. It will be hidden behind abutton.
-
Optional: Enable
display_name_on_posts
and disableprioritize_username_in_ux
.
Category
You need to create a new category or edit an existing one which will be used for posting all emails that get sent to the mailing list.
-
First, click on the Security tab and then click on the Edit Permissions button.
-
Remove all existing permissions and add “
everyone
” with the permission “See
”. When you are done, it should look like this: -
Next, click on the Settings tab. There should be the following three fields. If there aren’t, make sure you have enabled the
email_in
site setting.-
“
Accept emails from anonymous users with no accounts
” – Enable this to allow the creation of staged users. -
“
Custom incoming email address
” – Enter theemail address of the mailing list. Look at the
To:
header of one of the emails sent by the mailing list, if you are unsure what to use here. -
“
Category mirrors mailing list
” – You must enable this option. It activates all the special handling for mailing lists.
-
-
Click on New Category or Save Category to create the new category or save your changes.
Subscribe to mailing list
Now it’s time to subscribe to the mailing list using
discourse@example.com
.
If the mailing list provides a web interface, take a look at the settings and make sure that you will receive only messages that should appear in the mirror category. For Mailman 2 it’s important that
- “Mail delivery” is “Enabled”
- “Set Digest Mode” is “Off”
- “Get password reminder email for this list?” is set to “No”
That’s it! Now it’s time to wait for the first email to arrive in your new mailing list mirror.
FAQ
I want to mirror multiple mailing lists. Is that possible?
Sure! All you need to do is create a category for each mailing list and configure it like described above.
How does all this work?
Enabling “Category mirrors a mailing list” changes how incoming emails are processed for that specific category:
-
Emails sent by a mailing list are usually marked as auto-generated. This setting allows incoming emails to be auto-generated even when
block_auto_generated_emails
is enabled in site settings. -
Every user can post within that category via email. The value of
email_in_min_trust
is ignored. -
It’s a good idea to make the category read-only to prevent users from posting and expecting that their post will appear on the mailing list. However, everyone can create new posts by sending an email to the mailing list.
-
Usually
find_related_post_with_key
is enabled in the site settings. Disabling it for the whole site is not recommended, since it allows user impersonation based on email address. Incoming emails that were sent to the mailing list always use the email’sMessage-ID
to find related posts and disregard the value of that site setting. -
Normally Discourse expects incoming emails to contain text formatted as Markdown. Mailing list users are usually unaware of that requirement, so Discourse doesn’t interpret any Markdown (except for code blocks enclosed in three backticks) or HTML within plain text emails and posts them with the original formatting intact.
-
Discourse usually notifies the sender when it rejects an email. That doesn’t make sense for mailing lists and probably would annoy the mailing list user, so sending of rejection emails is disabled.