Open Bug 1805738 Opened 3 years ago Updated 8 months ago

Repair folder on IMAP mailbox causes re-downloads emails, triggering filters that activate on downloading email

Categories

(Thunderbird :: Untriaged, defect)

Thunderbird 102
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: dcm-mozillabugzilla, Unassigned)

References

Details

(Whiteboard: [wontfix?])

Steps to reproduce:

Performed "Repair folder" on an IMAP mailbox. (This was necessitated due to ver 102 failing to properly render emails after an upgrade from ver 91, reported as a separate bug.)

Actual results:

The "repair folder" operation triggered a re-download of all the IMAP messages. The re-download triggered all mail filters that trigger on a mail message download. Some of those filters made copies of the mail messages into other mail folders. This resulted in duplicate messages at these destinations. Thunderbird does not prevent duplication of mail messages in a mailbox and has no native de-duplication capability. There is a plugin to remove duplicate messages, but any plugin carries privacy risks. (This is a general statement about plugins - I am not saying this very useful plugin has any privacy compromises.)

Expected results:

If a mailbox is re-fetching pre-existing contents to assist in re-establishing mailbox integrity (e.g. a repair folder operation), this should not trigger mail filters that are activated on mail download. A repair operation is not the same as an initial mail message download.

Thunderbird must have some type of anti-duplication code because when it re-fetches IMAP mail messages during a "repair filter", they are not duplicated in the original mailbox. On ANY write to a mailbox, including due to filters, similar anti-duplication logic should be used (but is not) - if there is a pre-existing message, a new duplicate copy should not be created. Alternatively, Thunderbird should have a native deduplication command to clean up the duplication messes it can sometimes create.

"Repair" does indeed cause a redownload. As far as I know that's the only way to ensure an imap folder will be properly repaired in as many situations as possible.

It would be worth testing how this triggers filters.

Whiteboard: [wontfix?]

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

"Repair" does indeed cause a redownload. As far as I know that's the only way to ensure an imap folder will be properly repaired in as many situations as possible.

But, they wouldn't be received as new messages through the inbox, and therefore filters would not be invoked. But it would refresh each folder's contents from the server.

It would be worth testing how this triggers filters.

So I take about back my implication that Thunderbird filters could be involved.

Perhaps the server caused the duplications.

See Also: → 1805725, 1805359
See Also: → 1978465
You need to log in before you can comment on or make changes to this bug.