Enigmail Source Code

Unlike most Mozilla AddOns, 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 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 CVS web interface.
To get the entire source code, you can check it out from CVS or download the tarball.

Downloading Enigmail source tarballs

Email ClientEnigmail ModuleIPC Library
Mozilla Thunderbird 3.0 enigmail-1.0.1.tar.gz
Signature File
Mozilla Thunderbird 2.0 enigmail-0.96.0.tar.gz
Signature File
Mozilla Thunderbird 1.5 enigmail-0.94.4.tar.gz
Signature File
Mozilla Thunderbird 1.0 enigmail-0.93.0.tar.gz
Signature File
ipc-1.1.3.tar.gz
Signature File
Seamonkey 2.0.x enigmail-1.0.1.tar.gz
Signature File
Seamonkey 1.1.x enigmail-0.96.0.tar.gz
Signature File
Seamonkey 1.0.x enigmail-0.94.4.tar.gz
Signature File
Mozilla 1.7.x enigmail-0.93.0.tar.gz
Signature File
ipc-1.1.3.tar.gz
Signature File
Mozilla 1.6 enigmail-0.83.6.tar.gz
Signature File
ipc-1.0.5.tar.gz
Signature File
Mozilla 1.5 enigmail-0.82.6.tar.gz
Signature File
ipc-1.0.4.tar.gz
Signature File
Mozilla 1.4.x enigmail-0.76.8.tar.gz
Signature File
ipc-1.0.3.tar.gz
Signature File
Mozilla 1.3 enigmail-0.74.3.tar.gz ipc-1.0.2.tar.gz
Mozilla 1.2.1 enigmail-0.71.0.tar.gz ipc-1.0.1.tar.gz
Mozilla 1.1 enigmail-0.65.2.tar.gz ipc-1.0.0.1.tar.gz
Mozilla 1.0.x enigmail-0.75.1.tar.gz ipc-1.0.2.tar.gz
Netscape 7.2 1
(Mozilla 1.7.2)
enigmail-0.93.0.tar.gz
Signature File
ipc-1.1.3.tar.gz
Signature File
Netscape 7.1 1
(Mozilla 1.4)
enigmail-0.76.8.tar.gz
Signature File
ipc-1.0.3.tar.gz
Signature File
Netscape 7.0 1
(Mozilla 1.0.1)
enigmail-0.75.1.tar.gz ipc-1.0.2.tar.gz
 Notes:  1 Netscape source code is not publicly available against which to build Enigmail and the IPC library.
Please use the corresponding version of Mozilla indicated beneath the Netscape version.

Checking out the Enigmail source code via CVS

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 CVS with the following commands (password for the CVS login command is guest).

cvs -d :pserver:guest@mozdev.org:/cvs login
cvs -d :pserver:guest@mozdev.org:/cvs co enigmail/src

Alternatively you can check out release versions; the commands for this are (example for v1.0.1):

  1. cvs -d :pserver:guest@mozdev.org:/cvs co -r enigmail-1-0-branch enigmail/src
  2. cd enigmail/src
  3. cvs update -r enigmail-1-0-0

The above commands will create subdirectories within the current directory.

If you compile Enigmail up to version 0.93.2, you also need the IPC library; use the version compatible to your Mozilla or Thunderbird release as noted in the table above.

Compiling Thunderbird or Seamonkey

In order to compile Enigmail, you first need to compile a part of 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:

    . $topsrcdir/mail/config/mozconfig
    ac_add_options --disable-tests
    ac_add_options --disable-debug
    ac_add_options --enable-crypto
    ac_add_options --enable-optimize
    ac_add_options --enable-static-mail
    ac_add_options --enable-application=mail
    mk_add_options MOZ_CO_PROJECT=mail
  4. Compile the required parts of Thunderbird by typing:

    make -f client.mk configure
    cd <your OBJDIR>
    make -C mozilla tier_base
    make -C mozilla tier_nspr
    make -C mozilla tier_js
    make export
    make -C mozilla/xpcom/MoreFiles # For Mac OS X only
    make -C mozilla/modules/libreg
    make -C mozilla/xpcom/string
    make -C mozilla/xpcom
    The following commands are only required for Thunderbird 3.0.x/SeaMonkey 2.0.x and older:
    make -C mozilla/xpcom/obsolete
  5. Alternatively (instead of the steps above) you can compile all of Thunderbird by typing:

    make -f client.mk configure
    cd <your OBJDIR>
    make -f client.mk all

Compiling Enigmail

  1. After compiling Mozilla Thunderbird or Seamonkey (or their export modules), obtain the source code for the Enigmail module as described earlier.

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

    • If you used CVS checkout, rename/move the enigmail/src 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/src <dir>/mozilla/mailnews/extensions/enigmail
  2. Compile the Enigmail module:

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

    If you use OBJDIR, you have to run make from within OBJDIR/mailnews/extensions/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 that . If you want to specify OBJDIR manually, use "makemake -o /path/to/objdir"

Packaging Enigmail XPI's

To allow others to use your compiled version of Enigmail, you need to create the XPI file(s) containing the Enigmail binaries. 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 Mozilla that you follow these rules, or Enigmail will not work properly:

  • Always set --enable-crypto: you must enable crypto support explicitly.