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 am using mutt to send email. When I come to send some, I get a message telling 'Enter your keyID', I select one of my gpg owner user's key (for which I generated a pair of key using gpg --gen-key). Then I am prompted to enter my password : I type it and I have amlways have the same message

gpg: « 0x12345678 » a été ignorée : secret key is not available
gpg: /var/folders/_h/gqsdf0mh1sdfsdf154p76kr0gn/T//mutt-MacBook-Pro-501-28262-08021219660: sign+encrypt failed

Can someone explain that ? I tried to google it but I didn't find

share|improve this question

2 Answers 2

The GPG options are accessed by pressing p (which stands for PGP, not GPG, since PGP is much older; in fact, all of the GPG support in mutt is still labeled PGP). This brings up a menu at the bottom of the screen:

(e)ncrypt, (s)ign, sign (a)s, (b)oth, select (m)ic algorithm, or (f)orget it? _ If you want to sign the message, just press s. If you want to encrypt it, press e. To both sign and encrypt, press b.

Sometimes when encrypting e-mail with GPG in mutt, you may see a *message like this:*

Enter keyID for smith@company.com: _

If you see this, it means that mutt doesn't have enough information to determine which key to use. Since mutt uses the e-mail recipient list (the To: and Cc: headers) to determine which encryption keys to use, you may need to add more information to the headers. If your To: header only contains an e-mail address and not a name, try adding the name and putting the e-mail address in after it, just like GPG shows user IDs.

((Source))

**Hope this helps!
*Also, may I suggest looking into Thunderbird? Its a great email application imo. Just adding a little suggestion!

share|improve this answer
    
HI Edi, thank you for your response. But I am sending an email to myself, I have a gpg key and a password assorted to it. When I run 'send' after having added my name and my email to the To: header, I am asked to enter a password, what I did. Then I always have the same message : sign+encrypt failed : secret key is not available. Any help would be greatly appreciated –  Newben Apr 6 '13 at 15:36
    
I was able to fix half of my problem, not signing but only crypting (not signing) the message. But now, when I send my message, I get an error message /Users/myhome/Mail/[Gmail]/Messages envoyés: No such file or directory (errno = 2). (Messages envoyés stands for Sent messages) I tried to create a '[Gmail]' folder and a 'Messages envoyés' subfolder but it still not working telling me that /Users/myhome/Mail/[Gmail]/Messages envoyés is not a mailbox.. Could you help please ? –  Newben Apr 6 '13 at 19:34

I was having similar problems. I fixed it by modifying my muttrc file.

The Mutt distribution comes with a sample gpg configuration in its contrib directory. It's called gpg.rc. I added it all without any changes, and now I can send and receive GPG-encrypted email messages in Mutt.

These are the specific lines I added, but I recommend looking at the file yourself, since there are also some lines that are commented out, along with explanatory comments, and also it might not be correct for your version of Mutt.

set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r"
set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r"
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
share|improve this answer

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.