Closed Bug 225021 Opened 21 years ago Closed 21 years ago

\Deleted and \Seen flags should be set if message is moved to another folder

Categories

(MailNews Core :: Networking: IMAP, defect)

1.0 Branch
x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: holger, Assigned: Bienvenu)

References

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6a) Gecko/20030923 Firebird/0.7+ Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5) Gecko/20031013 Thunderbird/0.3 If a message is moved from an IMAP Inbox to another folder with Junk Mail Controls or Message Filters, only the "\Deleted" flag is set for this message in Inbox. When you then access the same Inbox with other programs, they report that you have "...XY unread messages..." even if it is empty. This happens until the folder is expunged. This is really confusing if you use a biff-like tool to monitor your IMAP account. Some (most?) of them use the IMAP command STATUS foldername (UNSEEN) to get the count for unread messages. However, this also counts all messages that are moved/deleted, because Thunderbird doesn't set the "\Seen" flag for the "\Deleted" message. Reproducible: Always Steps to Reproduce: Expected Results: Both the "\Deleted" *and* the "\Seen" flags should be set for messages in the source folder after they are moved to the target folder.
.
Assignee: mscott → bienvenu
Component: Mail Window Front End → Networking: IMAP
Product: Thunderbird → MailNews
QA Contact: gchan
Version: unspecified → 1.0 Branch
Attached patch set \Deleted and \Seen flag (deleted) — Splinter Review
patch the sets both \Deleted and \Seen flags
It is seen not only with other tools, but with Mozilla Mail too. It show unread deleted message number in INBOX, although they have been moved to another folder, and switches to them when I press "Go to the next unread message". But I think the effect exists only when option "When I delete a message" is set to "Mark it as deleted".
do other imap clients set the /SEEN flag when doing a move? I'm not sure it's the right thing to do in general, but I understand why you want filters to do it.
> do other imap clients set the /SEEN flag when doing a move? Yes, at least Outlook Express does it. > I'm not sure it's the right thing to do in general Why not? If a message is moved with Mozilla/Thunderbird, it is no longer visible in the source folder message list and there is no way to access or undelete this message. So there is no reason to preserve the status of the flags and I can't see any problems if we set the \Seen flag for all moved messages.
You can undo the delete/move. Which won't remove the /SEEN flag if you remove it.
Yes, you can undo the move/delete, but only for *manually* moved/deleted messages. If you manually move/delete a message you read it before, and the \Seen flag is already set. It doesn't matter if we set it again or not. And even if you move an unseen message and then undo the move - you end up with an *unseen* deleted message in the *target* folder if the \Seen flag is not set together with \Deleted...
>Yes, you can undo the move/delete, but only for *manually* moved/deleted >messages. If you manually move/delete a message you read it before, and the >\Seen flag is already set. It doesn't matter if we set it again or not. No, you can select multiple messages w/o reading all (or any) of them and do a move/delete that way. Which is not to say that I'm not going to do what you propose, but we should all be aware of the issues.
Latest Thunderbird build has a new option "Mark message read after displaying for xy seconds". This is great, but if I quickly delete or move some messages without waiting this time they remain in the source folder as deleted and unseen... This is even more annoying. I still think that it's safe to set the \Seen flag for all moved/deleted messages.
I vote for this too. This helps avoiding bogus new mail notifications (which I think is a flaw in the IMAP RFC, but there's nothing we can do about it).
Comment on attachment 135012 [details] [diff] [review] set \Deleted and \Seen flag OK, I'll try this patch and check it in. Thx!
Attachment #135012 - Flags: superreview+
fix checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Hopefully this will also help my situation (using IMAP deleted model, message was filtered into another folder, but still counted as unread in Inbox).
thx for suggesting this - it makes so many problems go away!
fixed on m4 branch
I use filters to move my mail to different mailboxes, but I *do* want to see how many unread messages I have while using my mail checker. I want to know how many I haven't seen, so therefore, the filtered mail should not be marked as seen. This should be an option, right, because it's a matter of opinion.
Blocks: 242136
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: