PREV Prerequisites UP Introduction NEXT Command Overview

1.2: Installation

If Mailcrypt is not installed on your system, obtain the latest version from the Mailcrypt home page at `http://www.pobox.com/~lbudney/linux/software/mailcrypt.html' and follow the instructions in the file `INSTALL'.

Next, decide what version of PGP you are using. Versions 3.5 and higher of Mailcrypt support multiple versions of PGP. To choose a version, add the following lines to your `.emacs' file:

(load-library "mailcrypt") ; provides "mc-setversion"
(mc-setversion "2.6")    ; for PGP 2.6 (default); also "5.0" and "gpg"

Next, teach your Emacs how and when to load the Mailcrypt functions and install the Mailcrypt key bindings. Almost all Emacs major modes (including mail and news handling modes) have corresponding "hook" variables which hold functions to be run when the mode is entered. All you have to do is add the Mailcrypt installer functions to the appropriate hooks; then the installer functions will add the Mailcrypt key bindings when the respective mode is entered.

Specifically, begin by placing the following lines into your `.emacs' file (or the system-wide `default.el' file):

(autoload 'mc-install-write-mode "mailcrypt" nil t)
(autoload 'mc-install-read-mode "mailcrypt" nil t)
(add-hook 'mail-mode-hook 'mc-install-write-mode)

Then add additional lines for your own mail and news packages as described below.

  • Hooking into Rmail
  • Hooking into VM
  • Hooking into MH-E
  • Hooking into Gnus
  • PREV Prerequisites UP Introduction NEXT Command Overview