Airmail / AirmailPlugIn-Framework

GNU General Public License v2.0
197 stars 47 forks source link

about inline GPG decrypt #9

Open kulisu opened 10 years ago

kulisu commented 10 years ago

Hi,

a mail send from ThunderBird with latest Enigmail and GPGTools on OSX cant decrypt by GPG Plugin beta5.

Mail.app can handle inline GPG and PGP/Mime.

http://www.phildev.net/pgp/pgp_clear_vs_mime.html

Return-Path: <receiver@myemail.com>
Received: from MY-MBPR.local (1-2-3-4.somewhere.local. [1.2.3.4])
        by mx.google.com with ESMTPSA id z5sm19996886pbt.89.2014.12.02.03.36.06
        for <receiver@myemail.com>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 02 Dec 2014 03:36:07 -0800 (PST)
Message-ID: <547DA425.8050000@myemail.com>
Date: Tue, 02 Dec 2014 19:36:05 +0800
From: Chris Lin <sender@myemail.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: receiver@myemail.com
Subject: test
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

-----BEGIN PGP MESSAGE-----
Charset: utf-8
Version: GnuPG/MacGPG2 v2.0

hQMOA4lQg62pixZEEAv/XTZqJfjHrxP8IoySUUeyeqxbFH90RkV9plD1sVHUmp4A
a7S9SmvIvH7asgtchw0huLM2dNSC5NBscbwDwaRz8RAYCiBWAOoSGQj6zpn8Cswo
WuELC75DFbZPnqN8MluP0RRspINRF/5ZbLLNMXFCngDMG8f0tDoWD31dkdwmU/fo
5kmq4VT/9mjb9u3RKUvuxqmryi3yG+ZWWxb17jkoEfiHnmO3/DquuwvvIj5VMUJQ
Gus8saY5CTrUV6f/9zuQAZ75viqAQS4XoS+VbM8Tj2d4VmhSo15Nmny2hdPE3z6V
qDfWOSR1QVl5UhZHt8lN2x3Sl4hhNwhw1GDXiBOrtQt0PATf0oqJtpkTc5apy0VA
eA4M/n9b+MJbjslTW/nvW6A0uAdL30IsGyHWsOeEyQWgks2vCz6w3nXQ7AO8T1Fg
5CGmRZ+8r/Ep0RLFAuniQkQs8UWcuVyvPsVUirBCL6H2AowLTY6VALIB7xfBh6Yx
tYZq9SQqt2SO4qwGi/Y8DAC2lT564zmk8+AhcDMFq85T3ZNsFeQH3fVqfHFQ0zy9
eYw4XBWZWVPmOzaQ9qgOvgZ6XesC5BKZmPQyGzfrkH6bvXAPWReDftgoYD1m0Ubq
v/dCBDkiTp/VQtvgt54kqiHoragHLFSpHn4ZjsgI+oAEyyFu9ElJp/JF8923EpRZ
j8+KgKJGt28NUaBXusAUjYq/SeSft6AEWE2cpqq9/1Zu7WsBF24mbNYGj2YhxRT8
sIHSJV85Z8v0hmSicyEzmsJboLULDQrbSj3ycfaSsi2XvC+ngt6TLUj1wUvbDVqE
g7QDU9HlL7QPdoUJR1m26aIjC53FCAQLdTlbsJSN43UB8KDAyBG7XnUbWL5T4avW
rDFDzBhLmw7IEJZluIICNWjKW50gDAQoBuHAmDLPWXr1/0rjYj+v1lXkpX1TV/cb
LXRe7EG3jTCD8ptMPUwZu2QT7frHm25KRRJqy0XdkfNzlCSyIcAATYBqXtGXcbnL
5rPtSm6NMUBZyXHs5QdJajTSqgGw83ismkVZ5Ir40cWGXubBNBIGDJu+T/cb1vbV
+Jez8xatzk1ZpzcyExvAfdT2oULDCn6bQgsIH3k72wjEnpfjJNjHDyroSGQLRfSc
UXdFaMSgNYyj+nR68cB09paz+UB0pPMpuEI3RzhKGg8lhb7+8YKDd6bCWGtDPZ1i
uFAiGb8Vw46gXzzVtvRrWxGzvoy9X93+g1vbzz8pqEkia/INZUZRFfOowX/X
=oT4N
-----END PGP MESSAGE-----

but it can decrypt successfully when sender set Enigmail - PGP/MIME will be used - Force PGP/MIME.

