# העברת רשימת דיוור ל-Discourse (mbox, Listserv, Google Groups וכו')

**URL:** https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773
**Category:** Migrating to Discourse
**Tags:** how-to
**Created:** [4 בפברואר,‏ 2018,‏ 9:08pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773 "2018-02-04T21:08:05Z")
**Posts on this page:** 20
**Page:** 4

<div class="post-metadata">

### Author: ![anon73664359](https://avatars.discourse-cdn.com/v4/letter/a/6de8d8/32.png) [@anon73664359](https://meta.discourse.org/u/anon73664359)
#### Post date: [31 באוקטובר,‏ 2021,‏ 1:51pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/200 "2021-10-31T13:51:40Z")

</div>

Well, that’s a massive bummer!

I thought Google hadn’t touched it since February 2015, but I stand corrected.

> **[Google Groups - Chrome Web Store](https://chromewebstore.google.com/detail/google-groups/bfmbadcfdhiklafcdohpfphhhakmiakk)**
>
> The new Google Groups is an improved way to participate in online discussions.

Looks like there was a complete redesign in 2020 and a logo touch-up in 2021.

---

<div class="post-metadata">

### Author: ![Anjana\_Raghavendra\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anjana_raghavendra_p/32/238441_2.png) [@Anjana\_Raghavendra\_P](https://meta.discourse.org/u/Anjana_Raghavendra_P)
#### Post date: [31 באוקטובר,‏ 2021,‏ 1:54pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/201 "2021-10-31T13:54:46Z")

</div>

I am thinking of using the APIs of GMAIL and Discourse and convert mail thread to discourse post. I have gone through the google apis and was able to get the emails but have a few questions about them.

1. Mail can be downloaded in raw format which is the base64 encoded value of “Original message” of mail. Is that the same as mbox format or is it different?
2. Is there any sample example of how to add posts and attachments to discourse through API?

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [31 באוקטובר,‏ 2021,‏ 2:25pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/202 "2021-10-31T14:25:59Z")

</div>

> [@Anjana\_Raghavendra\_P](#):
>
> using the APIs of GMAIL

Interesting. Is it possible to use the Gmail API to access emails from Google Groups or do you simply have a Gmail account that has all the emails that were sent to the group?

I suggest you save all message into individual \*.eml files. You will need to decode the message before saving _if_ the whole message (including the email headers) is base64 encoded. Afterwards follow the steps from [Migrate a mailing list to Discourse (mbox, Listserv, Google Groups, etc)](https://meta.discourse.org/t/importing-migrating-mailing-lists-mbox-listserv-google-groups-emails/79773) (minus the Google Groups steps). The import script will take care of posts, attachments and a lot more.

---

<div class="post-metadata">

### Author: ![Anjana\_Raghavendra\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anjana_raghavendra_p/32/238441_2.png) [@Anjana\_Raghavendra\_P](https://meta.discourse.org/u/Anjana_Raghavendra_P)
#### Post date: [31 באוקטובר,‏ 2021,‏ 2:31pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/203 "2021-10-31T14:31:27Z")

</div>

I am a member of the group so I am able to pull the mails using my email. The entire email message including headers will be part of the encoded string.

Will try your approach for import into discourse at least for a thread.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [31 באוקטובר,‏ 2021,‏ 2:38pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/204 "2021-10-31T14:38:57Z")

</div>

Well, in that case you might not even need the Gmail API. Connecting an email client like Thunderbird to your Gmail account and exporting individual emails or an mbox file should be enough…

> [@Anjana\_Raghavendra\_P](#):
>
> I am able to pull the mails using my email

Now I’d really like to know how this works. I was under the impression that Google Groups doesn’t support NNTP.

---

<div class="post-metadata">

### Author: ![Anjana\_Raghavendra\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anjana_raghavendra_p/32/238441_2.png) [@Anjana\_Raghavendra\_P](https://meta.discourse.org/u/Anjana_Raghavendra_P)
#### Post date: [31 באוקטובר,‏ 2021,‏ 2:52pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/205 "2021-10-31T14:52:26Z")

</div>

> [@gerhard](#):
>
> Now I’d really like to know how this works. I was under the impression that Google Groups doesn’t support NNTP.

It’s not NNTP but Rest API.

> **[Gmail API  |  Google for Developers](https://developers.google.com/workspace/gmail/api/reference/rest)**

---

<div class="post-metadata">

### Author: ![Anjana\_Raghavendra\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anjana_raghavendra_p/32/238441_2.png) [@Anjana\_Raghavendra\_P](https://meta.discourse.org/u/Anjana_Raghavendra_P)
#### Post date: [31 באוקטובר,‏ 2021,‏ 3:47pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/206 "2021-10-31T15:47:37Z")

</div>

> [@gerhard](#):
>
> Well, in that case you might not even need the Gmail API. Connecting an email client like Thunderbird to your Gmail account and exporting individual emails or an mbox file should be enough…

My mailbox size is more than 200GB and to get specific group-related emails I might need to download all these mails using thunderbird also thunderbird is not showing the google groups all mails are under Inbox only. It is also downloading only 200 emails each time. So, I am not sure how long it could take to get mails etc.

Is there any alternative way to just get a google group data and export it to mbox?

---

<div class="post-metadata">

### Author: ![Kirti\_Garg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/kirti_garg/32/238636_2.png) [@Kirti\_Garg](https://meta.discourse.org/u/Kirti_Garg)
#### Post date: [2 בנובמבר,‏ 2021,‏ 7:52am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/207 "2021-11-02T07:52:27Z")

</div>

Hi Gerhard Schlager,

We are trying to migrate our google groups to Discourse we followed all the above steps as per the document but it only creates the category in Discourse and not importing the data. Would really appreciate if you can respond on this one quickly.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [2 בנובמבר,‏ 2021,‏ 11:07am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/208 "2021-11-02T11:07:57Z")

</div>

> [@Anjana\_Raghavendra\_P](#):
>
> Is there any alternative way to just get a google group data and export it to mbox?

The only way that we knew about doesn’t work anymore. If you know _any_ way to get the data, then you should do that. If you know a way to get it, you should probably start getting it asap before that method too goes away.

If it’s in your mailbox then it might be possible to use that Gmail api to pull it down. It’ll be tricky though, as a developer would need access to a mailbox with google group data in it to write the code.

Unless an enterprise customer who requires it, I doubt that cdck (aka [discourse.org](http://discourse.org)) will be writing that code any time soon. You can ask in #Marketplace. I likely wouldn’t consider it for under $2000 and, given the frustration that I have had with the Google groups import script on the past, would likely require $5000. Or course, someone else may have better skills or more patience.

---

<div class="post-metadata">

### Author: ![asirota](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/asirota/32/197298_2.png) [@asirota](https://meta.discourse.org/u/asirota)
#### Post date: [3 בנובמבר,‏ 2021,‏ 2:00am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/209 "2021-11-03T02:00:09Z")

</div>

One approach that may work is using Integromat to write a conversion assuming google groups and discourse apps are available. Or using the http calls to call the rest APIs on their own.

Integromat is an integration data migration system. It’s very powerful and can do a lot with little to no coding.

> **[Google Groups Integration | Workflow Automation](https://www.make.com/en/integrations/google-groups?fromImt=1&)**
>
> Connect Google Groups to sync data between apps and create powerful automated workflows. Integrate over 3,000 apps on Make.

> **[Discourse Integration | Workflow Automation](https://www.make.com/en/integrations/discourse?fromImt=1&)**
>
> Connect Discourse to sync data between apps and create powerful automated workflows. Integrate over 3,000 apps on Make.

---

<div class="post-metadata">

### Author: ![Anjana\_Raghavendra\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anjana_raghavendra_p/32/238441_2.png) [@Anjana\_Raghavendra\_P](https://meta.discourse.org/u/Anjana_Raghavendra_P)
#### Post date: [8 בנובמבר,‏ 2021,‏ 4:01am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/210 "2021-11-08T04:01:14Z")

</div>

I have tried the **[google takeout](https://takeout.google.com/)** by making myself the owner of our google workspace group and able to download the google group conversations. Still working on importing it though.

A couple of downsides with this approach.

1. Need to download full data again if needed to do an incremental update.
2. Not possible to download selective group data instead this will download data for all groups for which the user has owner or manager permissions.
3. Need to work with the google workspace admin to enable the takeout as by default it is disabled.

---

<div class="post-metadata">

### Author: ![yannickwurm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yannickwurm/32/242586_2.png) [@yannickwurm](https://meta.discourse.org/u/yannickwurm)
#### Post date: [6 בדצמבר,‏ 2021,‏ 10:49am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/211 "2021-12-06T10:49:31Z")

</div>

Hi @Anjana_Raghavendra_P - did you manage to do a simple import using this approach?

Thanks very much!

---

<div class="post-metadata">

### Author: ![Anjana\_Raghavendra\_P](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/anjana_raghavendra_p/32/238441_2.png) [@Anjana\_Raghavendra\_P](https://meta.discourse.org/u/Anjana_Raghavendra_P)
#### Post date: [6 בדצמבר,‏ 2021,‏ 12:54pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/212 "2021-12-06T12:54:03Z")

</div>

Yes, I am able to download the mbox file from takeout and imported using the steps mentioned in the original post.

Later as we are using the PAAS service of Discourse provided the file to the discourse technical team who were able to import the content into the discourse platform.

---

<div class="post-metadata">

### Author: ![yannickwurm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yannickwurm/32/242586_2.png) [@yannickwurm](https://meta.discourse.org/u/yannickwurm)
#### Post date: [6 בדצמבר,‏ 2021,‏ 1:16pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/213 "2021-12-06T13:16:08Z")

</div>

I’m happy to hear that - thanks!

---

<div class="post-metadata">

### Author: ![yannickwurm](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yannickwurm/32/242586_2.png) [@yannickwurm](https://meta.discourse.org/u/yannickwurm)
#### Post date: [4 בינואר,‏ 2022,‏ 1:33am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/214 "2022-01-04T01:33:32Z")

</div>

I encountered @sturdy2’s issue when in `settings.yml`, I changed the first line `data_dir: /shared/import/data`, from its default.

Take home message: don’t change it as it refers to the path inside the import docker, not on the main machine.

---

<div class="post-metadata">

### Author: ![clayg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clayg/32/181131_2.png) [@clayg](https://meta.discourse.org/u/clayg)
#### Post date: [30 בינואר,‏ 2022,‏ 10:42pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/215 "2022-01-30T22:42:49Z")

</div>

I have a question about restarting an import?

I’m not a developer but I have managed to successfully import two mbox files that came from a system called Topicbox Group Email. I did my test import into a temporary instance of Discourse that I set up on Digital Ocean. And I was able to import my two sample mbox files into existing categories I had already created in Discourse, thanks to the notes about setting the category.custom\_fields[“import\_id”] = “mydir” from above.

Yay! But if I want to import more mbox files, do I have to run all of the commands mentioned in FAQ 2.2, which indicates it will “delete everything”?

---

<div class="post-metadata">

### Author: ![clayg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clayg/32/181131_2.png) [@clayg](https://meta.discourse.org/u/clayg)
#### Post date: [30 בינואר,‏ 2022,‏ 11:28pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/216 "2022-01-30T23:28:03Z")

</div>

I was able to successfully set my “import\_id” for two different categories as an initial test import. It worked! My two mbox files imported into the existing categories I specified.

I have 18 different categories that I ultimately need to do this with. I don’t know anything about Ruby. Can I create a file that sets the directory name for each of my different categories so that I don’t have to manually enter each line in the Ruby command line interface?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [31 בינואר,‏ 2022,‏ 12:05am UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/217 "2022-01-31T00:05:17Z")

</div>

Yes. Search Google for “ruby for each”. And create an array with some of the categories.

---

<div class="post-metadata">

### Author: ![gerhard](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/gerhard/32/119479_2.png) [@gerhard](https://meta.discourse.org/u/gerhard)
#### Post date: [31 בינואר,‏ 2022,‏ 3:14pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/218 "2022-01-31T15:14:29Z")

</div>

> [@clayg](#):
>
> Yay! But if I want to import more mbox files, do I have to run all of the commands mentioned in FAQ 2.2, which indicates it will “delete everything”?

No, you don’t. The importer supports incremental imports. It will only import new data on the next run. Please don’t run the commands mentioned in 2.2 unless you want to start from scratch.

> [@clayg](#):
>
> I have 18 different categories that I ultimately need to do this with. I don’t know anything about Ruby. Can I create a file that sets the directory name for each of my different categories so that I don’t have to manually enter each line in the Ruby command line interface?

Unfortunately that’s currently not possible. You need to assign each category the `import_id` if you want to import into existing categories.

---

<div class="post-metadata">

### Author: ![clayg](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/clayg/32/181131_2.png) [@clayg](https://meta.discourse.org/u/clayg)
#### Post date: [1 בפברואר,‏ 2022,‏ 10:17pm UTC](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773/219 "2022-02-01T22:17:47Z")

</div>

Thank you @gerhard for all of your amazing work on this! I’m not a developer but I was able to complete a migration from a listserv system called Topicbox. I was able to get mbox files from Topicbox for import into Discourse. During my trial and error steps, I documented it all into a blog post. So if it’s okay? I wanted to paste a link to that blog post for any other Topicbox users that want to convert to Discourse.

> **[Converting from the Topicbox Group Email System to the Discourse Open Source...](https://lifeafter40.net/converting-from-the-topicbox-group-email-system-to-the-discourse-open-source-discussion-platform/)**
>
> This article provides supplemental information on how to successfully convert from the Topicbox listserv to the Discourse discussion platform.

[Previous page](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773.md?page=3)

[Next page](https://meta.discourse.org/t/migrate-a-mailing-list-to-discourse-mbox-listserv-google-groups-etc/79773.md?page=5)
