Sometimes messages cannot be decrypted by Thunderbird #4

Closed
opened 2024-11-07 18:45:38 +00:00 by revsuine · 6 comments
Owner

The issue

Thunderbird fails to decrypt some gpgmymail emails. These emails can be decrypted manually fine, using gpg --decrypt. This tends to come from specific sources of emails, e.g. blacklisting substack.com from gpgmymail means I can read Substack emails ok in my email client. The vast majority of emails decrypt fine in Thunderbird

Current theory

It has to do with the encoding of the message not being 7-bit. See the attached two emails I received to compare. Thunderbird is capable of reading/decrypting Aki Tuomi's email, which uses 7-bit encoding, but not Nick Howitt's email, which uses base64 encoding.

gpgmymail uses 7-bit encoding. TODO: experiment with gpgmymail using the same encoding as the original email.

# The issue Thunderbird fails to decrypt some gpgmymail emails. These emails can be decrypted manually fine, using `gpg --decrypt`. This tends to come from specific sources of emails, e.g. blacklisting `substack.com` from gpgmymail means I can read Substack emails ok in my email client. The vast majority of emails decrypt fine in Thunderbird # Current theory It has to do with the encoding of the message not being 7-bit. See the attached two emails I received to compare. Thunderbird is capable of reading/decrypting Aki Tuomi's email, which uses 7-bit encoding, but not Nick Howitt's email, which uses base64 encoding. gpgmymail uses 7-bit encoding. TODO: experiment with gpgmymail using the same encoding as the original email.
revsuine added the
bug
enhancement
priority
medium
labels 2024-11-07 18:45:38 +00:00
revsuine added
priority
high
and removed
priority
medium
labels 2024-11-12 14:29:02 +00:00
Author
Owner

TODO: experiment with gpgmymail using the same encoding as the original email.

885532f27a addresses this but turns out Thunderbird still can't read them.

We'd have to re-encode the message contents as 7or8bit, or skip encoding non-7or8bit messages.

> TODO: experiment with gpgmymail using the same encoding as the original email. 885532f27a addresses this but turns out Thunderbird still can't read them. We'd have to re-encode the message contents as 7or8bit, or skip encoding non-7or8bit messages.
Author
Owner

Trying to use get_payload() to achieve this, but get_payload() is always returning None, not sure why. TODO: figure that out

Trying to use `get_payload()` to achieve this, but `get_payload()` is always returning `None`, not sure why. TODO: figure that out
Author
Owner

Solution ideas:

  • Construct an entirely new email with 7or8bit encoding, should be actually simpler.
  • use attach() (set_payload() is for scalars like strings, which is the problem with the above)
Solution ideas: * Construct an entirely new email with 7or8bit encoding, should be actually simpler. * use `attach()` (`set_payload()` is for scalars like strings, which is the problem with the above)
Author
Owner

Ok I have working decoding for quoted-printable in 7or8bit-decode, need to do base64 now, which is harder as I can't just do base64.b64decode() since that treats the whole string/byte array like base64. Most likely I'll have to do message.walk() to find the relevant part, but ran into issues with that before.

Ok I have working decoding for `quoted-printable` in [`7or8bit-decode`](https://git.revsuine.xyz/revsuine/gpgmymail/src/branch/7or8bit-decode), need to do base64 now, which is harder as I can't just do `base64.b64decode()` since that treats the whole string/byte array like base64. Most likely I'll have to do `message.walk()` to find the relevant part, but [ran into issues with that before](https://git.revsuine.xyz/revsuine/gpgmymail/issues/4#issuecomment-23).
Author
Owner

As of at least 272842162d I think this may be resolved, but waiting for more mail traffic before closing.

As of at least 272842162d I think this may be resolved, but waiting for more mail traffic before closing.
revsuine added
priority
low
and removed
priority
high
labels 2024-11-14 20:23:30 +00:00
Author
Owner

Closing: I'm concluding this is just an issue with Thunderbird being able to process gpgmymail-encrypted email because I switched to Evolution and it displays just fine. Deleting the spaghetti code I wrote to try circumvent Thunderbird issues and closing this issue

Closing: I'm concluding this is just an issue with Thunderbird being able to process gpgmymail-encrypted email because I switched to Evolution and it displays just fine. Deleting the spaghetti code I wrote to try circumvent Thunderbird issues and closing this issue
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: revsuine/gpgmymail#4
No description provided.