I've been using KMail since I gave up XFMail in 1998. No particular problems, until . . .
I've been using ProtonMail since 2018. There is a utility called ProtonMail Bridge that runs on the local machine and unencrypts the mail so that a standard client can be used. It has behaved especially flakily in the last year or so. I raised the issue with the Proton people, who said that it works fine with Thunderbird. Which it might. I don't know and am disinclined to find out.
To use the bridge, one sets the mail client -- KMail -- to point to 127.0.0.1 and port 1143. Everything else is as though pointing to an ordinary mail server. It uses imap. I store mail in maildir format.
It sends and receives mostly just fine, with a few exceptions. The first is that it frequently, though not always, lists the same message twice in my KMail inbox, with the first listing being blank and undeletable. It shows as unread. The second listing is normal in every respect.
The second KMail oddity is that if I use the "mark all messages as read" option in the inbox, it marks all those messages as *unread* on my tablet and phone, which are using he native ProtonMail Android app (under GrapheneOS, no bridge required). Likewise, if I have read a message on, say, the tablet and then read the same message in KMail, it becomes unread again on the tablet.
All of this us over ProtonVPN as well.
So I'm trying to find out what Thunderbird does that KMail doesn't, or what KMail does that Thunderbird doesn't, and how I can set up KMail so that its behavior emulates that of Thunderbird.
Any expert on mail protocols here?
Thanks in advance.
On Fri February 6 2026 17:08:16 dep via tde-users wrote:
Any expert on mail protocols here?
(Postmaster since 1995)
Since you're using IMAP which handles multiple clients well I suggest you set up Thunderbird on the same box and see if it really does work with Proton and if so see if you can drill down and find the difference in how they behave.
--Mike
said Mike Bird via tde-users:
| On Fri February 6 2026 17:08:16 dep via tde-users wrote: | > Any expert on mail protocols here? | | (Postmaster since 1995) | | Since you're using IMAP which handles multiple clients well I suggest | you set up Thunderbird on the same box and see if it really does work | with Proton and if so see if you can drill down and find the difference | in how they behave.
Thanks. Installed Thunderbird. Forgot how much I utterly hate and despise Thunderbird. After an hour of remarkably colorful profanity, I've stopped poking around with it for now. Perhaps the mood to give it another try will return. At the moment it doesn't want to look at my main account but does want to tell me that the certificate for 127.0.0.1 has expired, which is kind of bizarre.
Thunderbird is what sent me to XFMail, which in turn sent me to KMail, which is kind of a Qt version of XFMail. Thunderbird sucked when it was part of Netscape and it sucks now.
On Sat February 7 2026 10:27:37 dep via tde-users wrote:
| Since you're using IMAP which handles multiple clients well I suggest | you set up Thunderbird on the same box and see if it really does work | with Proton and if so see if you can drill down and find the difference | in how they behave.
Thanks. Installed Thunderbird. Forgot how much I utterly hate and despise Thunderbird. After an hour of remarkably colorful profanity, I've stopped poking around with it for now. Perhaps the mood to give it another try will return. At the moment it doesn't want to look at my main account but does want to tell me that the certificate for 127.0.0.1 has expired, which is kind of bizarre.
I too greatly prefer TDE KMail to Thunderbird. Nevertheless Thunderbird may have yielded a clue.
Do you have an installed, configured, and up-to-date certificate for the IMAP server side of your ProtonMail Bridge? If not, can you connect to it from Thunderbird and KMail with clear IMAP rather than encrypted IMAP? (This should be safe as it's entirely within the one box.)
--Mike
First, trying to figure out the whole 127.0.0.1 certificate thing. 127.0.0.1 is a loop that remains on the local machine, so where the hell would it even get a certificate?
Second, and I am thinking I might be getting closer here, in that ProtonMail Bridge is secure from the local machine out into the great wide world, I shouldn't really need a secure connection from KMail to 127.0.0.1, which is the bridge. I wonder if I'm inserting something that needn't/oughtn't be there.
Does any of this make sense?
On Sat February 7 2026 14:15:53 dep via tde-users wrote:
First, trying to figure out the whole 127.0.0.1 certificate thing. 127.0.0.1 is a loop that remains on the local machine, so where the hell would it even get a certificate?
Second, and I am thinking I might be getting closer here, in that ProtonMail Bridge is secure from the local machine out into the great wide world, I shouldn't really need a secure connection from KMail to 127.0.0.1, which is the bridge. I wonder if I'm inserting something that needn't/oughtn't be there.
Does any of this make sense?
Yes. I agree that you do not need to secure IMAP between KMail and ProtonMail Bridge when they're communicating exclusively over loopback within the box.
--Mike
dep via tde-users wrote:
All of this us over ProtonVPN as well.
The VPN has nothing to do with it.
So I'm trying to find out what Thunderbird does that KMail doesn't, or what KMail does that Thunderbird doesn't, and how I can set up KMail so that its behavior emulates that of Thunderbird.
I guess you have problem with the indices on KMail side - probably because you are using the IMAP client on the phone and on the KMail. I suggest repairing the indices in KMail and then use only one client and see if the issue reoccurs. This could be still an issue in KMail for some reason.
It is just a guess
the directories are here .trinity/share/apps/kmail/imap/
I am not sure if you can delete the subfolder and they would be recreated.
I tried once ProtonMail, but it could not convince me that it would be more secure. I de/encrypt the mails locally.
BR
said deloptes via tde-users: | dep via tde-users wrote: | > All of this us over ProtonVPN as well. | | The VPN has nothing to do with it.
That's what I thought, but Proton seemed to think otherwise.
| > So I'm trying to find out what Thunderbird does that KMail doesn't, or | > what KMail does that Thunderbird doesn't, and how I can set up KMail | > so that its behavior emulates that of Thunderbird. | | I guess you have problem with the indices on KMail side - probably | because you are using the IMAP client on the phone and on the KMail. | I suggest repairing the indices in KMail and then use only one client | and see if the issue reoccurs. This could be still an issue in KMail for | some reason.
The indices in KMail seem to be just fine, in that I can use them to read mail going back to the fall of 1998 using them.
| It is just a guess
My sense is that KMail and ProtonMail differ in how they register that a message has been read. I was hoping to find out how KMail does this and whether there is some setting that I could change to bring it more in line with how it is done elsewhere. And yes, I suppose that it could simply be a bug in KMail, but I don't know enough to be able to pin it down.
Thanks!
dep via tde-users wrote:
My sense is that KMail and ProtonMail differ in how they register that a message has been read. I was hoping to find out how KMail does this and whether there is some setting that I could change to bring it more in line with how it is done elsewhere. And yes, I suppose that it could simply be a bug in KMail, but I don't know enough to be able to pin it down.
Well, AFAIK it should be a representation of the content on the server where the mailbox is present.
The Gemini says following, so may be you collect (sniff) the communication and see what is going on:
In the IMAP world, "reading" a message is all about a specific system flag called \Seen. Unlike POP3, which usually just downloads and forgets, IMAP stores the state of every message on the server so your phone, laptop, and tablet all stay in sync.
Here is the breakdown of how your client marks a message as read: 1. The Manual Method: The STORE Command
When you click on an email or manually mark it as read, your client sends a STORE command to the server. This command tells the server to add the \Seen flag to a specific message ID.
A typical command sent by your client looks like this: A001 STORE 42 +FLAGS (\Seen)
A001: A unique tag for the command.
STORE: The command to change message data.
42: The sequence number (or UID) of the email.
+FLAGS (\Seen): Tells the server: "Keep the existing flags, but add the 'Seen' flag."
2. The Automatic Method: The FETCH Side Effect
By default, most IMAP servers will automatically mark a message as read the moment a client asks to see the full body of the email using the FETCH command.
If your client sends: A002 FETCH 42 (BODY[TEXT]) The server sends the text back and immediately flips the \Seen flag to "on."
Pro Tip: If your client wants to preview a message without marking it as read (like a notification or a search preview), it uses a special command called BODY.PEEK. This tells the server: "Let me look, but don't touch the Seen flag."
3. Why is it still "Unread" on my other device?
If you read an email on your phone but it still shows as unread on your laptop, it’s usually because of one of two things:
The IDLE Command: Your laptop hasn't "checked in" with the server recently. Modern clients use the IDLE command to get real-time "push" updates from the server when flags change.
Read-Only Mode: If your client opened the folder in EXAMINE mode (read-only) instead of SELECT mode (read/write), any attempt to mark it as read will be rejected by the server.
Summary of System Flags
The \Seen flag is part of a "Big 5" set of standard IMAP flags:
\Seen: You've read it.
\Answered: You've replied to it.
\Flagged: You marked it for follow-up.
\Deleted: You put it in the trash (but haven't "purged" it yet).
\Draft: You haven't finished writing it.
Would you like me to show you the specific command to mark a message as "Unread" again if you accidentally clicked it?
dep via tde-users wrote:
The indices in KMail seem to be just fine, in that I can use them to read mail going back to the fall of 1998 using them.
Here some more from Gemini on this subject
when I see a message twice in my mailbox and the first one is just the title without a content, what could be the reason
This is a classic "Synchronization Ghost." In the world of IMAP, seeing a duplicate where one is "empty" (subject only) is almost always a sign of a local cache corruption rather than a problem with the actual email.
Here are the three most likely reasons: 1. The "Partial Download" Race Condition
Modern email clients (like Outlook or Apple Mail) often download the Headers (Subject, From, Date) first so you can see the list of mail quickly. They then try to download the Body in the background.
The Glitch: if the connection drops or the client "stutters" during that background download, it may lose its place. It creates a local entry for the header it already has, then starts over and creates a second entry for the full email.
The Result: You see two messages; one is a "hollow" shell (just the title), and the other is the complete email.
2. Index File Mismatch
Every IMAP client keeps a local database (a "hidden index") that links what you see on the screen to the data stored on the server.
If this index gets "confused" (common after an app crash or a sudden power loss), it may point two different index entries to the same server message ID.
Because one of those entries didn't finish its sync before the index broke, it shows up as having "no content."
3. Server-Side "Sent" Duplication
If this is happening in your Sent Items folder, it’s a specific IMAP behavior:
Some servers (like Gmail or Outlook.com) automatically save a copy of a sent message to the Sent folder.
Some email clients also upload a copy to the Sent folder by default.
Often, the "automatic" server copy appears instantly as a header, while the client's "uploaded" copy takes a few seconds to fully sync the body, briefly showing you two versions.
How to Fix It
You don't need to delete the "empty" one manually; it will usually just come back if you don't fix the underlying index.
The "Repair" Method: Right-click the folder (Inbox/Sent) and look for "Properties" or "Account Settings." Look for a button that says "Repair Folder" or "Rebuild." This forces the client to delete its local index and re-download the list from the server.
The Webmail Check: Log into your email via a browser (e.g., Gmail.com, Outlook.com). If you only see one message there, you know for certain the problem is just your local app and your actual mailbox is safe.
The "Peek" Setting: If this happens constantly, check your client settings for something called "Download full messages" or "Always keep a copy for offline use." Enabling this ensures the client doesn't just grab the headers and leave the body for later.
Which email app are you using (Outlook, Apple Mail, Thunderbird)? I can give you the exact steps to "Rebuild" your index for that specific program.
I am using an older KDE3 KMail client
Since you are using an older KDE3 KMail (KMail 1.x), you are working with a classic piece of software that pre-dates the modern Akonadi database system. In this specific version, the "Subject without content" bug is almost always caused by a corruption of the index files (.index).
KMail 1.x stores your emails in a standard directory structure (usually Maildir), but it creates separate index files to make searching and scrolling fast. When these files get out of sync, KMail "thinks" a message exists because it's in the index, but it can't find the corresponding body file. The Fix: Force a Rebuild
You can safely delete the index files. KMail will see they are missing the next time you open the folder and will recreate them from the actual email files.
Close KMail completely.
Open your terminal or file manager (Konqueror) and navigate to your mail folder. By default, this is: ~/.kde/share/apps/kmail/mail/
Navigate into the specific folder giving you trouble (e.g., inbox).
Look for files ending in:
.index
.index.ids
.index.sorted
Delete these three files. (Do not delete the files in cur/, new/, or tmp/—those are your actual emails).
Restart KMail. It will take a moment to "scan" the folder, and the duplicates/empty messages should vanish.
Why this happens in KDE3 KMail
The "UID" Conflict: If you are using IMAP, KMail assigns a Unique ID to every message. If the server changes those IDs (common if the server had a glitch or you moved messages between folders), the old .index file still holds the old ID. KMail displays the cached "Subject" from the index, but when you click it, the body "fetch" fails.
Interrupted Sync: If KMail was closed or crashed while downloading headers, it may have written the header to the index but failed to write the actual message file to your disk.
Maildir vs. MBOX: If you are using the older MBOX format (one giant file for all emails) instead of Maildir, index corruption is even more common. Moving to Maildir (one file per email) is the "pro move" for KMail stability.
One Specific KDE3 Setting to Check
In KMail 1.x, go to Settings > Configure KMail > Network > Receiving.
Check your account and look for "Local Subscription" or "Message Cache" settings.
If you have "Download all messages for offline use" turned off, KMail only keeps the headers. If your connection flickers, it can create these "phantom" entries.
said deloptes via tde-users:
First, thanks very much for doing the research on this. You were better at figuring out the question than I was. After some fiddling I've gotten it so that a message read one place is read everywhere.
The "ghost" messages, though, remain. Deleting the .index files doesn't seem to have solved the problem.
I'll keep poking at it.
In other news and in case anyone here has done this and has advice to offer, I just took a bit of a plunge, to wit, signing up for Starlink. Frontier Communications, until recently the worst company in the world, was bought by Verizon, the new worst company in the world. Same bad service but now costing one-third more. Turns out that Starlink is cheaper than Verizon and has more bandwidth. Hoping I won't have to cut down too many trees. Apparently I can also do VoIP and keep my current number. It will be a happy day when I can send notice to Verizon, something involving the horse they rode in on . . .