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.6. Encrypted Mail with mutt

Problem

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

Solution

mutt comes with configuration files pgp2.rc, pgp5.rc, and gpg.rc, ready to use with pgp2, pgp5, and gpg, respectively. Include one of these files inside your ~/.muttrc. (For GnuPG support, obviously include gpg.rc.)

Discussion

Compose a message normally. Notice the headers include a setting called PGP:

From: Daniel Barrett <dbarrett@oreilly.com>
To: Shawn Smith <smith@example.com>
Cc:
Bcc:
Subject: Test message
Reply-To:
Fcc:
PGP: Clear

By default, encryption is disabled (Clear). To change this, type p to display the PGP options, and choose to encrypt, sign, or both. When you send the message (press y), you’ll be presented with the available private keys for encrypting or signing. Select one and the message will be sent.

To decrypt a message you receive, simply view it. mutt will prompt for your GnuPG passphrase and display the decrypted message.

See Also

mutt(1), and Mutt’s supplied documentation in /usr/share/doc/mutt*, in particular the file PGP-Notes.txt. The home page for Mutt is http://www.mutt.org.

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