Thunderbird Monthly Development Digest: April 2024
Thunderbird Monthly Development Digest: April 2024
https://blog.thunderbird.net/2024/05/thunderbird-monthly-development-digest-april-2024/
In April's Thunderbird Development Digest: updates on the new Cards View, folder compaction rewrite, Exchange support in Daily, and more.
My first Thunderbird extension
I just finished my first (private) Thunderbird extension and felt like blogging a bit, since there certainly aren't too many resources on this topic.
The problem I set out to solve was that soft hyphens in message subjects are displayed as whitespace in the message list pane. I use Thunderbird as an RSS reader and have subscribed to a newspaper that uses a lot of soft hyphens, which made it jarring to read the headlines.
There's already an extension called FiltaQuilla that almost does what I needed. It adds filter actions that can prepend and append text to message subject, but it doesn't have features for removing or replacing singular characters like I wanted.
Two possible solutions came to mind:
- Create a HTTP server that forwards requests to the RSS feed and removes soft hyphens from the response.
- Create a Thunderbird extension that removes soft hyphens when the feed items are added.
I didn't feel like running a separate service/process for something this simple, so I decided to go with solution 2.
My first stop was Thunderbird's documentation on supported WebExtension APIs, specifically the messages API. Alas, the API doesn't support modifying the subject of a message, though it allows marking them as read, changing tags, fetching the subject, etc.
Since FiltaQuilla supported modifying the subject, I knew that it was possible somehow. Thankfully, FiltaQuilla is open source, so I skimmed the source and found that it's done roughly as follows:
const Cc = Components.classes,
Ci = Components.interfaces;
var filterService = Cc["@mozilla.org/messenger/services/filters;1"]
.getService(Ci.nsIMsgFilterService);
filterService.addCustomAction({
"applyAction": (msgHdrs) => {
for (let msgHdr of msgHdrs) {
msgHdr.subject = msgHdr.subject.replace(...);
}
},
...
});
Keyword googling revealed that Components
is some legacy API thing that has very little documentation. Luckily, this helpful forum post outlined how to properly call addCustomAction
with less reliance on legacy cruft, though the documentation is still not great.
With the hello world tutorial, Experiments documentation and some trial and error, I finally got something working:
// background.js
browser.FilterActionAPI.addHyphenRemover();
// api/FilterActionAPI/implementation.js
const softHyphen = String.fromCharCode(173);
const { MailServices } = ChromeUtils.import("resource:///modules/MailServices.jsm");
this.FilterActionAPI = class extends ExtensionAPI {
getAPI(context) {
return {
FilterActionAPI: {
addHyphenRemover() {
MailServices.filters.addCustomAction({
id: "filter-remove-softhyphen",
name: "Remove soft hyphens",
applyAction: (msgHdrs) => {
for (const msgHdr of msgHdrs) {
if (msgHdr.subject.includes(softHyphen)) {
console.log("filter-remove-softhyphen", "Removing soft hyphen from subject", msgHdr.subject);
msgHdr.subject = msgHdr.subject.replace(softHyphen, "");
}
}
},
isValidForType: () => true,
validateActionValue: () => null,
allowDuplicates: false,
needsBody: false,
isAsync: false
})
}
}
};
}
}
Then I just added a message filter that matches my RSS feed and applies the Remove soft hyphens action. Not the prettiest but works!
Thunderbird for Android / K-9 Mail: March 2024 Progress Report
Thunderbird for Android / K-9 Mail: March 2024 Progress Report
https://blog.thunderbird.net/2024/04/thunderbird-for-android-k-9-mail-march-2024-progress-report/
It was a busy month! Here's our monthly progress report detailing our work to transform K-9 Mail into Thunderbird for Android.
K-9 Mail changelogs out of date
https://thunderbird.github.io/thunderbird-android/changelog_6.6-MAINT_branch.xml
ThunderSnap! Why We're Helping Maintain The Thunderbird Snap On Linux
ThunderSnap! Why We're Helping Maintain The Thunderbird Snap On Linux
https://blog.thunderbird.net/2024/04/thundersnap-why-were-helping-maintain-the-thunderbird-snap-on-linux/
In the spirit of free software, we want to support as many users as possible. That's why we're officially supporting the Thunderbird Snap.
Thunderbird for Android / K-9 Mail: February 2024 Progress Report
Thunderbird for Android / K-9 Mail: February 2024 Progress Report
https://blog.thunderbird.net/2024/03/thunderbird-for-android-k-9-mail-february-2024-progress-report/
A new stable release, Android 14 compatibility, Material 3, and a contributor spotlight in today's K-9 Mail / Thunderbird for Android update.
how to encrypt e-mails using the alias e-mail adress?
hi ppls, is there a way tho send encrypted emails with the alias adress? i like my alias adress even more..
in thunderbird the encryption button in the write email dialog turns off when i choose an alias.
thx's lemmyist's <3
Towards Thunderbird for Android – K-9 Mail 6.800 Simplifies Adding Email Accounts
Towards Thunderbird for Android – K-9 Mail 6.800 Simplifies Adding Email Accounts
https://blog.thunderbird.net/2024/03/towards-thunderbird-for-android-k-9-mail-6-800-simplifies-adding-email-accounts/
With the addition of Thunderbird's account Autoconfig feature, K9-Mail 6.800 brings us one step closer to Thunderbird for Android.
Thunderbird Monthly Development Digest: February 2024
Thunderbird Monthly Development Digest: February 2024
https://blog.thunderbird.net/2024/02/thunderbird-monthly-development-digest-february-2024/
In this month's Development Digest, Alex shares exciting news about Thunderbird Sync, Exchange support, and the Thunderbird Snap on Linux.
Is it possible to sign a PDF with an OpenPGP key generated by Thunderbird ?
cross-posted from: https://programming.dev/post/10465121
Hi everyone,
I was wondering if you know a way to use the generated OpenPGP key created trough Thunderbird to sign PDF's ?
(Devuan distro)
Thanks.