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#
aercis installed (brew install aerc)GnuPGis 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#
Start aerc:
aercaerc works similarly to vim: commands are introduced with
:. For example,:new-accountadds another account and:helpshows the help.Navigate to the encrypted message (using
j/kor the cursor keys). With multiple accounts configured, switch to the relevant account with:ct+TAB, navigate the mailbox folders withcor:cf+TAB.Open the email with
ENTER. Encrypted messages show the marker[e] Encrypted To ....aerc decrypts automatically using
gpg. Ifgpg-agentis active, it asks for your private key password.With everything set up correctly, the message is shown in plaintext.
Tips & Notes#
If
gpg-agentisn’t running:gpgconf --launch gpg-agentMake sure
~/.config/aerc/aerc.confcontains:pgp-provider=gpgOptional: 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:
