Enigmail Source Code

The Enigmail Source code is now held in a GIT repository.

Unlike most Mozilla Add-Ons, Enigmail contains platform dependent parts: it depends on the CPU, the compiler, libraries of the operating system and the email application it shall integrate into.

Each current official release contains binaries for Windows (x86, 32-bit), Linux (x86, 32-bit) and a contributed Mac OS X universal binariy as well as localisations provided by many translators.

If there is no contributed build available for your platform on the download page, you may build your own Enigmail package. Compiling Mozilla Thunderbird or Seamonkey and Enigmail is a non-trivial task and requires a good understanding of your operating system as well as software development methods and building practices. The instructions offered here are to assist you in the building of Enigmail, not specifically Seamonkey and Mozilla Thunderbird. We cannot be held responsible for any failures or issues arising out of your use of this source code or the following of these instructions.

If you compiled a release package, please contribute it to the community. To do so, please create a detached ascii signature (gpg -ab <file.xpi>) and send both files to Olav. You may of course also send a link to them on a publicly accessible web location to keep email traffic low. He will upload the files and add a link to them.

Access to Enigmail source code

You can browse the Enigmail source using the GIT web interface.
To get the entire source code, you can check it out from GIT or download the tarball.

Downloading Enigmail source tarballs

Email ClientEnigmail Source CodeSignature File
Mozilla Thunderbird 17.0 & newer / SeaMonkey 2.14 & newer enigmail-1.5.1.tar.gz Signature File
Mozilla Thunderbird 16.0 / SeaMonkey 2.13 enigmail-1.4.6.tar.gz Signature File
Mozilla Thunderbird 14.0 & 15.0 / SeaMonkey 2.11 & 2.12 enigmail-1.4.4.tar.gz Signature File
Mozilla Thunderbird 13.0 / SeaMonkey 2.10 enigmail-1.4.3.tar.gz Signature File
Mozilla Thunderbird 12.0 / SeaMonkey 2.9 enigmail-1.4.2.tar.gz Signature File
Mozilla Thunderbird 11.0 / SeaMonkey 2.8 enigmail-1.4.1.tar.gz Signature File
Mozilla Thunderbird 10.0 / SeaMonkey 2.7 enigmail-1.4.tar.gz Signature File
Mozilla Thunderbird 9.0 / SeaMonkey 2.6 enigmail-1.3.5.tar.gz Signature File
Mozilla Thunderbird 8.0 / SeaMonkey 2.5 enigmail-1.3.4.tar.gz Signature File
Mozilla Thunderbird 7.0 / SeaMonkey 2.4 enigmail-1.3.4.tar.gz Signature File
Mozilla Thunderbird 6.0 / SeaMonkey 2.3 enigmail-1.3.2.tar.gz Signature File
Mozilla Thunderbird 5.0 / SeaMonkey 2.2 enigmail-1.2.1.tar.gz Signature File
Mozilla Thunderbird 3.1 enigmail-1.1.2.tar.gz Signature File

The source code for older versions is available in the archive directory.

Checking out the Enigmail source code via GIT

The latest version of Enigmail is referred to as the Enigmail trunk version. This version works with the latest version of Thunderbird and Seamonkey. You can check out the Enigmail trunk version using GIT with the following command:

git clone git://git.code.sf.net/p/enigmail/source enigmail

Alternatively, if you are only interested in a particular branch or release, you can check out individual branches. The example below is for the source code of v1.4.3:

git clone --branch enigmail-1-4-3 git://git.code.sf.net/p/enigmail/source enigmail

The above command will download the source code to a new directory "enigmail".

Compiling Thunderbird or Seamonkey

In order to compile Enigmail, you first need to compile Thunderbird or Seamonkey on your platform. We recommend that you install the necessary components and set up your environment according to the Mozilla build instructions and then follow the steps below.

  1. Download the latest Thunderbird tarball and extract it to a convenient location.
    This will create a mozilla folder, which is the root of the build tree.

  2. Open a command prompt/shell and navigate to the parent of the mozilla folder
    (e.g. if your mozilla folders real path is C:/temp/mozilla, you need to be in C:/temp).

  3. Create a .mozconfig file in the mozilla folder.
    The minimum recommended options to be added to the .mozconfig file are:

    ac_add_options --disable-tests
    ac_add_options --disable-debug
    ac_add_options --enable-crypto
    ac_add_options --enable-optimize
    ac_add_options --enable-application=mail
    mk_add_options MOZ_CO_PROJECT=mail
  4. Since Thunderbird 5.0 it is required to create a full build of Thunderbird. Compile the required parts of Thunderbird by typing:

    make -f client.mk build
    

Compiling Enigmail

  1. After compiling Mozilla Thunderbird or Seamonkey, obtain the source code for the Enigmail module as described earlier.

    • If you downloaded the source tarballs, untar them in the mailnews/extensions directory in the pre-compiled Mozilla source tree to create the enigmail subdirectory.

    • If you used GIT checkout, rename/move the enigmail directory to the name mozilla/mailnews/extensions/enigmail in the pre-compiled Mozilla source tree.

      You can use the following commands on Unix (or equivalent on Windows) to do the above:

      mv enigmail <dir>/mozilla/mailnews/extensions/enigmail
  2. Compile the Enigmail module:

    cd mailnews/extensions/enigmail
    ./makemake -r
    cd OBJDIR/mailnews/extensions/enigmail
    make

    OBJDIR is mandatory since Thunderbird 5 for building Enigmail. Please read the information about using OBJDIR below.

  3. Run your version of Seamonkey or Mozilla Thunderbird and check if Enigmail works fine.

Using OBJDIR when building Enigmail

The makemake reads the .mozconfig file to get the OBJDIR parameter. However, @CONFIG-GUESS@ is not supported by makemake.

Alternatively OBJDIR can be specified with "makemake -o DIR".

Important: makemake has to be executed from mozilla/mailnews/extensions/enigmail, the build itself (i.e. make) has to executed from OBJDIR/mailnews/extensions/enigmail.

Please note if 'makemake' should use OBJDIR from the .mozconfig file then the toplevel directory must be called "mozilla". Otherwise, makemake needs to be called with makemake -o /full/path/to/OBJDIR. Furthermore, makemake cannot handle symbolic links to the toplevel directory.

Packaging the Enigmail XPI

To allow others to use your compiled version of Enigmail, you need to create the XPI file containing the Enigmail libraries. To build the Enigmail XPI run:

make xpi

from the same directory where you compiled Enigmail.

This will create enigmail-<version>-<platform>.xpi in the mozilla/dist/bin (or OBJDIR/dist/bin) folder.

Pitfalls

Make sure when building your own Thunderbird or SeaMonkey that you follow this rule, or Enigmail will not work properly:

  • Do not set --disable-crypto: crypto support is mandatory for Enigmail.
  • Do not set --enable-chrome-format to anything else than omni.