I use Mutt for email, and I store contacts in ~/.mutt/alias
.
I want to store my alias
file in a publicly-visible Git repository, but I don't want anyone else to view my contacts.
I can encrypt and decrypt my alias
file with GPG. How can I make Mutt decrypt and open my alias
file on startup?
Answer
I added the following line to my ~/.mutt/muttrc
:
source "gpg --decrypt --quiet ~/.mutt/alias.gpg |"
The pipe character at the end of that string tells Mutt to pipe the result of the command back into Mutt.
The --quiet
flag tells GPG to only return the contents of the alias.gpg
file, and not also the gpg: encrypted with 2048-bit RSA key… message that it normally starts with.
No comments:
Post a Comment