This is one of the fundamental areas where we want to extend Thunderbird. We want to be able to transform a received message in order to decrypt it and perform other operations if needed.
This https://thunderbird.topicbox.com/groups/addons/Tefecd2c30eac581d question to the Thunderbird's addon dev community has been important in clarifying some doubts. In case that link is broken, you can try to search the question from its title "Transforming an incoming message through its MIME representation (multipart/encrypted)".
Developing for the decryption workflow can be a bit tricky because the
logic is encapsulated in a component that is created by a Thuderbird's
factory when we click on a multipart/encrypted
message. For most of
the tests i used a prototype of the onPgpMime
function listed in the
question above.
I would call onPgpMime
with functions that returned specific
messages, so that i could unregister and try again from the command
line without reinstalling the plugin. Towards the end when it was more
stable i just called pEpController.addFactories/removeFactories
,
which is slower.
README.md
you are reading thisdecryption-control-flow-in-enigmail.md
control flow for PGP/MIME in Enigmail, which led to the solution we are actually adoptingfrom-enigmail-to-pep.md
why Enigmail's solution is not enough for us and how our current approach differsThe investigation for P4TB-43 was long and i took some notes while reading the code and doing experiments. We can try to keep similar notes in the repo as a form of documentation. Eventually We could extend or reuse parts of it, find a convenient structure, or remove some of them.
I started from Thunderbird's code then moved to Enigmail. Enigmail handles attachments in the cases of PGP/Inline or PGP/MIME. The code related to PGP/Inline is larger, it's the first i found and the first i tried to use. The code related to PGP/MIME contains the solution we are using now.
thunderbird.txt
i started from analysing Thunderbird's code, then i moved to Enigmailstyle-and-markup.md
initial search to figure out whether Enigmail is duplicating Thunderbird's markup for attachmentsenigmailMessengerOverlay.md
notes about PGP/Inline code in Enigmail. This involves a set of solutions we eventually discardedopen-enigmail-questions.md
some open directions for deepening how PGP/MIME currently works in Enigmail