Mirroring a read-only mailing list in Discourse

:bookmark: This guide explains how to create a read-only mirror of a mailing list using Discourse. It covers the necessary site settings, category configuration, and subscription process.

:person_raising_hand: Required user level: Administrator

Discourse can function as an archive for a mailing list while allowing registered users to utilize most of its features. This guide will walk you through the process of setting up your own mailing list mirror.

:eyes: See this in our action on the Ruby-Talk mailing list mirror.

Summary

  • Configure site settings for email handling
  • Create or modify a category for the mailing list
  • Subscribe to the mailing list
  • Understand how the mirroring process works

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 submission address of the mailing list[1]

Configuring site settings

  1. If you’re not on a hosting plan that pre-configures incoming email, set up POP3 polling or manual polling via API for the account associated with your Discourse email address (e.g., discourse@example.com).

  2. Enable the following site settings:

    • email_in: Allow incoming emails
    • enable_staged_users: Enable staged users (crucial for the mirroring process)
  3. Optional settings:

    • Set authorized_extensions to * or add specific file extensions to allow the attachment types you need
    • Enable always_show_trimmed_content to allow all users to see trimmed content (hidden behind a image button)
    • Enable display_name_on_posts and disable prioritize_username_in_ux for name display preferences

Creating or modifying a category

  1. Create a new category or edit an existing one for the mailing list posts.

  2. Configure category permissions:

    • Click the “Security” tab, then “Edit Permissions”
    • Remove all existing permissions
    • Add “everyone” with “See” permission

When you’re done, it should look like this:

  1. Configure category settings:

    • Click the “Settings” tab
    • Enable “Accept emails from anonymous users with no accounts”
    • Set “Custom incoming email address” to the mailing list’s email address (e.g., mailing-list@foo.test)
    • Enable “Category mirrors mailing list”
  2. Save the category settings.

Subscribing to the mailing list

  1. Subscribe to the mailing list using your Discourse email address (e.g., discourse@example.com).

  2. If the mailing list has a web interface, ensure the following settings:

    • Mail delivery is enabled
    • Digest mode is off
    • Password reminder emails are disabled

For Mailman 2, make sure:

  • “Mail delivery” is “Enabled”
  • “Set Digest Mode” is “Off”
  • “Get password reminder email for this list?” is set to “No”

How it works

Enabling “Category mirrors a mailing list” changes how incoming emails are processed for that specific category:

  • Auto-generated emails are allowed, even when block_auto_generated_emails is enabled
  • All users can post via email, ignoring the email_in_min_trust setting
  • Incoming emails use the Message-ID to find related posts, regardless of the find_related_post_with_key setting
  • Markdown interpretation is limited to code blocks enclosed in triple backticks
  • Rejection emails are not sent for mailing list posts

FAQs

Q: Can I mirror multiple mailing lists?
A: Yes, create a separate category for each mailing list and configure them as described above.

Q: Can users reply to notifications and post to the mailing list?
A: No, replies to notifications are sent to Discourse, not the original mailing list. Users cannot post directly to the mailing list through Discourse.

Q: How can I prevent users from posting to the mirrored category via email?
A: While the category allows email posting, you can keep the incoming email address private to prevent unauthorized posting.


  1. i.e. people send to this address to post to the list, and it also appears on the To:/CC: lines of emails sent by the list to members ↩︎

Last edited by @supermathie 2024-10-18T20:01:40Z

Check documentPerform check on document:
「いいね!」 31

これは、「ユーザーが受信メールアドレスを知っていれば、そのカテゴリに投稿できる」という意味ですか? そのアドレスを誰にも教えないことで、これを防ぐことができますよね?

しかし、誰かがメールで通知を受け取った場合、返信できるはずです。その返信は、Discourse に投稿として送信されるのですか、それともメーリングリストに送信されるのですか?

「いいね!」 2

それは良い質問ですね。

はい、受信メールアドレスを知っていて、かつメーリングリストのアドレスと一致するように From アドレスを詐称できれば、可能だと思います。

いいえと言いたいところですが、この点については100%確信が持てません。なので、たぶん。試してみて教えてください。送信者アドレスの詐称も必要になる可能性があります。

確実にDiscourseに送信されます。

「いいね!」 3

サイトでGoogleグループがカテゴリに転送されていますが、accept emails from anonymousmirrors a mailing list が設定されているにもかかわらず、Email::Receiver::UserNotFoundError でメールが拒否されています。

他にこれをトリガーする可能性のあるものはありますか?

「いいね!」 2

ステージングユーザーを有効にしましたか?

「いいね!」 4

いいえ。ステージングユーザーはオフでした。だから、機能させるにはオンにする必要があるということでしょうか?(理にかなっていますね…)だから、有効にしようとするときに、そのチェックを入れるべきかもしれませんね?

「いいね!」 2

わかりませんが、それが私の最善の推測です。

編集:このエラーが発生する場所はここだけで、次のようになっています。

raise UserNotFoundError unless SiteSetting.enable_staged_users

「いいね!」 4

試してみる必要がありますが、かなりの数の人が返信を試みるだろうと想定しています。これらのオプションの1つ以上があると便利かもしれません。

  1. このカテゴリを購読している人がいても、メールは送信しない。代わりに、メール配信を希望する場合は、{メーリングリストに直接登録するために必要な手順を実行する}という通知(または一度限りのメッセージ)を送信する。

  2. メーリングリストミラーカテゴリからメールが送信される際に、サイト管理者が返信先アドレスを定義できるようにする。(もちろん、カテゴリごとに設定可能。)これにより、ユーザーは配信を有効にせずにそのリストを購読し、Discourseから通知を受け取ることができ、返信した場合、その返信は実際のリストに送信される。

  3. 「カテゴリに返信を転送する」オプション。返信があった場合、別のカテゴリにリンクされたトピックが作成される。例えば、カテゴリ「Announce List」はメーリングリストミラーであり、返信は「Discussion About The Announcements」に作成される。タイトルは検討が必要だ。 :slight_smile:

「いいね!」 3

ガイドはこれを明確にしていますか、@gerhard

「いいね!」 3

いいえ、そうではありませんでしたが、今はそうです。

「いいね!」 5

ありがとうございます。これは以前、このカテゴリへの投稿のためにステージングされたユーザーを(おそらく)特別に処理していると仮定していたため、混乱していました。

「いいね!」 4

Discourse アカウントを作成し、Google グループのメンバーにすることで、双方向通信は可能になりますか?そうすれば、フォーラムへの投稿は、あたかもそのユーザーがメール リストのメンバーであるかのように GG に送信されます(ループを回避するために、そのユーザーからのすべての受信メールを拒否する必要があります)。これは、ユーザーが移行する際に Discourse と GG を並行して実行する方法として質問しています。

Google グループのメーリングリストを正常にミラーリングしていますが、トピックの返信を認識しません。Google トピック 1 と、それとは別に Re: Google トピック 1 の投稿になってしまいます。トピック スレッドを認識させる方法はありますか?