GPG Mail Extension - Beta versions for macOS Sonoma are undergoing testing / Feedback, tips & hints

Robert Vaessen's Avatar

Robert Vaessen

30 Nov, 2023 11:42 AM

Hello -

As many have learned/been informed, Apple has changed the API/way that the Mail.app works. The Plug-Ins API is gone, and now developers must use the Extensions API in order to extend the functionality of Mail.app. In the case of GPG Tools (specifically the GPG Mail application), that means a rewrite of the code base using the new Extensions rules.

GPG Mail 1.0b8 (build 2) has been released publicly. URL was provided via email to a select group of users (those subscribed to beta updates). You may be one of the subscribers who has installed or is interested in the GPG Mail extension beta.

Unfortunately, the beta is a bit 'buggy'. Apple's API doesn't quite work right under all conditions.. The new Extensions framework for the Mail.app is new to Apple, and I'm sure they're receiving bug reports from plenty of developers, testers and users as this new API is now out there with the release of macOS Sonoma. I'm one of this impacted by the change to the Mail.app API. I worked with a couple of the GPG Tools developers over the last week or so (23-29 Nov, 2023) to identify the root causes of some of the crashes I (and others) experienced when using the GPG Mail extension (the new beta for use with macOS Sonoma).

Some of the lessons learned:
1 - After you install the beta, you may need to 'activate' the extension using your existing GPG Mail 7 support plan 'Activation Code'.
2 - If you plan to routinely use GPG Mail to sign/encrypt, verify/decrypt messages, you'll need to disable Mail.app junk and rules filtering. Otherwise, with the GPG Mail extension enabled, Mail.app is likely to crash whenever it acts (filters/routes according rules) on an incoming email message.
3 - It is also possible to work 'off-line' with the GPG Mail extension enabled. Go to the Mail.app menus. Select 'Mailbox-Take All Accounts Offline' and then enable the GPG Mail extension. While offline, Mail.app won't act on any incoming messages, this should allow you to draft, verify, encode, decode messages without issue. When you're ready to resume 'Online' operations, simply disable the extension and select 'Mailbox-Take All Accounts Online' to resume normal operations. (Keep in mind that you can't operate on messages that are in an IMAP inbox, they're on the server. You may see a static image in your inbox while you're offline, but the actual message is still stored on the server. Move it out of the inbox before going offline, if you want to perform verification/decryption actions on that message).

You can avoid (most) crashes in two ways. Either leave the mail routing rules and junk filtering off all the time, or disable such (and then enable the GPG Mail extension) whenever you want to compose/create or verify/decrypt PGP signed/encrypted message. Don't forget to diable the GPG Mail extension, and turn back on the filtering rules after disabling the GPG Mail extension.

If you find that Mail.app has crashed while the GPG Mail extension is enabled, please submit a crash report to Apple. The automatic crash reporting helper should be invoked when this happens, making it easy to send the report directly to Apple. If you try to relaunch Mail.app and it just won't (I experienced numerous consecutive crashes whenever I tried to restore/relaunch the application), you can try disabling the GPG Mail extension using the System Settings application. In System Settings, search for Extensions. Select 'Added Extensions', Look for GPG Keychain, then uncheck the 'com.apple.mail.extension'. That should allow you to relaunch Mail.app.

Thanks to efforts of beta testers over the last few weeks, the development team has able to conduct a large amount of troubleshooting and data gathering in order to submit bug reports to Apple. Some of these bugs have already been addressed/corrected by Apple (in their Sonoma 14.2b3), but there are still crashes that need to be addressed when the GPG Mail extension interacts with the Mail.app API. Now we have to wait for Apple to address all the issues that have been identified.

In the meantime, I plan to leave my rules (for junk filtering and message routing) enabled, and the GPG Mail extension disabled, unless I'm working on an encrypted or signed message.

The bottom line is this. You can upgrade to Sonoma, and install the GPG Mail extension. If it's causing crashes, you can disable it. It is also possible to enable it and either work offline, or operate online with filtering (rules and junk filtering) disabled.

Tester: Robert Vaessen

  1. 1 Posted by Stefan Bethke on 01 Dec, 2023 11:37 AM

    Stefan Bethke's Avatar

    Thank you for that very informative update!

    Since I'm not using the filtering functionality (I do that on the server), would you say that using Mail with with the beta version is mostly usable? Then I would be interested in trying that out, as I'm eager to get a couple of updates for some apps that require Sonoma.

    Thanks,
    Stefan

  2. Support Staff 2 Posted by Luke Le on 01 Dec, 2023 11:47 AM

    Luke Le's Avatar

    Hi Stefan,

    when it works, it is quite reliable. The when however is the critical part. If you are using a second extension that implements some kind of filtering, Mail will crash repeatedly. If you don’t use rules, spam filtering or any other extension that does some kind of filtering / adding flags to messages, than you should be rather safe from crashes.

    Following are the currently known issues. These issues are all in Apple’s code and will only be solved once they address them. They are aware of the issues, but we don’t know when they will get around to fixing them.

    working.

    Known issues

    • FB13380621 If a compose window was open when Mail was last closed, which is restored on launch, no message will be processed by the extension until the GPG Mail Extension is disabled and re-enabled manually via Mail › Settings › Extensions
    • FB12848141 Drafts are not encrypted. Already encrypted drafts will be stored in plain(!) on the mail server if the user continues to edit them
    • FB9216546 After launch, if a message is pre-selected it will not be processed by GPG Mail Workaround: de-select and re-select the message
    • FB13303274On macOS 14.2 betas Mail will crash if a draft is saved if any extension is enabled and neither the sign button nor the encrypt button are active
    • FB13394225 If the extension becomes unresponsive or Mail can't connect to it it will still show as enabled in Mail › Settings › Extensions but the user won't be alerted Workaround: Logout/Login or Restart of the computer solves this in most cases
    • FB13381340 In offline mode, the extension will not be called to decrypt / verify messages
    • FB9222544 The sign and encrypt button will be toggled on or off based on the state of the last composed message instead of based on the defaults set in GPG Keychain › Settings › GPG Mail or the security status of the original message in case of a reply
    • FB12193522, FB13383153 There is currently no warning in case a user attempts to reply to an encrypted message in plain
    • FB12193526 If the GPG Keyring is edited (new keys, updated keys) Mail has to be restarted for the changes to be reflected
    • FB12191237 A "For security reasons remote content is not loaded." banner might be shown even though no remote content is included in the message
    • FB12193519 There's no special hint / message in the compose window if no secret key is for the sender is available or an available secret key can't be used (e.g. expired)
    • FB13381340 It's not possible to switch between S/MIME and OpenPGP when composing a message
    • FB12193528 Compose window might not be animated out immediately when pressing send. Don't press send repeatedly
    • FB12193520 Partial Inline PGP encrypted / signed message are currently not supported
    • FB12056175 The signature detail view might be display at "unusal" positions

    We hope that helps you make an informed decision.

  3. 3 Posted by Robert Vaessen on 01 Dec, 2023 11:56 AM

    Robert Vaessen's Avatar

    Stefan -

    I just ran some tests under macOS 14.1.2 (released/updated yesterday). The same issues are still occurring under the macOS 14.1.2 update. If you leave junk filtering off and have no rules, you should be relatively unaffected by crashes. Of course you can always turn off the GPGMail extension when you're not actively composing, sending, verifying or decrypting PGP signed or encrypted messages. Turning off the extension will prevent any associated crashes. You can safely/reliably use the other GPG Tools without any special precautions.

    With the GPG Mail extension disabled, I experience NO crashes.

    When I want to draft/compose a signed/encrypted message I turn off my mail accounts 'Mailbox-Take All Accounts Offline', enable the extension, compose the message, then turn the accounts back Online. I send the message, then disable the extension. If I receive a signed/encrypted message, I can turn off my accounts, enable the extension, verify the signature/decrypt the message, then disable the extension and turn accounts back on.

    • Robert
  4. 4 Posted by Matthew Robinso... on 01 Dec, 2023 03:47 PM

    Matthew Robinson's Avatar

    This is a very useful thread and the filtering / spam email information now explains the issues I faced after installing the beta with Mail immediately crashing on start up.

    Hopefully, there will be a workaround or solution in the pipeline, for me it is unusable within the current limitations from the API.

  5. Support Staff 5 Posted by Steve on 02 Dec, 2023 12:54 AM

    Steve's Avatar

    Hi Matthew and others,

    the issue you are seeing is tracked as GPG Mail #1159 and as FB13414651 on Apples side.

    We informed Apple about this problem and are waiting for them to resolve the issue.

    You can reach out to Apple via https://www.apple.com/feedback/mail.html and reference FB13414651.

    The only workaround right now is to disable Mail's junk filter or other rules you may be using with e.g. SpamSieve or general rules in Mail app or keep the rules active and disable the Extension.

    All the best,
    Steve

  6. Support Staff 6 Posted by Steve on 20 Dec, 2023 07:11 PM

    Steve's Avatar

    Apparently we spoke to soon and the fix did not make it into macOS 14.2.1. It should still be coming with 14.3, but sadly that will take a few more weeks.

  7. 7 Posted by Robert Vaessen on 20 Dec, 2023 10:29 PM

    Robert Vaessen's Avatar

    Steve - I can confirm (from testing yesterday and this morning) that the bug is not fixed in 14.2.1. I will report the problem (Problem report to Apple) as soon as I have time.

  8. Support Staff 8 Posted by Steve on 20 Dec, 2023 11:37 PM

    Steve's Avatar

    Sure, whenever you have a minute. We briefly had the hope they would have backported the fix, but sadly that is not the case.

  9. 9 Posted by Robert Vaessen on 21 Dec, 2023 11:00 PM

    Robert Vaessen's Avatar

    I have reported the crashes of Mail.app (when GPG Mail extension is enabled) to Apple using their trouble reporting feature. Mail.app (under macOS Sonoma 14.2.1) is still crashing when evaluating incoming email for junk or mail sorting/filtering rules.

  10. Support Staff 10 Posted by Steve on 21 Dec, 2023 11:15 PM

    Steve's Avatar

    Thanks, reporting issues like this to Apple is always a good idea.

  11. 11 Posted by Robert Vaessen on 22 Dec, 2023 11:38 AM

    Robert Vaessen's Avatar

    The following feedback/comments submitted to Apple at: https://www.apple.com/feedback/mail.html

    There is something wrong with Extensions under Mail.app Version 16.0 (3774.300.61.1.2). I have been trying to get the GPG Mail extension Version 1.0b8 (built for use with macOS Sonoma) to work with Mail.app under macOS 14.x (now testing with macOS version 14.2.1). Unfortunately, it seems that there is something broken with the API. Whenever I have the GPG Mail extension enabled, Mail.app is crashing. Mail.app triggers a crash whenever the extension is enabled and an incoming email is 'evaluated'. If Mail.app checks for Junk filtering or email filtering based upon various 'rules', the application crashes. If all Mail accounts are turned off (no incoming email), and 'rules' are not 'evaluated', then Mail.app will function normally (not crash) when a GPG Mail extension is enabled.

  12. Support Staff 12 Posted by Steve on 24 Dec, 2023 01:12 PM

    Steve's Avatar

    Hi Robert et all,

    we're happy to announce the Second beta of GPG Mail for macOS Sonoma: https://gpgtools.com/sonoma

    (note it won't fix the known issue in macOS 14.2.1 regarding use of mail rules)

    If you plan to use GPG Mail for macOS Sonoma in production, please make sure to have a look at the list of Known Issues.

    To provide you the best OpenPGP experience possible on macOS, we continue working with Apple to fix the remaining issues.

    Please report any findings or other feedback via System Settings > GPG Suite > Contact Support. We do recommend sending in screenshots or videos, since they often help us to better understand problems you might be seeing. You can add screenshots after you have reported a problem. So first file the report, click send, then add screenshots or screencasts to your existing discussion.

    One thing that could be helpful is, to share with Apple, why OpenPGP matters to you and that you would love to see support for OpenPGP in Mail app in macOS going forward:
    https://apple.com/feedback/mail.html

    Happy Holidays ☃️ ❤️

    Best regards,
    Steve

  13. 13 Posted by Robert Vaessen on 24 Dec, 2023 02:20 PM

    Robert Vaessen's Avatar

    Excellent news Steve. I've already downloaded the new beta, and plan to do some testing today (provided it doesn't interfere with holiday plans). Just one small point of concern... The beta is ref'd as '2014.1b2' (vs 2024.1b2) on the 'Sonoma' page. Could you/someone please correct that? (see screen shot attachment).

  14. 14 Posted by Robert Vaessen on 24 Dec, 2023 04:04 PM

    Robert Vaessen's Avatar

    New testing (of GPG Mail 8.0b5 delivered with GPG Suite 2024.1b2) under macOS Sonoma 14.2.1, confirms that the same issues/bugs noted previously:

    • FB13414651 - Mail crashes in case a security extension is enabled and the junk filter is active

    • FB13427325 - Mail crashes if any filter rule is enabled that requires the message body to be downloaded (for example search of the body) and a security extension is enabled.

    • FB13427325 - Mail crashes when receiving a message with attachment if an extension is enabled that implements a security handler and an action handler. I'm not entirely sure about this issue, as I would need to disable all mail filtering rules to check this. I have many (~100) rules that I can't 'disable'. The only way to 'disable' such rules (that I know of) is to 'delete' them, and I'm not willing to do that. If I knew where the rules are stored, I might be able to 'save' them off someplace, delete the associated file(s), then test...

    For now the workaround still is to either disable rules or disable the extension. Good news. With the GPG Mail extension disabled, I was able to move signed and encrypted test messages out of the Inbox, re-enable the extension, and then verify signatures and decrypt messages using components of GPG Suite delivered with GPG Suite 2024.1b2. I was also able to disable the Extension, draft a message, re-enable the Extension to 'sign' the message, and then send the message (a OpenPGP signed message) without issue. After sending the message, I disabled the Extension to prevent crashes as email was received in my Inbox.

  15. Support Staff 15 Posted by Steve on 08 Jan, 2024 12:23 AM

    Steve's Avatar

    Hi Robert,

    please excuse the slow response time.

    Thanks for pointing out the misnaming in the version. I don't know how often I proof-read the announcement and yet I managed to miss this obvious mistake 🙈

    There are a few crashes in Apples MailKit API currently. The crash, where Mail app crashes when Mail > Settings > Junk > Junk Mail Behavior with Enable junk mail filtering was active was fixed in macOS 14.3b1. That issue is tracked as GPG Mail #1159 and as FB13414651 on Apples side.

    There is a related crash, where Mail app crashes when any rule in Mail > Settings > Rules is active and an email is received while GPG Mail Extension is enabled. That issue is tracked as GPG Mail #1165 and FB13427325 on Apples side. Amazingly while that crash was initially fixed in macOS 14.3b1, it has now returned in macOS 14.3b2. Apparently Apple pulled the code change that fixed the problem or managed to re-introduce the crash in a different way. We are currently investigating that.

    I connected this discussion with the existing issue. Should this discussion get closed, it will be re-opened as soon as the issue is closed. That way you stay in the loop and will receive info as soon as we have news. Feel free to open a new discussion should you run into further problems or need assistance.

    Our list of Known Issues links to a workaround to get back to working state. Here are the steps to follow:

    1. open System Settings
    2. search for Extensions and open that panel from search results
    3. open Added Extensions and from that view disable the GPG Keychain extension (com.apple.email.extension)
    4. open Mail app and disable junk filtering / custom rules / Spam Sieve and then re-enable the GPG Mail extension from within GPG Keychain > Settings > GPG Mail

    Since you state you won't be able to disable the rules, at least for now, your only option is to disable GPG Mail.

    We'll certainly keep you posted when we have news in regards to this problem.

    All the best,
    Steve

  16. 16 Posted by Robert Vaessen on 08 Jan, 2024 10:31 AM

    Robert Vaessen's Avatar

    Steve -

    Thanks. I've confirmed that the naming/name of the software download package on the Sonoma beta page: https://gpgtools.com/sonoma has been corrected. It now reads 2024.1b2 instead of '2014.1b2'. I will conduct additional testing (with GPG Mail) When Apple releases a new stable software/OS update.

    • Robert
  17. Support Staff 17 Posted by Steve on 23 Jan, 2024 12:02 AM

    Steve's Avatar

    Hi Robert,

    we are happy to let you know that the issue where Mail app would crash, when rules or junk filter were used, is resolved in macOS 14.3 which has been released today.

    Please update your macOS Sonoma installation.

    I'm closing this discussion. Should you need further assistance or have questions you can re-open this discussion here or open a new one any time.

    Best,
    Steve

  18. Steve closed this discussion on 23 Jan, 2024 12:02 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac