Closed Bug 1662692 Opened 5 years ago Closed 5 years ago

icons show forward and replied even though message was only forwarded (protonmail-bridge imap server on localhost)

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 81
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: musiquegraeme, Unassigned)

References

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0

Steps to reproduce:

I forwarded an email to someone else

Actual results:

The icon seemed to show that the email had been BOTH forwarded and replied to but I had NOT replied to it.

Expected results:

The icon should have only shown that the mail was replied to.
I tried replying to a message and it showed correctly although I tried forwarding a message I had written to myself and it showed only the "Replied to" Icon...?

I'm not seeing this when using 81.0b2.

DOes it reproduce in safe mode?

So I looked at emails that I've filed and it seems that all that is there is the replied icon whether I replied to them or forwarded them.. Normally there is an arrow to the right when you forward it and an arrow to the left when you reply.. Is that right...

I also tried it with safe mode and got the same result and I'm using 81.0b2?

I sincerely doubt this is our issue. Maybe a server thing?

Does it happen in a new profile?

Severity: -- → S4
Component: Untriaged → Folder and Message Lists
Flags: needinfo?(musiquegraeme)
Summary: icon for mail forwarded incorrect → icons show forward and replied even though message was only forwarded

This is what I see. Might it be to do with IMAP?

Flags: needinfo?(musiquegraeme)

Tried the same thing on two POP3 accounts and the icons were as Wayne showed above. So either it is the IMAP situation or it is the server as Wayne suggests.:(

Presumably this is not happening with gmail, what is the mail provider, and imap server name and version?

Flags: needinfo?(musiquegraeme)

The arrow should depend on whether flag $Forward or flag Answered are stored. Tb stores $Forward when forwarding a message and Answered when replying. Both arrows should not appear simultaneously for the single action.

Reporter, are you saying they both appear immediately after you forward the message. Or are you saying you see them both only after tb is restarted? This is important to know.

Also, are you seeing this on Inbox or another folder you created? I forwarded a message from a random folder I created and the $Forwarded flag was never stored at all by tb. I immediately saw the right-arrow on the message but on tb restart it went away since the tb never stored it. Tb did store $Forwarded when forwarded from Inbox and only the right-arrow appeared on tb restart. Not sure is this is expected behavior and probably not relevant to this bug report.

Reporter, please add a column to your message list called "Order Received" and note the number of the problem message with both arrows. Then restart tb while recording an IMAP:5 log as described here: https://wiki.mozilla.org/MailNews:Logging keeping the problem folder with the double arrows in view. This will show if the server is reporting both flags $Forwarded and Answered on the problem message number. You can also record a log showing what happens when you forward a different message, noting its number too, which will show if tb is storing both flags or just the $Forwarded flag as it should. (When I look at my log I only see $Forwarded set and not Answered.) Be sure to note in the comment the number(s) of the problem message(s) based on the "Order Received" column.

(In reply to Wayne Mery (:wsmwk) from comment #8)

Presumably this is not happening with gmail, what is the mail provider, and imap server name and version?

The mail provider is ProtonMail. The IMAP Server Name is 127.0.0.1 which another way of saying that it is ProtonBridge I think. This is now at version 1.5.0.

I see the two arrows immediately after I forward the message. I normally see this in Inbox, because I normally forward from the Inbox but I tried just now on an folder and got the same result. I restarted TB and both the arrows were still there.

I ran TB with the IMAP log as you asked. The output showed no sign of the order of the email received with was - 757
2020-11-16 15:03:03.746000 UTC - [(null) 5128: IMAP]: D/IMAP SetConnectionStatus(0x0)
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: I/IMAP 1BA96000:127.0.0.1:S-Sent:STREAM:OPEN Size: 21012: Begin Message Download Stream
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP PARSER: msg_fetch_literal() chunking=false, requested=0, receiving=625
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=20D2B3A0 nb=50 needmore=0]
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: I/IMAP 1BA96000:127.0.0.1:S-Sent:CreateNewLineFromSocket: From: "xxxxx" <xx@xxx.xxx>

2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP SetConnectionStatus(0x0)
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=20D2B3A0 nb=48 needmore=0]
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: I/IMAP 1BA96000:127.0.0.1:S-Sent:CreateNewLineFromSocket: To: "xxxxx" <xx@xxx.xxx>

2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP SetConnectionStatus(0x0)
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=20D2B3A0 nb=45 needmore=0]
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: I/IMAP 1BA96000:127.0.0.1:S-Sent:CreateNewLineFromSocket: Subject: Fwd: Summary for Add-on Developers

