Note: There are a few cases of duplicates in user autocompletion which are being worked on.

"delete from server" filter option should be removed for IMAP accounts

RESOLVED FIXED in Thunderbird 13.0

Status

MailNews Core
Filters
RESOLVED FIXED
6 years ago
5 years ago

People

(Reporter: Johannes Linke, Assigned: aceman)

Tracking

Thunderbird 13.0

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

1.58 KB, patch
Bienvenu
: review+
Details | Diff | Splinter Review
(Reporter)

Description

6 years ago
when i tested it, the filter option "delete from server" did not do anything on IMAP accounts.

in my understanding, an IMAP account in thunderbird should be a "mirror" of the server content. therefore, the description "delete from server" is similar to "delete the message".

i suggest removing the "delete from server"-filter option for IMAP accounts, as it does not work and if it would, it would do the same as "delete the message".
(Assignee)

Updated

6 years ago
Component: General → Filters
OS: Windows 7 → All
Product: Thunderbird → MailNews Core
QA Contact: general → filters
Hardware: x86_64 → All
(Assignee)

Comment 1

6 years ago
The action is even called "Delete from POP server".
There is a similar one "Fetch from POP server".

I can't judge if the actions are really unreasonable on IMAP therefore I need confirmation from dbienvenu. I can then look at this.

It actually should be enabled only for POP3 as per this file:
http://hg.mozilla.org/comm-central/file/ae193b5797b8/mailnews/base/search/content/searchWidgets.xml#l67

Maybe the determining if this account is POP3 has broken.
Assignee: nobody → acelists
(Assignee)

Comment 2

6 years ago
Can you try some older builds to when this started to appear?
(Assignee)

Updated

6 years ago
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Assignee)

Comment 3

6 years ago
I smell a regression here, just opening the filter list dialog
throws several errors in the Error console, like this:
Timestamp: 24.2.2012 16:19:25
Error: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIMsgFolder.getStringProperty]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://messenger/content/folderPane.js :: getSmartFolderName :: line 2468"  data: no]
Source File: chrome://messenger/content/folderPane.js
Line: 2470

Can well be some of my recent patches (the afolder one, or some of the null-args).

However, the reporter filed this under TB10 and those patches are in TB13.

Reporter, what is your exact Thunderbird version?
Keywords: regression, regressionwindow-wanted
(Reporter)

Comment 4

6 years ago
10.0.2

i can try older builds tomorrow, if that is still wanted.
(Assignee)

Comment 5

6 years ago
OK, then I must be seeing something else (I am on TB13).

I can check in TB10 myself, you don't need to do anything now. But the problem still persists in TB13, it just is some other breakage.
(Assignee)

Comment 6

6 years ago
Great I now can't even see those errors again.

Can it be those only appeared because I created an IMAP account and didn't restart TB? After restart, no signs of those messages.

But the "Delete from POP server" action bug is there.
(Assignee)

Comment 7

6 years ago
Those items are hidden for News, but are not for IMAP and RSS.
News specific items are enabled fine when needed.
(Assignee)

Comment 8

6 years ago
So maybe enabling those items when Components.interfaces.nsMsgSearchScope.offlineMailFilter = true is no longer enough? Can it test some other property?

Comment 9

6 years ago
you'd need to check the server type. The scope for terms is the same because the filter is run locally, but the actions more depend on the server type.
(Assignee)

Comment 10

6 years ago
Thanks, but there doesn't seem to be server type attribute in nsMsgSearchScope.

Comment 11

6 years ago
(In reply to :aceman from comment #10)
> Thanks, but there doesn't seem to be server type attribute in
> nsMsgSearchScope.

right, but the filter widget does know the incoming server type, iirc.
(Assignee)

Comment 12

6 years ago
Created attachment 600525 [details] [diff] [review]
check for .server.type

What about this?
Attachment #600525 - Flags: review?(dbienvenu)
(Assignee)

Comment 13

6 years ago
Maybe this broke when IMAP got offline searching? Was there a point when that changed?
Status: NEW → ASSIGNED
Keywords: regression, regressionwindow-wanted

Comment 14

6 years ago
Comment on attachment 600525 [details] [diff] [review]
check for .server.type

that does work better, but you'll still have an issue with the global inbox, i.e., the local folders inbox. Filters are supposed to run for all the pop3 accounts that put their mail into the global inbxox, and with this patch, you can't have a local folders filter that deletes pop3 mail from the server. In theory, I suppose you could check if the folder.server.type is also mailbox:

Let me know if you need more info about the global inbox...
Attachment #600525 - Flags: review?(dbienvenu) → review-
(Assignee)

Comment 15

6 years ago
Thanks. If I only check for "mailbox" it will also match RSS feeds.

Should I check for "mailbox" but exclude RSS? Would that be proper check?

Comment 16

6 years ago
(In reply to :aceman from comment #15)
> Thanks. If I only check for "mailbox" it will also match RSS feeds.
> 
> Should I check for "mailbox" but exclude RSS? Would that be proper check?

I thought rss accounts had an "rss" type
(Assignee)

Comment 17

6 years ago
Yeah, that was my first try, I checked for "mailbox" but it was true also in RSS. The prefs.js file confirms it too. So I switched to "pop3".

Comment 18

6 years ago
my rss feed server type is "rss".
(Assignee)

Comment 19

6 years ago
Server.type yes, but then that never returns "mailbox" for anything.
Server.localStoreType is "mailbox", for pop3 and RSS. Or am I missing something?

So what I am proposing is:
(gFilterList.folder.server.localStoreType == "mailbox") &&
(gFilterList.folder.server.type != "rss")

Comment 20

6 years ago
(In reply to :aceman from comment #19)
> Server.type yes, but then that never returns "mailbox" for anything.
> Server.localStoreType is "mailbox", for pop3 and RSS. Or am I missing
> something?
> 
> So what I am proposing is:
> (gFilterList.folder.server.localStoreType == "mailbox") &&
> (gFilterList.folder.server.type != "rss")

Oh, sorry, didn't realize you were talking about localStoreType.

that would work, or I think you could simply check

server.type=="pop3" || server.type=="none" because the local folders account has type "none"
(Assignee)

Comment 21

6 years ago
Created attachment 601000 [details] [diff] [review]
patch v2

You started talking about localStoreType (or "mailbox" that is only returned from this attribute) :)
Attachment #600525 - Attachment is obsolete: true
Attachment #601000 - Flags: review?(dbienvenu)

Comment 22

6 years ago
(In reply to :aceman from comment #21)
> You started talking about localStoreType (or "mailbox" that is only returned
> from this attribute) :)

my mistake, I meant to say server.type "none"

Comment 23

5 years ago
Comment on attachment 601000 [details] [diff] [review]
patch v2

yes, thx, this seems to do the right thing.
Attachment #601000 - Flags: review?(dbienvenu) → review+
(Assignee)

Updated

5 years ago
Keywords: checkin-needed
http://hg.mozilla.org/comm-central/rev/36757b575b09
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
You need to log in before you can comment on or make changes to this bug.