Return-Path: <receiver@myemail.com>
Received: from MY-MBPR.local (1-2-3-4.somewhere.local. [1.2.3.4])
        by mx.google.com with ESMTPSA id pk1sm20127288pdb.78.2014.12.02.03.39.26
        for <receiver@myemail.com>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 02 Dec 2014 03:39:27 -0800 (PST)
Message-ID: <547DA4ED.5020502@myemail.com>
Date: Tue, 02 Dec 2014 19:39:25 +0800
From: Chris Lin <sender@myemail.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.3.0
MIME-Version: 1.0
To: receiver@myemail.com
Subject: test
Content-Type: multipart/encrypted;
 protocol="application/pgp-encrypted";
 boundary="VXEvP7GJK49200JlGCEP7H6lXPB5SUqPe"

This is an OpenPGP/MIME encrypted message (RFC 4880 and 3156)
--VXEvP7GJK49200JlGCEP7H6lXPB5SUqPe
Content-Type: application/pgp-encrypted
Content-Description: PGP/MIME version identification

Version: 1

--VXEvP7GJK49200JlGCEP7H6lXPB5SUqPe
Content-Type: application/octet-stream; name="encrypted.asc"
Content-Description: OpenPGP encrypted message
Content-Disposition: inline; filename="encrypted.asc"

-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2.0

hQMOA4lQg62pixZEEAv+PlkX5M8UbW9odiASkWYS7h3fjPp0lo2VCbXPtvlOYzMm
H+Aiqr4YzhpGMVMZPW8wPJx6C4tQAb0jiO0BCJJissXyMqUPj0eQl0NQau7zikFZ
4D1ihajffBbdpjsrtMON/QH492FNDGIsrDua1FSelVeKYkHWbr+n2kidA3Bya4+K
OTQ5LBaP6EittoJ/uQnZbWFFnU/9fN2EgRTk0vM9AZ0H6V9nhH3+sINuPkf3JElJ
FVLTG9K7f8ae/eBAoM1cW0XuVuMkItwmMWNBvSox+14KaTUqdZHFwY7eVAbujyAu
gSXQet1HOi6pRvAjOvcO8garyfnHqqEx+8msBcwGZz/0m/a3ml7nhFQtZ9bbRPNA
gXm0NZEd68Gni03KCpC7nev3Mn+Uql2QtWHgPLf2q75Nx/GuKbybOXcQCRuJUtpa
t916fRKTQfz5Ai0K5KhdMmV/StCgOHUx2gY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B5SUqPe--

thanks for your support.

warm regards, Chris Lin

smarek commented 9 years ago

I've checked in source code, and in my opinion it is not possible to hook up on messages that are sent as "text/plain", as those are not passed to plugins.

I've tried to add some debug, and those emails are not passed to any AMPlugin interface method. Can you please confirm this behavior contributors? @Bloophub @KodaKoder @Omegaice

krzyzanowskim commented 9 years ago

@smarek try this build of ObjectivePGP Plugin https://dl.dropboxusercontent.com/u/224308/AMPObjectivePGP/AMPObjectivePGP-0.1.zip (this build is considered as experimental)

smarek commented 9 years ago

@krzyzanowskim if used along with "GPG BETA" no difference, i used as only plugin loaded it doesn't decrypt messages at all, doesn't provide with interface controls on new message editor (top encrypt/sign controls) and doesn't verify the signed e-mails (even though the "Not Verified" orange badge next to sender name is visible)

