Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I got Mutt working with the default IMAP password management configuration with this line in my config:

set imap_pass = XXXX

Which is obviously not secure. I looked at this and

For guidance on how to encrypt the data. Neither solution worked for me though. The Arch linux one seems ideal because I would rather not use a wrapper everytime I start Mutt.

I did gpg --gen-key and set name to John Doe, email to and comment to XXX.

I created a file with this data

set EMAIL_PASS = random30digitpassword

I tried encrypting my file with

gpg -e -r "John Doe" ./password

Now if I want to decrypt it should just work without a prompt because I am the one with the keystore but alas if I execute this following command it still prompts for a password

gpg2 -dq password.gpg

Not only did that not work but with this as my Mutt config:

source "gpg2 -dq /home/John/password.gpg | "

set folder      = imaps://
set imap_user   =
set imap_pass   = $EMAIL_PASS
set spoolfile   = +INBOX

It complains that that path does not exist (and no password prompt comes up)

So I am pretty much stumped because it isn't working from two angles. Any ideas?

share|improve this question

migrated from Jul 27 '12 at 0:33

This question came from our site for professional and enthusiast programmers.

Wrong board. Try super user – David Jul 26 '12 at 23:50
Sorry about that. Wasnt aware of the super user board. – user604653 Jul 27 '12 at 4:24

According to the mutt manual, user-defined variables should always have the my_ prefix. So, rename EMAIL_PASS with my_email_pass both in the encrypted file and in .muttrc.

Also, what happens when you type gpg -dq /home/John/password.gpg from the command line? Does it decrypt the password file?

share|improve this answer

I know this is late, but someone else may have this problem too. Try removing the space from between the quote and the pipe. It worked for me.

"gpg2 -dq /home/John/password.gpg |"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.