# Enigmail 2 build/install instructions

These instructions will eventually cover various Linux distributions, and currently work on OpenSUSE 42.2. Debian 9 is in the works.

Update ~/.hgrc of your build user, to include the necessary fingerprints for checking out code. Account configuration is not needed for just checking out. See: /DevOps/Admin Commons

Install the cacert certificates in your system, to check out code from cacert.pep.foundation:

Debian/Ubuntu:

apt install -y ca-cacert

openSUSE:

zypper install ca-certificates-cacert

If you create a separate user account for compilation (to not mess up anything in your current account) the following command is suggested:

Debian/Ubuntu:

adduser --gecos "Build" build

openSUSE:

???

All code repositories will be checked out to ~/code in these instructions.

## Build Enigmail

Debian:

apt install -y perl zip
mkdir /usr/lib/enigmail
chmod 777 /usr/lib/enigmail # Only do this on dev machines, not a good idea for production!
chmod 777 /usr/lib/thunderbird/extensions # Only do this on dev machines, not a good idea for production!

Ubuntu:

apt install -y perl zip

Instructions on how to install Enigmail system-wide are not included. The directories are not the same as on Debian.

OpenSUSE:

zypper install -y perl zip
mkdir /usr/lib/enigmail
chmod 777 /usr/lib/enigmail # Only do this on dev machines, not a good idea for production!
chmod 777 /usr/lib64/thunderbird/extensions # Only do this on dev machines, not a good idea for production!
mkdir ~/code/enigmail
git clone https://git.code.sf.net/p/enigmail/source ~/code/enigmail
cd ~/code/enigmail
./configure
make

For a system-wide installation (Debian/OpenSUSE only):

unzip build/enigmail-2.0.xpi -d /usr/lib/enigmail/

Debian:

ln -s '../../enigmail' '/usr/lib/thunderbird/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}'

OpenSUSE:

ln -s '../../../lib/enigmail' '/usr/lib64/thunderbird/extensions/{847b3a00-7ab1-11d4-8f02-006008948af5}'

# Testing Enigmail on Linux

Important: Ensure that the pep-json-server binary is found by Enigmail (by symlinking it from ~/bin, for example). Currently, Enigmail will call the pEp installer stub when the binary is not found. This is the case even when the adapter was started manually, instead of letting Enigmail do it.

For a clean test setup, the following procedure is suggested:

• Without having Enigmail installed, create a basic thunderbird profile, that is: start thunderbird, and configure an email account.
• Install the Enigmail addon, and close Thunderbird (but do not restart it).
• Back up the thunderbird profile, to be able to restore it for future test runs easily: cd ~/.thunderbird; cp -r *.default default.bak.
• When restoring the profile, you can pick an arbitrary name, but then need to adjust the default profile name in the ini file in ~/.thunderbird.
• Reset the state of GPG: rm -r ~/.gnupg (Don’t do this for a user account that has useful things in your GPG state!).
• Reset the state of pEp with rm -r ~/.pEp_management.db.
• For GPG > 2.0 tests, the agent also has to be restarted. Darthmama suggest rebooting the machine, as gpg-agent is hard to kill properly.

Now, install enigmail and perform your tests.