GnuPG and Enigmail Tips

A collection of tips related to GnuPG and Enigmail for Thunderbird. For GnuPG and related topics see also my GnuPG bookmarks.

Note this is all outdated and Enigmail was replaced with a Thunderbird internal implementation. See the OpenPGP in Thunderbird - HOWTO and FAQ. The following description is kept for historic museum reasons only.

If you are not running Windows but Linux instead or have already installed GnuPG and Enigmail and want to configure it, skip all the download and install section and proceed directly with Configure Enigmail.

Deutsche Version weiter unten / German version further down.

Installing GnuPG and Enigmail on Windows with Thunderbird

An attempt to explain GnuPG and Enigmail installation to a Windows user who already uses Thunderbird. Note that I do not run Windows and can't verify, this is just how it should work as far as I understood and it seems it did for those who followed these instructions.

First obtain GnuPG. One possibility for Windows would be the packet Gpg4win but that installs many things that are not needed (for example a mail client Claws Mail) if you only want to use Enigmail with Thunderbird. The other possibility is reachable via the GnuPG download page where a link to the list of FTP mirrors can be found of which you choose a nearby mirror server and then there in the binary directory download the most current gnupg-w32cli-1.4.*.exe

If this is all mumbo-jumbo to you here is a direct link to the original binary directory on gnupg.org to pick the file.

Download and store the file in your local download directory, do not directly exceute it if Windows asks for it.

To verify that the transfer completed correctly and you got the original version and it wasn't exchanged during transport, e.g. by a manipulated cache or so (yes, this is paranoid ;-) you should check the integrity after the download. If this is your first time GnuPG installation you can't use it to check itself. As Windows doesn't come with tools for this task, you can download a sha1sum executable from the GnuPG ftp site. In a command line window change to your download directory and enter the command (this for version 1.4.13, there may be a more recent version available now)

sha1sum gnupg-w32cli-1.4.13.exe

and compare the output with the SHA1 signature that is published by the GnuPG developers on the integrity check page, which for v1.4.13 was

852666756ae96dee667eccdd619689c18d662b4a  gnupg-w32cli-1.4.13.exe

Adapt the command and the ouput for a different version than v1.4.13 of course.

If the signature hash doesn't match the published one, be suspicious and do not use that binary. If in doubt ask someone who is familiar with these things and can check the downloaded binary's integrity for you.

If you don't know what a command line window is or how to get one or how to change to the directory where your downloaded files reside, either ask someone for help or try this:
click Start → All Programs → Accessories → Command Prompt
and, let's assume your download directory is C:\Documents and Settings\UserName\My Documents enter the following commands, including the " double quotes:

c:
cd "\Documents and Settings\UserName\My Documents"
sha1sum gnupg-w32cli-1.4.13.exe

If all is fine and the signature matches, get Enigmail. Note that if Firefox is your browser you'll have to right click the download URL on that page and choose Save Link As... from the context menu, otherwise Firefox would attempt to install the .xpi file as a Firefox Add-On extension package.

There are quite detailed instructions on the Enigmail web site for how to use GnuPG and Enigmail.

A short summary follows. If you want to use GnuPG with multiple Windows user accounts install the package using the Administrator account and after having added the installation directory to the PATH environment variable switch back to your user account to proceed.

  1. If needed, switch to the Administrator account.
  2. Run gnupg-w32cli-1.4.13.exe and accept the defaults of the installation wizard.
  3. Add the path to the gpg.exe executable file from the installation defaults to the Windows PATH environment variable.
    Help: Enigmail GnuPG Setup Guide, install.
  4. If needed, switch back to your user account.
  5. Similar to PATH, but instead of editing an already existing variable add a new environment variable GNUPGHOME to the User environment variables and let it point to a directory where GnuPG should manage the keyring data files for this user, e.g. C:\Documents and Settings\UserName\Applications\gnupg
  6. Check if the installation was successful.
    Help: Enigmail GnuPG Setup Guide, restore.
    Ignore the "restore keyrings" part, as this is your first installation.
  7. Install the downloaded Enigmail .xpi file in Thunderbird's Extension Manager from the Tools menu.
  8. Quit all Thunderbird instances and then restart it.

Configure Enigmail

  1. Configure Enigmail.
    Help: Enigmail Quickstart Guide and Enigmail Configuration Manual.
  2. Enable PGP/MIME instead of the old-fashioned inline-PGP method. In Thunderbird's Account Settings go to OpenPGP Security and enable Always use PGP/MIME.
    Help: Per Account Settings.
    You may receive complaints from users of Windows-Outlook-Express that your mails have an empty attachment if they are PGP/MIME signed. That's just because Outlook-Express is a bit dumb and doesn't know about the PGP/MIME standard. Point out to those worried users that they better should use a modern mail client, for example Thunderbird.
  3. To let Enigmail always sign all messages, activate also Sign non-encrypted messages per default in the same dialog, additionally to Sign encrypted messages by default.
  4. To encrypt messages to all recipients for whom you have a public encryption key, activate also Encrypt messages by default.
  5. To be prompted with a confirmation dialog before sending any messages, so that you can check the encryption/authentication status, activate under OpenPGP → Preferences → Sending the option Always confirm before sending.
    Help: Enigmail Configuration Manual, Sending.

