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_allowed_groups 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 anonymous와 mirrors a mailing list 옵션이 모두 활성화되어 있는데도, 여전히 Email::Receiver::UserNotFoundError 오류가 발생하여 메일이 거부되고 있습니다.

이 오류를 유발할 수 있는 다른 원인이 있을까요?

2개의 좋아요

단계별 사용자를 활성화했나요?

4개의 좋아요

아니요. 단계별 사용자 기능이 꺼져 있었습니다. 그러니까 작동하려면 켜져 있어야 하는 건가요? (그렇게 되어야 할 것 같긴 하지만…) 그래서 이 기능을 활성화하려고 할 때 해당 설정을 확인하는 로직이 있는 게 좋겠습니다.

2개의 좋아요

확신은 없지만, 제 추측으로는 그렇습니다.

수정: 이 오류가 발생하는 곳은 단 한 곳뿐이며, 다음과 같이 보입니다:

raise UserNotFoundError unless SiteSetting.enable_staged_users

4개의 좋아요

직접 시도해 봐야겠지만, 상당수의 사용자가 답글을 시도할 것으로 예상됩니다. 다음 중 하나 이상의 옵션을 제공하면 좋겠습니다:

  1. 해당 카테고리를 관찰(watching) 중인 사용자가 있어도 메일을 보내지 않습니다. 대신 메일링 리스트의 이메일 전달을 원한다면 {리스트에 직접 가입하기 위한 필요한 조치}를 취해야 한다는 알림(또는 일회성 메시지)을 표시할 수 있습니다.

  2. 메일링 리스트 미러 카테고리가 메일을 전송할 때, 사이트 관리자가 답장 수신(reply-to) 주소를 정의할 수 있습니다. (물론 카테고리별로 설정해야 합니다.) 이렇게 하면 사용자가 메일 전달을 비활성화한 채 해당 리스트에 구독하고, Discourse에서 알림을 받으며, 답글을 보낼 경우 그 답글이 실제로 원래 리스트로 전송됩니다.

  3. “답글을 카테고리로 전환” 옵션을 제공합니다. 사용자가 답글을 보내면 다른 카테고리에 링크된 주제가 생성됩니다. 예를 들어, ‘Announce List’ 카테고리가 메일링 리스트 미러이고, 답글을 위한 ‘Discussion About The Announcements’ 카테고리가 있는 경우입니다. 제목은 조금 더 다듬어야 할 것 같습니다. :slight_smile:

3개의 좋아요

@gerhard님, 가이드에서 이 부분이 명확하게 나와 있나요?

3개의 좋아요

아니요, 그렇지 않았지만 이제는 그렇습니다.

5개의 좋아요

감사합니다! 이전에 이 부분이 헷갈렸는데, 여기에서 적용되는 특수 처리가 스테이징된 사용자(staged users)에게도 어떻게든 적용된다고(아마도 이 카테고리에 게시물을 올리는 경우에만 생성되는 것일까요?) 생각했기 때문입니다.

4개의 좋아요

Discourse에서 Google 그룹에 가입된 계정을 생성하여 양방향으로 만들 수 있을까요? 이렇게 하면 포럼에 게시된 글이 이메일 목록의 다른 일반 사용자인 것처럼 Google 그룹에 전송됩니다(루프를 방지하기 위해 해당 사용자로부터의 모든 수신 메일을 거부해야 합니다). 사용자가 점진적으로 이전되는 동안 Discourse와 Google 그룹을 병행으로 운영할 수 있는 방법으로서 이렇게 질문합니다.

Google 그룹 메일링리스트를 성공적으로 미러링하고 있지만, 주제에 대한 답글을 인식하지 못합니다. 결과적으로 Google Topic 1이라는 게시물이 먼저 표시되고, 그다음에 Re: Google Topic 1이 별도로 표시됩니다. 주제 스레드를 인식하도록 설정하는 방법이 있을까요?