Closed Bug 1864870 Opened 2 years ago Closed 1 year ago

onNewMailReceived and onMoved not fired for messages moved to Inbox sub-folders by filters upon reception

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 115
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1836511

People

(Reporter: rste79, Unassigned)

Details

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

Steps to reproduce:

I have added a listener to the onNewMailReceived and onMoved event

browser.messages.onNewMailReceived.addListener((folder, messages) => {
console.log("onNewMailReceived")
});

browser.messages.onMoved.addListener((originalMessages, movedMessages) => {
console.log("onMoved")
});

Actual results:

The onNewMailReceived event is fired only for emails that are received and that are not moved to other Inbox sub-folders by filters.
The onMoved event is never fired.

Expected results:

The onNewMailReceived should be fired for all incoming emails and the onMoved event should be triggered for the emails moved by filters.

Is this being observed on a POP account?

(In reply to John Bieling (:TbSync) from comment #1)

Is this being observed on a POP account?

Yes: this happens on a Gmail POP account.

I have this issue on Dovecot IMAP account with 115.11.0 on linux. I use simple filtering based on From: and move filtered messages to other folders on same IMAP server.

I have seen this while I test https://addons.thunderbird.net/en-us/thunderbird/addon/scriptable-notifications/ and even my simple test extension:

messenger.messages.onNewMailReceived.addListener(async (folder, messages) => {
console.log('New mail.');
})

shows the same problem.

onNewMailReceived event is fired for other folders only sometimes (seems only once after any folder with previsously incoming message is selected in GUI) and only on inbox seems always reliable. Set "When getting new messages for this account, always check this folder" for folders do not help.

If any folder with previsously incoming message is selected in GUI and even I not checked new messages in this folder, then next incomming message filtered to any folder trigger onNewMailReceived event and listener receive many "waiting" events, one for every folder contains incoming message, but messages event object of this events do not even contains every incoming message in every paricular folder.

Also I have tested 128.0b1 and have same issue, even with new monitorAllFolders parameter for onNewMailReceived.

It can be indeed closed as duplicate of https://bugzilla.mozilla.org/show_bug.cgi?id=1836511

Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1836511
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.