Closed Bug 681474 Opened 13 years ago Closed 8 years ago

Filters are applied to autosaved draft emails

Categories

(MailNews Core :: Filters, defect)

x86
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: heapifyman, Unassigned)

References

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.854.0 Safari/535.2 Steps to reproduce: I have an IMAP account with several folders. Also I have for almost each of these folders a filter that moves incoming mail to the folders depending on e.g. whether the subject contains a certain term. I also set the preference to store answers to an email in the email's folder. When I reply to an email in one of those imap folder for which I have a filter, the following happens Actual results: When the autosave functionality for the draft email reply kicks in, it stores the draft in the "Drafts" folder. Then my filter is apparently applied to the draft email in the Drafts folder and the draft is stored in my IMAP folder - I see a log event like "Moved 1 email from Drafts to <FOLDER>. This happens for each of the autosaved drafts. If composing the reply email takes some time, my IMAP folder is cluttered with draft replies, which are also not automatically deleted after I send the reply mail. This also happens in save mode with all extensions disabled. Deleting and re-implementing all filters also did not change anything in the behaviour described above. Expected results: Filters should not be applied to the Drafts folder. Drafts should stay in the Drafts folder and be deleted after the final mail has been sent.
OS: Mac OS X → Windows 7
Steps to reproduce: - in your IMAP account's settings -> Copies and Folders -> check "Store replies in orginal mail's folder" (not sure if that is the correct English translation - using German version - but you'll understand I guess) - create IMAP folder "testfolder" - set view options for that folder to "sort by date descending, group by subject" - create filter: if subject contains "testfolder" move email to "testfolder" - minimum one condition has to be fulfilled, apply filter at: "Checking messages (after Junk filter) or when manually checking messages" (again not sure about the English translation) - receive email with "testfolder" in the subject line - go to folder "testfolder" - reply to email with "testfolder" in subject line and write something - wait till autosave kicks in - check in Tools->Activities log: there should be a message saying something like "Moving 1 message from Drafts to "testfolder"
Component: General → Filters
Product: Thunderbird → MailNews Core
QA Contact: general → filters
Do you have extension installed ?
I do have several extensions installed, among them enigmail and lightning. However, I tried with Thunderbird in Safe Mode and all extensions disabled, which showed the same behaviour (as mentioned in above bug description). What I haven't tried yet is using a fresh new profile
Status: UNCONFIRMED → NEW
Ever confirmed: true
Good that you tried safe mode, but what addons do you use? ALso, are you absolutely sure the draft is saved in Drafts folder? You should see the Draft folder message count increase. If the answer is no, given the steps listed the fault here is not Filters. these dialogs have been known to lie - for example that Draft got saved to the wrong place along the lines of Bug 257735 - Drafts wrongly saved to sent folder after failing and retrying. However, bug 257735 is fixed and I don't see any matches to open bugs from https://bugzilla.mozilla.org/buglist.cgi?type1-0-0=substring&list_id=1988143&short_desc=draft%20sav&field0-0-0=short_desc&bug_severity=major&bug_severity=normal&type0-0-1=substring&field0-0-1=keywords&type1-0-1=allwordssubstr&resolution=---&resolution=FIXED&classification=Client%20Software&classification=Components&chfieldto=Now&query_format=advanced&chfieldfrom=2009-01-22&short_desc_type=allwordssubstr&type0-0-0=anywordssubstr&value0-0-0=wrong%20local%20templat%20inbox%20folder%20mult%20sent&field1-0-0=short_desc&product=Core&product=MailNews%20Core&field1-0-1=short_desc Also, I use those settings and have never seen this problem. heapifyman, can you attach an imap protocol log of this action please? use imap:5 per https://wiki.mozilla.org/MailNews:Logging
I'm not a hundred percent sure if the draft is saved in the draft folder and then moved to one of my other folders. But actually that is not the real problem. The problem is that the drafts end up in the other folder and do not get deleted when finally sending the email. Thus, when composing an email takes some time and the email draft is autosaved 5 times I end up with 5 draft emails in my folder, plus the email reply that was really sent. Example: 1. I have received an email with subject "X" 2. I have an IMAP folder named "Y" and a filter that moves incoming emails with subject "X" to folder "Y" 3. I compose a reply to the email in folder "Y" 4. Composing the reply takes some time, the draft is autosaved 5 times 5. I finish and send the reply Result: folder "Y" now contains the original email, my 5 autosaved draft replies and my actual reply. I could live with the draft being saved in the folder and not in the "draft" folder, if the drafts would get deleted when finally sending the message. I'm sorry if the original bug report was not clear and I hope this clarifies things.
heapifyman, comment 5 is already reported as a different bug. Please try a new profile (keep the old one) and report your results please. see https://support.mozillamessaging.com/en-US/kb/Using+Multiple+Profiles
Status: NEW → UNCONFIRMED
Ever confirmed: false
We face the same problem here. We've got a filter to dispatch incomming mails from our companies (8) in specific folders. Each time a draft is saved, the filter moves it to the imap folder of the writer's company, instead of leaving it in the draft folder. If automatic saving is on, and you spend time writing the mail, you may have several copies in the destination folder (one per save).
Hurrican39, do you stil see this problem when using a current version 45? Or better yet, a current beta from http://www.mozilla.org/en-US/thunderbird/channel/ (The reporter, heapifyman, no longer uses thunderbird.)
Flags: needinfo?(jmgigandet)
See Also: → 1197782
Summary: Filters are applied to draft emails → Filters are applied to autosaved draft emails
Just made a try with version 45.4.0 and it seems to be fixed. Filter is not applied when Autosave is called. There's only one copy of the saved document in the Drafts folder after multiple autosave.
Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Flags: needinfo?(jmgigandet)
Resolution: --- → WORKSFORME
I'm using TB50 and this thing just happened to me. I worked around it by adding a "sender is not me" condition to my filter. I have quickFilters module installed.

Still seeing this on 60.5.1 with an IMAP account. Also filters randomly skip messages on startup, but work properly on manual run.

"sender is not me" workaround works for drafts.

This is NOT fixed. Running Version 60.7.2 on Win10Pro.

Have a filter that filters for a word in subject. When I create a email, the email is in Draft and I see it move into my folders multiple times. Please reopen!

Just tried again with TB 60.8.0 (64-Bit) on macOS Mojave 10.14.5.

Draft emails are stored in Drafts folder only. After sending the email all drafts are correctly deleted from Drafts folder and "testfolder" only contains the actually sent reply.

But this was on a recently setup TB installation with an empty testfolder created just for this test.

Using nderbird 68.7.0 on Debian testing. If a filter matches "To" field, it is applied to a saved message in draft folder of an IMAP account. Not fixed.

Are there any workarounds for this? I would like to filter all messages matching certain criteria (even those I sent) to a folder (in order to make it easier to follow conversations), but it matches auto-saved drafts as well.

Having still same issue currently with 78.12.0 (64-bit) and previous version on linux for at least a year, it is not anything new. Even if you press Ctrl+S to save draft it is moved by filter according the rule. I have also tried to create a filter which should stop all filter execution when my email is in From: but it seams to be completely ignored or skipped by saved drafts. But works when I send the email myself.

You need to log in before you can comment on or make changes to this bug.