Re: Trouble with decryption of certain emails using GPG + Mutt application/pgp-encrypted is unsupported

2015-02-16 Thread jonas

A small update on the matter. John was kind enough the send me a
encrypted test email from the iphone app and it worked
perfectly. I could verify signatures and and decrypt it properly from
within mutt automatically without any trouble. 

With this in mind I just realized that my friend for weird and unknown
reasons uses hotmail. Could that have something to do with it?

/jonas


signature.asc
Description: Digital signature


Trouble with decryption of certain emails using GPG + Mutt application/pgp-encrypted is unsupported

2015-02-14 Thread jonas
Hello! I'm having some trouble decrypting emails from a friend who is
using some kind of Iphone app for PGP.

When I get a encrypted email from this person it usually looks like this:

Date: Tue, 3 Feb 2015 13:06:17 +0100
From: frend friend@...
To: me
Subject: something

[-- Attachment #1 --]
[-- Type: text/plain, Encoding: 7bit, Size: 0.1K --]

[-- Attachment #2: encrypted.asc --]
[-- Type: application/pgp-encrypted, Encoding: 7bit, Size: 2.5K --]

[-- application/pgp-encrypted is unsupported (use 'v' to view this part)
--]

[-- Attachment #3 --]
[-- Type: text/plain, Encoding: 7bit, Size: 0.1K --]


Where,

[-- Attachment #1 --] always is a empty plain textfile.
[-- Attachment #2: encrypted.asc --] is the encrypted message
[-- Attachment #3 --] is either empty or contains non-cryptographic
signature plaintext. i.e kindly regards /friend

I want mutt to automagically recognize encrypted.asc and do its normal
buisniess. I have no problems with signatures, inline encrypted emails
or emails with empty bodies with just one attached encrypted.asc but when
I get emails formated this way it doesn't work for some reason.

I can save encrypted.asc and decrypt it manually from commandline so
there seems to be nothing wrong with the encryption.

I would really appreciate if someone could help me out and make this
work.

Here is my config related to gpg:

In mutt.rc:

source ~/.gpg.rc

set pgp_use_gpg_agent = yes

set pgp_sign_as = ...
set pgp_timeout = 3600
set crypt_autosign = yes
set crypt_replyencrypt = yes

set pgp_decode_command=gpg %?p?--passphrase-fd 0? --no-verbose --batch
--output - %f
set pgp_verify_command=gpg --no-verbose --batch --output - --verify %s
%f
set pgp_decrypt_command=gpg --passphrase-fd 0 --no-verbose --batch
--output - %f
set pgp_sign_command=gpg --no-verbose --batch --output -
--passphrase-fd 0 --armor --detach-sign \
--textmode %?a?-u %a? %f
set pgp_clearsign_command=gpg --no-verbose --batch --output -
--passphrase-fd 0 --armor \
--textmode --clearsign %?a?-u %a? %f
set pgp_encrypt_only_command=/usr/lib/mutt/pgpewrap gpg --batch --quiet
--no-verbose --output - --encrypt \
--textmode --armor --always-trust --encrypt-to ... -- -r %r -- %f
set pgp_encrypt_sign_command=/usr/lib/mutt/pgpewrap gpg --passphrase-fd
0 --batch --quiet --no-verbose \
--textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust
--encrypt-to ky -- -r %r -- %f
set pgp_import_command=gpg --no-verbose --import -v %f
set pgp_export_command=gpg --no-verbose --export --armor %r
set pgp_verify_key_command=gpg --no-verbose --batch --fingerprint
--check-sigs %r
set pgp_list_pubring_command=gpg --no-verbose --batch --with-colons
--list-keys %r
set pgp_list_secring_command=gpg --no-verbose --batch --with-colons
--list-secret-keys %r

set pgp_good_sign=^gpg: Good signature from


And my .gpg.rc

# GnuPG configuration
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=/usr/lib/mutt/pgpewrap gpg --batch --quiet
--no-verbose --output - --encrypt --textmode --armor --always-trust --
-r %r -- %f
set pgp_encrypt_sign_command=/usr/lib/mutt/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


My version of mutt is 1.5.23  and gpg is 1.4.18

Thanks and sorry for a lenghty post.

/Jonas



signature.asc
Description: Digital signature