Btw. What source code is this compiled from? I can see the ObjectivePGP repository (https://github.com/krzyzanowskim/ObjectivePGP) but not the one with Airmail plugin sources. Would be better if you kept the development branch online so we can discuss the development there.

Thanks a lot

krzyzanowskim commented 9 years ago

@smarek this is my custom plugin, no sources available. If you don't see controls it may be that plugin can't load properly. I'll drop you an email about this for debugging. Maybe you can see some errors in Console.

smarek commented 9 years ago

@krzyzanowskim indeed found some

02/01/15 02:08:49,563 Airmail 2[25378]: [DEBUG] Airmail Type:STORE OSX:10.9.5 Version:284
02/01/15 02:08:50,448 Airmail 2[25378]: objc[25378]: Class SSKeychain is implemented in both /Applications/Airmail 2.app/Contents/Frameworks/EvernoteSDK-Mac.framework/Versions/A/EvernoteSDK-Mac and /Users/smarek/Library/Containers/it.bloop.airmail2/Data/Library/Application Support/Airmail/General/Plugins/AMPObjectivePGP.bundle/Contents/MacOS/AMPObjectivePGP. One of the two will be used. Which one is undefined.
02/01/15 02:08:50,484 Airmail 2[25378]: [DEBUG] Loaded Plugin OpenPGP for AirMail This plug-in implements the OpenPGP email security standard for encryption and signing.
02/01/15 02:08:50,523 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampPileMessageView:
02/01/15 02:08:50,524 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampPileComposerView:
02/01/15 02:08:50,524 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampPileChangedRecipients:
02/01/15 02:08:50,525 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampPileIsEncrypted:
02/01/15 02:08:50,526 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampStackDecrypt:
02/01/15 02:08:50,526 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampPileVerifySignature:
02/01/15 02:08:50,526 Airmail 2[25378]: [DEBUG] OpenPGP for AirMail registered for method ampStackSendRfc:composer:
02/01/15 02:09:09,635 Airmail 2[25378]: ERROR OpenPGP for AirMail Invalid input data METHOD -[AMPlugin LogError:]:61 
02/01/15 02:09:09,792 Airmail 2[25378]: ERROR OpenPGP for AirMail Invalid input data METHOD -[AMPlugin LogError:]:61 
02/01/15 02:09:14,844 Airmail 2[25378]: ERROR OpenPGP for AirMail Invalid input data METHOD -[AMPlugin LogError:]:61 
krzyzanowskim commented 9 years ago

that's clear now ;) SSKeychain interfere with another plugin. Try disable evernote plugin for a second and give a try to ObjectivePGP plugin.

smarek commented 9 years ago

Error mentions Evernote SDK framework, I do not use the Evernote app (builtin part of Airmail 2). No other plugins were enabled at time.

smarek commented 9 years ago

So it's still not fixed, @krzyzanowskim provided plugin is not yet open-source and does not fix the inline-PGP issue. So anybody knows how to handle text/plain content-type in AMPlugin interface?

krzyzanowskim commented 9 years ago

@smarek regardless of general issue you experiences with the other plugin, I have inline pgp parser working for some cases. But the hard way is that it require work with raw RFC822 data.

smarek commented 9 years ago

@krzyzanowskim that shouldn't be problem, if we could handle text/plain messages, which seems as of now as impossible. anyway, your parser is it available somewhere we could reach for the code to integrate it within plugins? Thanks

KodaKoder commented 9 years ago

imo is possible to encrypt and decrypt from RFC822 data you just need to parse the rfc

PhilETaylor commented 9 years ago

I reported this months and months and months ago... I conversed and provided loads of feedback and examples of emails that were not decrypting. I gave up with Airmail because of this issue. I returned today to see if it had been fixed and still is a problem. :-(

marcinkoziej commented 9 years ago

+1 What's the status of this issue? I can help with testing.

clonker commented 9 years ago

Interested in a solution for this as well.

tduzan-te commented 8 years ago

I'd also like to see this issue get solved. Currently I primarily use PGP/MIME mail, but some senders still do inline and it should be supported.

2b3pro commented 8 years ago

Waiting for help too.

vryzhenkin commented 8 years ago

Still waiting for this one too.

krzyzanowskim commented 8 years ago

Few people asked about this one recently. I worked on solution to that in the past, and I'm not working on it at the moment. The reason is that plugin framework is not really designed to this kind of work (and this not going to change afaik)

For a second, I've considered back to work on this plugin, but my current situation do not let me spend more time on that (it really has to be sponsored in some way), simply can't afford for more free work on this one now.

Arsca commented 8 years ago

+1 I bought it and practically hasn't use it due to this missing feature.

ilplaymo commented 7 years ago

+1 I receive this kinda message many times per week and I use Thunder+Enig toopen these. Also Android K9 + OpenKeychain manage it automatically

ghost commented 6 years ago

Will there be a fix? Airmail is useless without a fix for inline encrypted content. @krzyzanowskim Why does Airmail not fund your time to develop such thing?

@Airmail - Why is that?

PhilETaylor commented 6 years ago

I simply gave up on Airmail actually providing working/reliable GPG and went back to Mac Mail with GPGMail.

krzyzanowskim commented 6 years ago

@dschwabeS11 There is no simple answer. My resources are limited. I'm partially involved in the PGP support for another e-mail client though (https://canarymail.io/)

ghost commented 6 years ago

Thanks for replying to quickly. I'll also checkout canarymail as a possible alternative.

Airmail answered that "they will forward this" (Github issue link) to their developers. Basically it seemed more like a generic answer. It's a shame that they kinda stopped developing major features further after they received the reward.