Skip to main content

Reading Encrypted Emails with aerc

·247 words·2 mins
Table of Contents
Aerc - This article is part of a series.
Part 1: This Article

Examples and paths refer to macOS. The aerc commands are identical on Linux; only installation (apt/dnf/pacman instead of brew) and config paths (~/.config/aerc/ instead of ~/Library/Preferences/aerc/) differ.

Requirements
#

  • aerc is installed (brew install aerc)
  • GnuPG is installed (brew install gnupg)
  • Your own private GPG key is set up (gpg --list-secret-keys)
  • aerc is configured and fetches your emails (account config: ~/Library/Preferences/aerc/accounts.conf)

Reading an Encrypted Email
#

  1. Start aerc:

    aerc

    aerc works similarly to vim: commands are introduced with :. For example, :new-account adds another account and :help shows the help.

  2. Navigate to the encrypted message (using j/k or the cursor keys). With multiple accounts configured, switch to the relevant account with :ct + TAB, navigate the mailbox folders with c or :cf + TAB.

  3. Open the email with ENTER. Encrypted messages show the marker [e] Encrypted To ....

  4. aerc decrypts automatically using gpg. If gpg-agent is active, it asks for your private key password.

  5. With everything set up correctly, the message is shown in plaintext.

Tips & Notes
#

  • If gpg-agent isn’t running:

    gpgconf --launch gpg-agent
  • Make sure ~/.config/aerc/aerc.conf contains:

    pgp-provider=gpg
  • Optional: graphical password prompt with pinentry-mac

    brew install pinentry-mac
    echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
    killall gpg-agent

aerc shows encrypted messages in plaintext automatically, as long as your key is available and the password has been entered correctly.

Acknowledgments
#

  • aerc - terminal-based email client
  • GnuPG - GNU Privacy Guard, free OpenPGP implementation
  • Homebrew - macOS package manager
  • pinentry-mac - graphical password entry for GPG on macOS

Found this helpful?
Consider supporting via:

Aerc - This article is part of a series.
Part 1: This Article