Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

https://wiki.archlinux.org/index.php/Mutt#Passwords_management and http://www.mail-archive.com/[email protected]/msg36375.html

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 [email protected] 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://lavabit.com/
set imap_user   = [email protected]
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
    
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
add comment

migrated from stackoverflow.com Jul 27 '12 at 0:33

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

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

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.