2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP SetConnectionStatus(0x0)
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: D/IMAP ReadNextLine [rv=0x0 stream=20D2B3A0 nb=39 needmore=0]
2020-11-16 15:03:03.747000 UTC - [(null) 5128: IMAP]: I/IMAP 1BA96000:127.0.0.1:S-Sent:CreateNewLineFromSocket: Date: Mon, 16 Nov 2020 15:02:50 +0000
As far as I can see all messages I forward in the IMAP account have this problem.

Flags: needinfo?(musiquegraeme)

Interesting. So you are running the proton-bridge app on localhost which acts as an imap server for protonmail. I don't have a paid account so I can't set this up to test myself.

So the problem message is number 757 (UID 757 in imap parlance). The log fragment you show seems to be receiving an email. It doesn't show where the message flags are fetched. This will occur after tb start and you select the Inbox folder before any actual messages are fetched.

It might be better to attach the complete log that you record after starting tb and selecting inbox containing message UID 757. Probably no need to open any specific message since the arrows are just based on the fetched message flags.

You will see something like this requesting the flags:

2020-11-16 18:17:17.803576 UTC - [(null) 17983: IMAP]: I/IMAP 0x7fb040195800:mobile.charter.net:S-INBOX:SendData: 12 UID fetch 1:* (FLAGS)

Followed by the flags for each message (by UID) in Inbox:

2020-11-16 18:17:18.273152 UTC - [(null) 17983: IMAP]: I/IMAP 0x7fb040195800:mobile.charter.net:S-INBOX:CreateNewLineFromSocket: * 1 FETCH (FLAGS (\Seen) UID 3412)
2020-11-16 18:17:18.273238 UTC - [(null) 17983: IMAP]: I/IMAP 0x7fb040195800:mobile.charter.net:S-INBOX:CreateNewLineFromSocket: * 2 FETCH (FLAGS (\Seen) UID 3413)
:
2020-11-16 18:17:18.593783 UTC - [(null) 17983: IMAP]: I/IMAP 0x7fb040195800:mobile.charter.net:S-INBOX:CreateNewLineFromSocket: * 4147 FETCH (FLAGS (\Seen \Answered $Forwarded) UID 19453)
:

The last one above shows an example for UID 19453 that has forwarded and answered both set. So if you see something like that for your UID 757 then the problem is probably with the proton-bridge server.

Summary: icons show forward and replied even though message was only forwarded → icons show forward and replied even though message was only forwarded (protonmail-bridge imap server on localhost)

Proton mail was kind enough to provide me with a free, time-limited account with connection via proton-bridge enabled. I cloned the latest github version of proton-bridge and built the application locally.

What I see with IMAP:5 log is that when I forward a message from tb's ProtonMail (PM) Inbox, tb set no flags on the message via imap, not even $Forwarded or any flag containing the string "forward". This is because PM doesn't list $Forwarded or anything similar in its PERMANENTFLAGS response to imap SELECT. PM also doesn't allow "user defined keywords" so $Forwarded is never stored on the message. Also, since no flags are stored by tb, the "Answered" flag (indicating message was replied to) is never stored. Answered is also not in the list is PM's PERMANENTFLAGS.

So, even though tb is unable to store a flag on the imap server that the message has been forwarded, it still keeps track of this by storing the forwarded state info in the local database entry for the message. So on tb restart or re-access to the Inbox folder, the forward arrow still appears even though the fetch of flags from the server does not contain this information.

The problem (this bug) occurs because after the message is forwarded, tb then, as it should, fetches the flags for the message. But the PM server returns the "Answered" flag in the response which is incorrect. "Answered" is a standard flag that indicates the message has been replied to. It should not be set when the message has only been forwarded. On tb restart, the flags for all messages are fetched and the "Answered" flag appears, incorrectly, for all messages that have only been forwarded. So, since tb knows the message has been forwarded (based on its database) and it sees the "Answered" flags incorrectly returned by the PM server, both arrows appear when only the "forwarded" right-facing arrow should appear.

PM also provides an "All Mail" folder like gmail. In this folder the messages that were forwarded from Inbox show only the left-facing "Replied" arrow. This is expected because these messages don't have the "Forwarded" attribute set in their database while PM returns the incorrect "Answered" flags for these too.

So I will close this bug as INVALID and post a bug report at https://github.com/ProtonMail/proton-bridge
Edit: I posted the bug report here: https://github.com/ProtonMail/proton-bridge/issues/133

Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
See Also: → 1798174
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: