Recently, I’ve been moving away from macOS to Linux, and have settled on using KDE Plasma as my desktop environment. For the most part I’ve been comfortable with the change, but it’s always the small things that get me. For example, the Mail app built into macOS provides an “Unsubscribe” button for emails.
[…]Apparently this is also supported in some webmail clients, but I’m not interested in accessing my email that way. Unfortunately, I haven’t found an X11 or Wayland email client that supports this sort of functionality, so I decided to implement it myself. And anyway, I’m trying out Kontact for my mail at the moment, which supports plugins. So why not use this as an opportunity to build one?
↫ datagirl.xyz
Writing a Kmail plugin like this feels a bit like an arcane art, because the process is not documented as well as it could be, and I doubt that other than KDE developers themselves, very few people are interested in writing these kinds of plugins. In fact, I can’t find a single one listed on the KDE Store, and searching around I can’t find anything either, other than the ones that come with KDE. It seems like this particular plugin interface is designed more to make it easy for KDE developers to extend and alter Kmail than it is for third parties to do so – and that’s fine.
Still, this means that if some third party does want to write such a plugin, there’s some sleuthing and hacking to be done, and that’s exactly the process this article details. In the end, we end up with a working unsubscribe plugin, with the code on git so others can learn from it. While this may not interest a large number of people, it’s vital to have information like this out on the web for those precious few to find – so excellent work.
My most likely Thunderbird alternative in the post-Mozilla world. I’m one of those old school people who operate 6/7 emails for work and much prefer a desktop client than trying to juggle browser tabs. Unsubscribe is one of those underrated features that every client should have
Adurbe,
I prefer local email programs too. I’ve tried alternatives and kept coming back to thunderbird as it has more features that I want. If they had an android client I’d by using thunderbird there too! I also need a calendar solution that supports caldav, like the one bundled into thunderbird.
I have been experiencing trouble with OAUTH2 authentication connecting to an office365 account I need for work. It works for IMAP, but not SMTP.. It all used to work fine from thunderbird until one day microsoft made a change on their servers and I could no longer send emails. I’ve tried re-configuring it and no go. So I’ve had to resort to webmail to send emails for that account…. quite annoying. Are there any other thunder-bird users experiencing this?
One of these days I’ll try kmail again, I just like the features TB has.
I also prefer native email clients. My problem is that I seem to work from so many computers these days. I have multiple devices at home and professionally I go between three different devices that I have to use in different settings. It is important that I can pretty much walk up to any computer and go. For that reason, I have fallen back on web interfaces mostly.
I use Proxmox as well and have taken to creating various virtual desktops. I suppose I could create one for email and then access that from anywhere.
LeFantome,
I used to have this problem morose when I was frequently switching between windows and linux (ie I had a multihomed configuration). That was definitely a bit frustrating. Now that linux is my home base I basically work from one desktop and connect in to everything from there, so I don’t have this problem as much any more. (Although it comes up from time to time when I travel with a laptop).
It’s not a bad idea. The problem with running applications inside of virtual desktops is that we end up with window inside of a window syndrome and things like file transfers, copy/paste, screen shot and keyboard hot keys don’t work as well. If only someone could build a protocol, let’s call it ‘X’, that let us run remote GUI applications as though they were on the local desktop. It could even be integrated into SSH so that graphical programs just work from any host you SSH to. 🙂
I haven’t really done much with it since university, but when I was at university boy was X11 forwarding useful!
It’s legacy technology now, but are there modern replacements for this use case?
I’m pretty sure I did configure Thunderbird for Office 365 for one of my customers a few months back.
This SMTP client issue sounds familiar…
I think it was something like authentication only working with SMTPS on port 465, but not working with STARTTLS on port 587.
I never could stand the Thunderbird’s ugly, messy and unintuitive GUI, but many seem to like it.
Now that I think about it, I probably never enjoyed using an e-mail client at all, all of them are too bloated, too clunky or both.
> I never could stand the Thunderbird’s ugly, messy and unintuitive GUI, but many seem to like it.
I thought it was good around Thunderbird 2.x, but the switch to Thunderbird 3 forced tabs for everything and that’s when I lost interest. What a dumb move. At first, there were extensions and then CSS to revert to classic Thunderbird look but over time these stopped working. That’s pretty much when I gave up on it.
Thunderbird was always going to be crippled by Firefox interface changes. They like to pretend that they are streamlining or modernizing the interface every so often but really it’s just they have to rework whatever Firefox did in the latest ESR. I try from time to time but it’s lipstick on a pig. My webmail provider has a better, more accessible interface and it’s all just IMAP anyway. Why bother?
I liked Forte Agent (even for email) and Eudora 6 back in the day. On at least one account, I’m still using alpine, which hasn’t changed much in 30 years.
unix_joe,
I noticed this too. I assumed it was the byproduct of merging upstream changes from FF although I’m not sure. Everyone has different preferences and I completely understand why someone wouldn’t like thunderbird. I agree parts of the UI could be improved but I am accustomed to it anyway, haha.
Oh how I miss Eudora. We talk about the browser market a Lot but the email client has been completely crippled. Even Microsoft give Outlook away for free now (although tbh it’s more rebranded outlook express without a pro version).
Email Is hard, but it’s also still critical.
Nico57,
Thanks for the suggestions. You’re right I had been using STARTTLS. Now it goes through the motions but ultimately fails to authenticate. TLS to smtp.office365:465 doesn’t even respond to SYN. I tested it through a remote server and it is completely unresponsive there too.
Given that IMAP works fine, I had assumed SMTP should work too using the same login but maybe STMP can be administratively disabled separately from IMAP for some reason? If so that would explain why I can’t use SMTP anymore. The company uses outlook, but I work for them remotely and I don’t have outlook at home. So basically I’m on my own. Oh well, at least IMAP works.
Alfman, I have been using the TB add on “Owl for Exchange” for a few years. It also works on Betterbird which I prefer over TB. Few Euros a year. Updates itself and I can report it has not failed yet for my primary work account with 43, 938 emails. Also address book works (GAL).
FYI Thunderbird for Android released last month 🙂 https://blog.thunderbird.net/2024/10/thunderbird-for-android-8-0-takes-flight/
bed42,
Excellent! Thank you for posting this, I hadn’t seen this news.
Please note that Thunderbird for Android is just rebranded K-9 Mail, which Mozilla bought a while back. That’s fine if you already use or were interested in K-9, but apart from theming it’s nothing like desktop Thunderbird.
With that said I’m using it and it meets my needs for the 10 or so work and personal email accounts I use.
I think the reason you had a hard time finding documentation is because I don’t think many people use KDE’s PIM suite. I use KDE too and it never worked for me, so I don’t install it when setting a new system. I used to use claws mail, but they broke the GUI so now I use TB instead. Just take a look here https://bugs.kde.org/buglist.cgi?quicksearch=kmail
I think that one of the things that holds Plasma/KDE back is just how difficult it is to hack on, as this post makes clear.
I like kmail, and want to use it, but I want to be able to drag messages from the client and drop the into a file manager to save them in .eml files that have my preferred naming format. I have thousands of these files, and I don’t want to change the naming format now!
Well over 10 years ago., having never having looked at Evolution’s source code before, I spent about an hour and hacked five lines in Evolution to achieve the drag-and-drop result I wanted, and I have used the same changes in loads of Linux and FreeBSD installs ever since. Around the same time, I spent several days and had interaction with the Kontact developers to try to do the same with kmail, and got nowhere.
The Plasma/KDE classes and frameworks are very clever, but they are SO complex and SO difficult to get into – you have to know a vast amount just to do the simplest thing, as datagirl’s post shows. Unlike datagirl, I gave up and have never tried to hack in Plasma/KDE again.
I know that writing documentation is boring, but the lack of thorough documentation of the structure of Plasma/KDE is a real barrier to entry for would-be hackers, who are the potential future developers of the wonderful Plasma desktop.
> I want to be able to drag messages from the client and drop the into a file manager to save them in .eml files that have my preferred naming format.
I just tried that, dragging from kmail to Dolphin saves the email as a file in the directory.
Years ago I submitted a patch for autoattaching (and compressing) directories, the guys were very friendly, and the functionality is still there.
Your mileage apparently did vary :/
Kmail does allow drag and drop as a file, but I want the resulting filename to have a specific format:
yyyy-mm-dd_[email-subject].eml.
DnD from Evolution creates a meaningful filename. Although by default it does not fit into my email file naming scheme, it was easy to hack to make it fit in, so I always use a specially built version of Evolution that gives me the filenames I need.
With kmail, the dropped filename is derived from an internal message ID, which is not useful. If you could tell me how to hack Kmail such that the dropped filename be derived from the email metadata, I would be extemely grateful!
AlistairH,
I took a look at the source code briefly…but I really didn’t have the motivation, haha. However I did write a small perl script that converts all files in the directory to your desired format.
http://vocabit.com/osnews/kmail-rename.txt
It scans the directory on launch, and also waits for any new files so that you can drag files in and have them be renamed automatically. This seems to work well and actually makes it look like kmail output the filename itself. You could launch this as a system daemon. Since it uses inotify it should be very efficient left in the background.
You’ll probably want to “chdir” into a specific directly. It make sure not to overwrite existing files that might have the same date and subject since it seems like a plausible scenario in email threads. It could be improved by checking if the files contents are true duplicates and deleting those instead. Currently this is what happens if you keep dragging the same emails into the folder,
If it’s of any use at all let me know how it works out.
Wow, Alfman: that is a reply and a half!!! 🙂
Let me take a look – I am out of the office for a couple of days, but will certainly look into it in detail next week.
It’s already there: right click on any mailing list thread, Mailing list item, expand submenu, unsubscribe. It’s already there.
KMail is IMO the best mail client out there. And yes, I went through the akonadi birthing pains a decade ago.