Can Email-In be used to "ingest" a mailing list?


(Jan P.) #1

I am looking to build a archive for a mailing list. I imagine a thread to become a topic, email addresses being replaced with usernames if a matching account exists.

Can the Email-In feature be used to “ingest” a mailing list this way?


(David Taylor) #2

I do this on my forum. The key requirement is that all emails arriving from your mailing list have a consistent from address. From memory, the rough process we followed was:

  • We have a mailman list on another server which sends email from "mailing-list@example.com".

  • Temporarily enabled “staged users” so that an account would automatically be created without a confirmation email

  • We set up a category “mailing list archive” on Discourse, and set the incoming email address to "forum-archive@forum.example.com"

  • We added "forum-archive@forum.example.com" as a recipient of the mailing list

  • When an email was sent, a staged user was created on Discourse with the email address "mailing-list@example.com". We then changed the profile pic & username on the user as needed

  • Disabled “staged users”

We actually did this for 5-6 different mailing lists, so we have a number of “archive” categories on the forum.


(Gerhard Schlager) #3

It works, but you’ll need to change a few email related site settings for this to work.
But, I’m currently working on a feature that will allow you to configure a category as a mailinglist mirror, which will make things a lot easier and more secure.

The new category setting

  • allows incoming emails to be auto-generated even when block_auto_generated_emails is enabled in Site Settings
  • allows finding related posts by Message-ID even when find_related_post_with_key is enabled in Site Settings
  • always uses the email cook method for incoming emails (currently all incoming emails use the regular cook method which interprets Markdown)
  • prevents sending of rejection emails (we don’t want to annoy any mailinglist users when Discourse rejects an email for whatever reason)

Understanding email in functionality
(Geoff Hutchison) #4

Right now, I’m struggling with the Email-In feature with a mailman mailing list.

I’ve set up an email account as a subscriber to the mailing list, and the Discourse category checks that address.

But everything is rejecting. Can this new feature be set to check for "list@domain.com" as a recipient (To: or CC:) of the e-mail?

Right now, I get a lot of errors like:

We’re sorry, but your email message to [“foo@bar.com”] (titled Re: [forum] Email-Subject) didn’t work.
None of the destination email addresses are recognized, or the Message-ID header in the email has been modified. Please make sure that you are sending to the correct email address provided by staff.


(Gerhard Schlager) #5

You need to make the following configuration changes if you want it to work right now:

  • Site Settings
    • enable reply by email enabled
    • enable email in
    • disable find related post with key
    • depending on your mailinglist, disable block auto generated emails
  • Category
    • set the Custom incoming email address to list@example.com
    • enable Accept emails from anonymous users with no accounts

(Andreas Dorfer) #6

a solution to ingest and transit an existing mailman installation would really be a VERY interesting solution for a lot of people who kept their stuff with mailing for the last decade(s) and stayed mostly because there is no good transition method.
(but many are unhappy, especially since lists scare away lot’s of potential new users.)


(David Taylor) #7

There is already an MBOX importer. I seem to remember that mailman’s storage format isn’t quite MBOX compliant, but you can certainly convert it to MBOX easily. Then follow the instructions here:

Migration from mailing list systems like mailman is one of Discourse’s key selling points


(Andreas Dorfer) #8

This may be a good solution for many of the people involved in discourse and/or ruby for a while.
But for starters “condering” if the like such a migration, this might be a barrier.

off course it’s feasable, but a more “multi step web ui importer” would be an even more attractive solution.
Especially some regex-magic on “cutting footers”, “killing excessive quoting” would stop people from reinventing the wheel.

(i can still setup sendmail by m4, and remember the qmail documentation. nevertheless, i appreciate convenient solutions nowadays too.)