GithubHelp home page GithubHelp logo

pcl-ml-migration's Introduction

Mailman to Google Groups

A group of useful tools to aid in the migration of PCL's Mailman 2 mailing list to Google Groups (G Suite).

Table of Contents

  1. Organizing your Data
  2. export_config - a tool to export a portable mailman's list config.pck
  3. create_dev_list - creates a reduced member list from an already existing one

Organizing your Data

There are two main files which contain all relevant data about a mailing list:

  • config.pck, the lists configuration file. It contains information the list's settings, users and user preferences.
  • <list_name>.mbox the email archive file. It contains all emails sent to the mailing list.

Designating mailman's installation prefix as <prefix>, both files can be found at <prefix>/lists/<list_name>/config.pck and <prefix>/archives/private/<list_name>.mbox/<list_name>.mbox, respectively.

Most of the tools in this repository will expect you to have pulled copied/exported these files out of the server, and place them somewhere in your computer organized as:

$ tree pcl-users/
pcl-users/
├── archive.mbox
└── config.pck

The directory provides implicitly the list's name and both the mails' archive and list configuration file have been renamed to archive.mbox and config.pck, respectively.

Important: In order to export a portable config.pck you are likely to have to export it using export_config.

Go back up.

export_config

This tools allows you to export a mailman's list config.pck file. It strips the original configuration file of all password related information and converts all custom classes to simple dictionaries, to ensure the file can be parsed on any standard Python installation.

It assumes a typical mailman installation at /var/lib/mailman. It might happen that the Mailman python module is not visible for the installation. If that's the case, just export the path

$ export PYTHONPATH="/var/lib/mailman:$PYTHONPATH"

Here's an usage description of the tool.

$ ./export_config.py --help
usage: export_config.py [-h] list

positional arguments:
  list        The name of the list.

optional arguments:
  -h, --help  show this help message and exit

Just supply the name of the list you wish to export the config, e.g.

$ ./export_config.py pcl-developers

will export a config-pcl-developers.pck in the current working directory.

Go back up.

create_dev_list

This tool allows you to create a reduced member list from an existing one. It will look for the specified users in the old list and will populate the new list with the users it manages to find. The mailbox archive will be simply symlinked. The tool assumes you have your data organized as described in the Organizing your Data section. To use it, you need to supply a YAML configuration file like the one bellow.

name: pcl-admins
prefix: /tmp/data

original: /tmp/pcl-developers

users:
  - email: [email protected]
    owner: true
  - email: [email protected]
  - email: [email protected]

A brief explanation of the keys is provided:

  • name: the name for the new list.
  • prefix (optional): the folder prefix to create the files.
  • original: the path to the original list files
  • users: the list of users to be migrated
    • email: the user's email
    • owner(optional): a key which specified if the user should be upgraded to owner of the new list.

Go back up.

pcl-ml-migration's People

Contributors

sergioragostinho avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.