# מדריך: איך להעביר מ-mailman2 ל-discourse

**URL:** <https://meta.discourse.org/t/howto-migrate-from-mailman2-to-discourse/193608>\
**Category:** Product Support\
**Created:** [12 ביוני,‏ 2021,‏ 8:09am UTC](https://meta.discourse.org/t/howto-migrate-from-mailman2-to-discourse/193608 "2021-06-12T08:09:54Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![dachary](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dachary/32/119731_2.png) [@dachary](https://meta.discourse.org/u/dachary)\
**Post date:** [12 ביוני,‏ 2021,‏ 8:09am UTC](https://meta.discourse.org/t/howto-migrate-from-mailman2-to-discourse/193608/1 "2021-06-12T08:09:54Z")

</div>

Hello,

[mailman2discourse](https://lab.enough.community/discourse/mailman2discourse/) is a **command line tool to import a `mailman2` configuration (as found in the `config.pck` file) into a discourse category** [available on PyPI](https://pypi.org/project/mailman2discourse/). A user is created for each member of the mailing list and they are notified when a new message is posted to the category (unless their mailman2 option was to never receive any mail). The moderators of a private mailing list become members of a discourse group who [can review every new post](https://meta.discourse.org/t/category-group-review-moderation/116478). If the archives of the mailing list are not public, the discourse category is only visible to a discourse group mimicing the mailman2 membership list.

### Install

```plaintext
$ pipenv install mailman2discourse

```

### Usage

Requirements:

- API Key (from `/admin/api/keys/new`) with a `User Level` of `All Users`
- An admin user (for instance `admin`)
- An [mbox importer](https://meta.discourse.org/t/importing-mailing-lists-mbox-listserv-google-groups-emails/79773) container with
  - `DISCOURSE_MAX_ADMIN_API_REQS_PER_KEY_PER_MINUTE: 60000000`
  - `DISCOURSE_MAX_REQS_PER_IP_MODE: none`
  - Not including - “templates/web.ratelimited.template.yml”

- The `config.pck` file of the mailman2 mailing list

To import the `listname@example.com` mailman2 mailing list:

```plaintext
    $ mailman2discourse --url http://172.19.0.2 --api-key APIKEY --api-user admin \
                      --mailman-config config.pck \
                      --list listname --domain example.com

```

The import is idempotent, meaning it is safe to run it multiple times, for instance if it was interrupted or when the `config.pck` file is updated.  
The content of the archives can then be imported.

### Archive import

The mailing list archives can be imported using the [mbox  
importer](https://meta.discourse.org/t/importing-mailing-lists-mbox-listserv-google-groups-emails/79773). The `.mbox` and `.mbox.gz` must be placed in a directory that has the  
same name as the category created by `mailman2discourse`.

### Bug reports

The best place to report problems is [the issue tracker](https://lab.enough.community/discourse/mailman2discourse/-/issues) but posting on this topic is also fine.

---

_[View the full topic](https://meta.discourse.org/t/howto-migrate-from-mailman2-to-discourse/193608)._
