Send Later incompatible with PGP encryption (Error: encryption) #200
Replies: 30 comments 17 replies
-
When Enigmail was an independent plugin there was a way to turn off the "encrypt draft messages" option, but it seems that option is gone now that PGP is integrated into Thunderbird. There's really nothing I can do about that, Sorry. You might consider opening a bug with Thunderbird if you want this fixed. PS. This was always incompatible with Send Later, but the latest update is more proactive with telling you about it. Nothing changed in the latest update to make this incompatible. |
Beta Was this translation helpful? Give feedback.
-
@farfallosa Did you follow through with @jperryhouts's suggestion to escalate this to the Mozilla Thunderbird dev team? I'm looking through their Bugzilla bug tracker now but can't see a relevant bug and want to ensure I'm not spamming them. The closest existing ticket I see that may be relevant is their Bug ID 1168907, "Saved draft email is always encrypted when encryption is set to off for the composing email," but this is 6 years old. |
Beta Was this translation helpful? Give feedback.
-
Meanwhile, @jperryhouts, would you be willing to share with us a little more about why encrypted drafts are incompatible with Send Later? At first blush, it seems to me like an encrypted draft should not be a showstopper for Send Later functionality, so long as the email being sent "later" does not require private key material (e.g., it is not being signed). What is the technical block preventing Send Later from working with encrypted accounts? I ask because I have some familiarity with both JavaScript and RFC 4880, as well as a modicum of extension development experience, I'd like to see this functionality implemented, and I can potentially devote a modest number of hours to helping implement a solution. I'd like to help, if I can. |
Beta Was this translation helpful? Give feedback.
-
This wouldn't be a problem if Thunderbird encrypted Draft messages using the recipient's public key, but the point of encrypting draft messages is that you can open them up again and continue editing them. So instead Thunderbird encrypts those messages with your own public key. That makes them both unreadable to your recipient, and also blocks Send Later from opening them without user interaction (note there might be some way for send later to open them if you don't have a passphrase on your private key, but that's not really a solution). Two things will need to happen before this really has a workable solution. One is that Thunderbird needs to allow some programmatic access to the raw content of those messages, presumably just by allowing you to store them unencrypted in Drafts. The other is that Send Later needs to then be able to encrypt their contents before placing the message into the Outbox, when its scheduled time arrives. This will likely also require some accommodation on Thunderbird's side, since I don't know how easy it is for extensions to interact with the new builtin PGP system. So far I haven't put much thought into the latter problem, because it's blocked until the first one is solved. But if you're interested in working with the Thunderbird devs on this I'd be happy to stay in the loop to ensure that whatever solution does get implemented in Thunderbird is aligned with Send Later's use case. |
Beta Was this translation helpful? Give feedback.
-
@fabacab thanks for nudging me. I just posted a new bug report at bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=1681168) |
Beta Was this translation helpful? Give feedback.
-
Not sure I understand what you mean by this. When you view a draft message it's of course decrypted for you to see its contents, but the message as stored on disk / server is still encrypted. Unless I'm misunderstanding your comment. |
Beta Was this translation helpful? Give feedback.
-
Hmm, I often send signed email via Thunderbird's built-in OpenPGP support and am not asked for my private key's passphrase. As I understand it, either the key or its passphrase is stored in memory (along with access to my other account passwords) after I provide my Thunderbird "primary password" after the program first starts up. I'll probably have to dig around in the codebase to see what's exactly happening, but this experience is why I'm surprised you'd need to prompt the user for their OpenPGP private key passphrase at all. In any event, thanks for your work thus far and if I end up being able to contribute in some way I'll do so here.
The Thunderbird team is actively working on OpenPGP support. Every recent release since built-in OpenPGP support has included changes and bugfixes to the way OpenPGP preferences are handled, so now's a good time to poke them about this sort of thing. Also, depending on the complexity of the issue, we might not need them to do more than they've already done. For example, I just now noticed that there is a |
Beta Was this translation helpful? Give feedback.
-
I assume that your private key is stored in memory, because the whole thing feels pretty transparent when you're using it, but I don't know that can be counted on to always be true. For example, plain gpg via the command line usually stores your private key in memory for some time period, then asks you to enter the passphrase again once that time period has elapsed. There's also the problem that I'm not sure how to interact with the new PGP system via the extension API. The extension API is very lacking right now, and to my knowledge nothing exists to expose the encryption system to add-ons, even indirectly. @fabacab Whatever investigating & work you're interested in taking on regarding this is very welcome. Let me know what you find. |
Beta Was this translation helpful? Give feedback.
-
I'm going to re-open this issue because I'm positive this is not going to be the last I hear from users about it, and it will be useful to have somewhere to point them. |
Beta Was this translation helpful? Give feedback.
-
@jperryhouts As far as I can say, once decrypted, a draft remains decrypted. I.e. even after a restart of TB the draft remains decrypted and does not need to be decrypted again. Therefore I assume that the draft is saved plain after a first decryption. Note: To mention, this happens even if the draft is neither signed nor encrypted. |
Beta Was this translation helpful? Give feedback.
-
Use Ctrl+Shift+U to look at the message source, and then tell me that message is not encrypted... |
Beta Was this translation helpful? Give feedback.
-
It is … I wonder how TB manages to keep a decrypted view over restarts even though the message itself remains encrypted. |
Beta Was this translation helpful? Give feedback.
-
I've found a simple workaround for TB78 with OpenPGP: If you set the [Security | Encryption Technology setting] in a new mail to S/MIME, the email is saved unencrypted (Thunderbird V. 78.6.1) and could be processed by Send Later. However, you have to change this setting every time you open the draft again. Of course, this only helps if you want to send an unencrypted e-mail and, like me, have not configured S/MIME. |
Beta Was this translation helpful? Give feedback.
-
This could work: If Send Later would store emails not in draft folder, but eg in outgoing mail, the mail would not be encrypted and therefore Send Later could work, independent of the TB OpenPGP settings. |
Beta Was this translation helpful? Give feedback.
-
Is there any progress by TB? I have multiple accounts configured but PGP only for one account. It is frustrating that these emails are not send by SendLater but i have to remember each time so send it manually... |
Beta Was this translation helpful? Give feedback.
-
It looks like the Thunderbird side of this issue will be resolved in the next ESR version! https://bugzilla.mozilla.org/show_bug.cgi?id=1681168 Now the ball is in my court to enable encrypting scheduled messages. |
Beta Was this translation helpful? Give feedback.
-
Hi , me again ... Thank you for the job youre making 🥇 |
Beta Was this translation helpful? Give feedback.
-
Some news: I use TB v 91.8.1 (64 bits) and found the following solution. May be you should consider implementing it in this project or suggest it in the message to the user (poke @jph-sendlater #427). In TB advanced configuration, adjust the following parameters (I founded these to be
|
Beta Was this translation helpful? Give feedback.
-
As of release 10.0.9 of Send Later and any newer release, it'll prevent you from scheduling a message if you have encryption or signing or drafts encryption enabled. This is the best I can do at this point; the APIs for me to actually be able to sign or encrypt scheduled messages simply don't exist and I don't know if they ever will. I'm closing this discussion because there's nothing more I can do about it until the APIs are better. |
Beta Was this translation helpful? Give feedback.
-
@jikamens Which API do you currently use for sending emails? If I understand correctly you want to send emails in the background, without having an email composer window open. You want to remember whether an email had encryption and signing turned on, and you probably also must remember which encryption technology was selected, and probably some other flags, e.g. whether subject encryption was on or off. If I understand correctly, you'd need a modified version of the API that you are currently using, which allows you to specify the additional message security flags? |
Beta Was this translation helpful? Give feedback.
-
@kaie I don't use an API, I copy raw messages into Outbox and then tell Thunderbird to send them from there. |
Beta Was this translation helpful? Give feedback.
-
I see.
I think this functionality already exists and could help you.
|
Beta Was this translation helpful? Give feedback.
-
Well, I realize, you don't want the signature creation date to be at the time of message preparation, but at the time of message sending. |
Beta Was this translation helpful? Give feedback.
-
You'd need an API that loads the draft into a (hidden) composer window, which would restore all the message security flags as saved in the draft's state, and then tell that composer window to send out the message. |
Beta Was this translation helpful? Give feedback.
-
Hey @kaie. If you don't mind, I'd like to ask, who are you and what has prompted you to weigh in on this ticket? I'm asking this because I have been working on this add-on and on Thunderbird for more than a decade, and I'm extremely familiar with what facilities are available within the application, and yet you seem to be asking me basic questions and making basic suggestions that are not adding anything to my knowledge. I'm happy to get help from people who have expertise and knowledge I don't have who might be able to help me make progress in this area, but it is not helpful for me to have to spend time explaining things I already know and responding to suggestions I've already ruled out because they won't work. So where exactly are you coming from here? |
Beta Was this translation helpful? Give feedback.
-
I'm also confused about your thread of questioning here because I'm under the impression that the Thunderbird team has already started to work, on at least a conceptual level, at implementing an API to allow add-ons to leverage Thunderbird's mail-sending functionality without having to open a compose window. That's what I need, and the Thunderbird team already knows it's a need that add-on maintainers have, so it feels kind of weird that you seem to be trying to reinvent the wheel here and drive the discussion to a point of concluding something we already know. |
Beta Was this translation helpful? Give feedback.
-
Hi Johnathan, I'm a core Thunderbird developer, I'm the primary maintainer of the email encryption function, and I was the person who integrated Enigmail into Thunderbird a few years ago. I was made aware of this issue on Mastodon, and I'm trying to explore ways to potentially help you. |
Beta Was this translation helpful? Give feedback.
-
To respond to your earlier question, I can't just use the Send Later functionality to put the message into the Outbox at the time the message is scheduled both because of the problem you observed, that the dates on the encrypted/signed message will be wrong, and because once a message is in the Outbox my add-on has no control over when it gets sent. Even leaving aside the timestamp issue, it certainly would not be safe to tell Thunderbird to copy the message into the Outbox and then grab it back out of the Outbox, hoping that in the interim something else doesn't do a Send Unsent Messages command and cause the message to be sent at the wrong time. I'm not going to build something that introduces a dangerous race condition like that into my code. |
Beta Was this translation helpful? Give feedback.
-
Thanks Johnathan for allowing me to brainstorm here and for giving me your thoughts. It helped me to better understand the situation and the requirements. I cannot promise when we might be able to help with this, but I'm adding a note to our TODO list. I also don't know if @jobisoft already has plans for this functionality, I haven't yet talked to him - I probably should have, prior to reaching out to you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Since the actual update, "Send later" shows an "error: encrypted" in drafts folder. I use OpenPG and in TB 78x OpgenPG is integrated and does automatically encrypt drafts - so e-mails set for send later, too.
Therefore "send later" does not work. :(
Beta Was this translation helpful? Give feedback.
All reactions