Skip to Main Content
Linux Security Cookbook
book

Linux Security Cookbook

by Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes
June 2003
Intermediate to advanced content levelIntermediate to advanced
336 pages
8h 54m
English
O'Reilly Media, Inc.
Content preview from Linux Security Cookbook

8.7. Encrypted Mail with elm

Problem

You want to send and receive encrypted email conveniently with the elm mailer.

Solution

While viewing an encrypted message, type:

| gpg --decrypt | less

to display the decrypted text page by page. To send an encrypted message, encrypt it in your text editor. [Recipe 8.1][Recipe 8.2]

Discussion

We take advantage of elm’s pipe feature, which sends the body of a mail message to another Linux command, in this case gpg . We further pipe it to a pager (we chose less) for convenient display. For encryption, we handle it in the text editor invoked by elm to compose messages. [Recipe 8.1][Recipe 8.2]

There are alternatives. A patched version of elm, known as ELMME+ , supports GnuPG directly. (The author, Michael Elkins, went on to create mutt, [Recipe 8.6] which also supports GnuPG.)

You might also try the pair of scripts morepgp (for decrypting and reading) and mailpgp (for encrypting and sending), available at http://www.math.fu-berlin.de/~guckes/elm/scripts/elm.pgp.scripts.html. These scripts are for PGP, but modification for GnuPG should not be difficult.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Linux Administration Cookbook

Linux Administration Cookbook

Adam K. Dean

Publisher Resources

ISBN: 0596003919Errata Page