For an overview of the steps of key pair generation see Enigmail GnuPG Setup Guide, Creating a key pair and its revocation certificate. However, use of command line as described there is not necessary, you can use the Enigmail OpenPGP Key Manager UI instead, but the remarks about key length and revocation certificate are valid nevertheless. Enigmail comes with a wizard that is run the first time you use the OpenPGP → KeyManager menu and guides you through this process. For the curious there are some sneak preview screenshots available. You should complete the wizard, as when having cancelled it it isn't offered anymore and a manual restart involves editing the prefs.js file, see further down. [Note: this may not be true anymore for newer versions and you could be able to start the wizard again from the OpenPGP menu.]

Many thanks to Zoë, without her suffering I wouldn't had created these instructions ;-)

GnuPG und Enigmail auf Windows mit Thunderbird installieren

Ein Versuch einem Windows Benutzer zu beschreiben, wie GnuPG und Enigmail zu installieren sind wenn Thunderbird schon benutzt wird. Ich benutze Windows nicht und kann das nicht überprüfen, aber so sollte es funktionieren wenn ich es richtig verstanden habe und funktionierte anscheinend auch für die die dieser Anleitung folgten.

Indem du Thunderbird benutzt hast du schon mal die erste Hürde genommen und kannst Enigmail verwenden. Outlook-Express-Benutzer haben es da schwieriger.

Zuerst GnuPG holen. Eine Möglichkeit für Windows wäre das Paket Gpg4win aber das installiert einiges was nicht gebraucht wird (unter anderem ein anderes Mailprogramm Claws Mail) wenn du nur Enigmail mit Thunderbird verwenden willst. Die andere Möglichkeit ist über die GnuPG Download Seite zu erreichen wo ein Link zu der Liste der FTP-Spiegelserver (Mirrors) führt aus der ein nahegelegener Spiegel-Server auszuwählen ist und dann dort aus dem binary Verzeichnis das aktuellste gnupg-w32cli-1.4.*.exe downzuloaden.

Für wen das alles böhmische Dörfer sind hier ein Direktlink zu dem originalen binary Verzeichnis auf gnupg.org um die Datei zu finden.

Download und speichere die Datei in deinem lokalen Download-Verzeichnis, führe sie nicht aus wenn Windows danach fragen sollte.

Um sicher zu stellen, dass es die originale Version ist und nicht auf dem Transportweg durch z.B. einen modifizierten cache manipuliert wurde (ja, das ist paranoid ;-) solltest du nach dem Download die Integrität überprüfen. Da Windows nichts dafuer bietet dazu das sha1sum Programm downloaden und dann im Kommandozeilenfenster in deinem Download-Verzeichnis das Kommando (dies für Version 1.4.13, inzwischen gibt es vielleicht eine neuere)

sha1sum gnupg-w32cli-1.4.13.exe

eingeben und die Ausgabe mit der von den GnuPG Entwicklern veröffentlichten SHA1 Signatur vergleichen:

852666756ae96dee667eccdd619689c18d662b4a  gnupg-w32cli-1.4.13.exe

Für andere Versionen als 1.4.13 natürlich Kommandozeile und Ausgabe anpassen.

Wenn die Signatur nicht mit der veröffentlichten übereinstimmt, werde misstrauisch und installiere die Datei nicht. Im Zweifel frage jemanden, der mit der Materie vertraut ist, und die Integrität des Downloads überprüfen kann.

Wenn du nicht weisst, was ein Kommandozeilenfenster ist oder wie du eins bekommst oder wie du zu dem Verzeichnis wechseln sollst, in dem die ge-download-eten Dateien liegen, bitte entweder jemanden um Hilfe oder versuche dies:
klicke Start → Alle Programme → Zubehör → Kommandozeile
und, angenommen dein Download-Verzeichnis sei C:\Dokumente und Einstellungen\BenutzerName\Eigene Dateien gib das folgende inklusive der " doppelten Anführungsstriche ein:

c:
cd "\Dokumente und Einstellungen\BenutzerName\Eigene Dateien"
sha1sum gnupg-w32cli-1.4.13.exe

Wenn die Überprüfung der Signatur positive verlaufen ist besorge Enigmail. Beachte, dass wenn dein Browser Firefox ist, du den dort angegebenen Download-URL mit der rechten Maustaste anklicken und dann aus dem Kontextmenue Save Link As... zum Speichern wählen musst, anderenfalls würde Firefox versuchen, die .xpi Datei als Firefox Add-On Erweiterung zu installieren.

