Skip to content

Getting started for developers

GFoniX edited this page Jan 7, 2023 · 6 revisions

Technical Documentation

This is a rough guide for getting Mailpile running on odd operating systems or system configurations, intended for a technical audience. Generally speaking, if you are using some other operating system than those explicitly supported, you are on your own, but the following general guidelines may be of use.

Mailpile doesn't employ any magic. Everything it does is mostly compliant with the laws of physics and the relevant RFCs. In particular, no violations of the second law of thermodynamics have been detected during Mailpile's operation. Developers are nonetheless urged to exercise caution.

Download installer

Requirements

You will also need a tool which can download your e-mail and store in one of the following formats:

  • Unix mbox
  • Unix Maildir
  • Windows Maildir
  • Mac Mail.app format
  • GMVault

Using PIP Install

If you're the kind of Python dev who prefers to stay in the Python universe, the PIP tool can be used to install the required packages:

$ pip install -r requirements.txt

Note that this requires having a functioning C development environment and sometimes lxml can be a bit tricky to install. For Debian-based distributions, the required development libraries can be installed like so:

$ sudo apt-get install libxml2-dev libxslt1-dev

as per this Stack Overflow answer.

Developing using virtualenv

The Makefile includes a recipe for setting up a virtualenv for use with Mailpile:

$ make virtualenv
$ source mp-virtualenv/bin/activate
$ mailpile

This allows easy, sandboxed usage.

Developing using docker

To start a docker container for local development, run:

$ ./scripts/docker-dev/up

You can access the mailpile cli for a running docker container via:

$ ./scripts/docker-dev/shell

Stop the container again with:

$ ./scripts/docker-dev/down

Config and mail data is persisted on the docker host.

Installing on Raspberry Pi

Users have reported running into a problem when running make when building the Alpha on Raspberry Pi. Once you get to installing therubyracer it might fail due to a problem with libv8. Run the following:

$ gem install libv8 -- --with-system-v8
Clone this wiki locally