Skip to Content
Linux Security Cookbook
book

Linux Security Cookbook

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

8.8. Encrypted Mail with MH

Problem

You want to send and receive encrypted email conveniently with the MH mail handler.

Solution

To view an encrypted message:

show | gpg --decrypt | less

To encrypt and send a message, use the encryption features of your text editor, such as emacs [Recipe 8.1] or vim [Recipe 8.2]. Care must be taken so that only the message body, not the header, gets encrypted.

Discussion

MH (or more likely found on Linux, nmh ) differs from most mailers in that each mail-handling command is invoked from the shell prompt and reads/writes standard input/output. Therefore, to decrypt a message normally displayed by the show command, pipe show through gpg, then optionally through a pager such as less.

See Also

Further instructions for integrating MH and GnuPG (and PGP) are at http://www.tac.nyc.ny.us/mail/mh and http://www.faqs.org/faqs/mail/mh-faq/part1/section-68.html.

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

Practical Linux Security Cookbook - Second Edition

Practical Linux Security Cookbook - Second Edition

Tajinder Kalsi
Mastering Linux Command Line

Mastering Linux Command Line

Coding Gears | Train Your Brain

Publisher Resources

ISBN: 0596003919Errata Page