Es gibt eine sehr ausführliche Anleitung in Englisch, wie GnuPG und Enigmail zu installieren und zu benutzen sind. Eine deutsche Seite zur Benutzung von Enigmail gibt es auch.

Kurz abgerissen der Vorgang. Wenn du GnuPG mit mehreren Windows-Benutzern benutzen willst, installiere es mit dem Admin-Benutzer und nachdem du das Installationsverzeichnis zu der PATH Umgebungsvariable hinzugefügt hast fahre mit deinem Benutzer-Konto fort.

  1. Wenn erforderlich, als Administrator anmelden.
  2. gnupg-w32cli-1.4.13.exe zur Installation ausführen, die Voreinstellungen übernehmen.
  3. Den Pfad zur ausführbaren Datei gpg.exe aus den Voreinstellungen zur PATH Umgebungsvariable hinzufügen.
    Hilfe: Enigmail GnuPG Setup Guide, install.
    Anmerkung: In einem deutschen Windows ist der dort angegebene Programmpfad ggbf. von C:\Program Files\GNU\GnuPG nach C:\Programme\GNU\GnuPG abzuändern.
  4. Wenn erforderlich, wieder mit deinem Benutzer anmelden.
  5. Ähnlich wie bei PATH, nur anstatt eine bereits existierende Variable zu editieren eine neue Umgebungsvariable GNUPGHOME den Benutzervariablen hinzufügen und diese auf ein Verzeichnis zeigen lassen, in dem für diesen Benutzer die keyring Dateien verwaltet werden sollen, z.B. C:\Dokumente und Einstellungen\BenutzerName\Anwendungsdaten\gnupg
  6. Prüfen, ob die Installation erfolgreich war.
    Hilfe: Enigmail GnuPG Setup Guide, restore.
    Den restore keyrings Teil ignorieren, da dies deine erste Installation ist.
  7. Enigmail installieren, dazu die heruntergeladene .xpi Datei in Thunderbird's Extension Manager aus dem Tools Menü installieren.
  8. Thunderbird beenden und neu starten.

Enigmail einrichten

  1. Enigmail einrichten.
    Hilfe: Enigmail Quickstart Guide und Enigmail Configuration Manual.
  2. Aktiviere PGP/MIME anstatt der alten inline-PGP Methode. In den Thunderbird Account Settings gehe zu OpenPGP Security und aktiviere Always use PGP/MIME.
    Hilfe: Per Account Settings.
    Vielleicht bekommst du von Windows-Outlook-Express-Benutzern Beschwerden, dass deine Mails leere Anhänge hätten, wenn sie PGP/MIME signiert sind. Das ist nur, weil Outlook-Express etwas dumpf ist und den PGP/MIME Standard nicht kennt. Weise diese geplagten Benutzer darauf hin, dass sie besser ein modernes Mail-Programm benutzen sollten, zum Beispiel Thunderbird.
  3. Um Enigmail immer eine Signatur erstellen zu lassen, aktiviere Sign non-encrypted messages per default im gleichen Dialog, zusätzlich zu Sign encrypted messages by default.
  4. Um automatisch an alle Empfänger zu verschlüsseln, für die du einen öffentlichen Schlüssel hast, aktiviere dort auch Encrypt messages by default.
  5. Für eine Überprüfung der jeweiligen Einstellungen beim Versenden einer mail aktiviere unter OpenPGP → Preferences → Sending die Option Always confirm before sending.
    Hilfe: Enigmail Configuration Manual, Sending.

Zur Schlüsselpaar-Generierung gibt es Hilfe in Enigmail GnuPG Setup Guide, Creating a key pair and its revocation certificate. Die dort beschriebene Benutzung der Kommandozeile ist nicht nötig, das ganze kann auch innerhalb des Enigmail OpenPGP Key Manager UI gemacht werden, aber die Bemerkungen über Schlüssellänge und revocation certificate etc. gelten genauso. Enigmail kommt mit einem Assistenten, der bei der ersten Benutzung des OpenPGP → KeyManager Menüs gestartet wird, und dich durch den Vorgang führt. Für Neugierige gibt es eine Vorschau von screenshots. Du solltest diesen Assistenten ganz durchlaufen, nach einem Abbruch wird er nicht mehr angeboten und ein manueller Neustart erfordert die pref.js Datei zu editieren, siehe weiter unten. [Anmerkung: das mag für neuere Versionen nicht mehr gelten und der Assistent könnte über das OpenPGP Menü neu gestartet werden.]

Dank geht an Zoë, ohne ihren Leidensweg hätte ich diese Anleitung nicht erstellt ;-)

How to manually rerun the Enigmail wizard when you closed it using the Cancel button

Snippet taken from a forum posting on mozilla-enigmail.org:

the line

user_pref("extensions.enigmail.configuredVersion", "0.95.3");

in prefs.js is responsible for preventing further runs of the wizard. When that line is removed (with TB closed), the wizard is offered again via the "Key Management" option.

Warning: backup your prefs.js before tinkering with it ..


Home