Bug: Download prevention for messages over specified size can lead to redundant filter copy function to local folder and failed subsequent copies to same folder.
Status: UNCONFIRMED
Priority: --
Created: 2022-05-12 23:24:41+00:00
Resolved: 2022-06-20 09:15:26+00:00

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

Steps to reproduce:

Detailed Description of problem:
I have a 5000K size limit set for downloading messages from my Pop server.
I have a Filter configured to copy all incoming messages to a local folder, "Saved Incoming".
If I receive a message > 5000K, the truncated message appears in both my Inbox and Saved Incoming folder, and my filter processing continues normally for messages received from that point onward, as well as for subsequent fetches from the mail server.
However, once I return to the truncated large message, open it, and click on the link to download the remainder of the message, subsequent messages are no longer copied to the Saved Incoming folder.
Clicking on the link to download the remainder of the truncated message results in only a single copy of the now large complete message in my Inbox, however it results in TWO copies of the message in the Saved Incoming folder; one the truncated message, and the second the large complete message, since the Filter was run a second time to receive the complete message.
I suspect that this duplicate message entry somehow corrupts the Saved Incoming folder, preventing subsequent copies to that folder from completing.
An Exit and restart of Thunderbird "clears" this problem and the Filter copying to Saved Incoming again becomes functional.
Through all of this, the Filter Log indicates that every message is copied to Saved Incoming, even those messages which failed to copy.

Setup:
POP server.  Local mail folders.
Tools / Account Settings / Disk Space / Do not download msgs > 5000KB.
Set up a filter which copies all incoming messages to a Saved Incoming folder.
I accomplish this with:
Match / All of the following / Size > 0 / then copy to Saved Incoming folder.

Steps to Reproduce:
Note: "large" message is > 5000K. "small" is anything smaller.
1) Receive a small / large / small message, in that order, from the Pop email server.
2) Open the large message and click on the link to download the remainder of the truncated message.
3) Receive a fourth message (small).


Actual results:

Actual Results:
The Filter to copy incoming messages to the Saved Incoming folder copies:
- the first (small) message
- the second (large, truncated) message
- the second (large, complete) message
- the third (small) message
These messages are copied to the Saved Incoming folder.
The fourth (small) message is NOT copied to the Saved Incoming folder.

Polling the server and receiving subsequent messages results in no additional messages being copied to the Saved Incoming folder, although the Filter Log indicates they are being processed and copied.


Expected results:

In addition to copying these first three messages to the Saved Incoming folder: 
1st (small)
2nd (large) - perhaps both the truncated and the full size message?
3rd (small)
... the Filter should have copied the 4th (small) message to the Saved Incoming folder, and it should continue to function for all subsequent incoming messages, copying them to the Saved Incoming folder.
It did NOT copy the 4th nor any subsequent messages to the Saved Incoming folder.

Workaround:
I set up a new filter and placed it at the top of the Filter order:
If size > 5000K, halt filter execution.
In addition, I must remember for such truncated messages to manually do whatever activities my filters were doing.