Open Bug 589092 Opened 14 years ago Updated 1 year ago

Copy to IMAP(append) is not always executed correctly when a filter rule has both Copy to IMAP and Move to IMAP(Qurantine option=On, mailnews.downloadToTempFile=true)

Categories

(MailNews Core :: Filters, defect)

x86
Windows XP
defect

Tracking

(Not tracked)

People

(Reporter: World, Unassigned)

References

Details

Attachments

(1 file)

Copy to IMAP(append) is not always executed correctly when a filter rule has both Copy to IMAP and Move to IMAP, and Msg Body of appended mail is null (Qurantine option=On, mailnews.downloadToTempFile=true). (Build ID) > Mozilla/5.0 (Windows NT 5.1; rv:2.0b4pre) Gecko/20100816 Shredder/3.2a1pre (Filter of a POP3 accout, mailnews.downloadToTempFile=true) > version="9" > logging="yes" > name="test-1-Copy-Move-IMAP" > enabled="yes" > type="17" > action="Copy to folder" > actionValue="imap://yatter.one@imap.gmail.com/INBOX/F1" action="Move to folder" > actionValue="imap://yatter.one@imap.gmail.com/INBOX/F2" condition="AND (subject,begins with,test-1)" (Sent mail) mail-1 : Subject: test-131 (text/plain, msg body : test) mail-2 : Subject: test-132 (text/plain, msg body : test) mail-3 : Subject: test-133 (text/plain, msg body : test) (Filter log) > <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><p> > Applied filter &quot;test-1-Copy-Move-IMAP&quot; to message from &quot;M. Wada&quot; &lt;soarex@ops.dti.ne.jp&gt; - test-131 at 2010/08/20 16:54:30 > copied message id = 4C6E34B6.6030609@ops.dti.ne.jp to imap://yatter.one@imap.gmail.com/INBOX/F1 > </p> > <p> > Applied filter &quot;test-1-Copy-Move-IMAP&quot; to message from &quot;M. Wada&quot; &lt;soarex@ops.dti.ne.jp&gt; - test-131 at 2010/08/20 16:54:30 > moved message id = 4C6E34B6.6030609@ops.dti.ne.jp to imap://yatter.one@imap.gmail.com/INBOX/F2 > </p> > <p> > Applied filter &quot;test-1-Copy-Move-IMAP&quot; to message from &quot;M. Wada&quot; &lt;soarex@ops.dti.ne.jp&gt; - test-132 at 2010/08/20 16:54:54 > copied message id = 4C6E34CE.4060001@ops.dti.ne.jp to imap://yatter.one@imap.gmail.com/INBOX/F1 > </p> > <p> > Applied filter &quot;test-1-Copy-Move-IMAP&quot; to message from &quot;M. Wada&quot; &lt;soarex@ops.dti.ne.jp&gt; - test-132 at 2010/08/20 16:54:54 > moved message id = 4C6E34CE.4060001@ops.dti.ne.jp to imap://yatter.one@imap.gmail.com/INBOX/F2 > </p> > <p> > Applied filter &quot;test-1-Copy-Move-IMAP&quot; to message from &quot;M. Wada&quot; &lt;soarex@ops.dti.ne.jp&gt; - test-133 at 2010/08/20 16:55:10 > copied message id = 4C6E34DE.80804@ops.dti.ne.jp to imap://yatter.one@imap.gmail.com/INBOX/F1 > </p> > <p> > Applied filter &quot;test-1-Copy-Move-IMAP&quot; to message from &quot;M. Wada&quot; &lt;soarex@ops.dti.ne.jp&gt; - test-133 at 2010/08/20 16:55:10 > moved message id = 4C6E34DE.80804@ops.dti.ne.jp to imap://yatter.one@imap.gmail.com/INBOX/F2 > </p> (Filtered result) After filter execution, new mail count of INBOX/F1 is three. But when Inbox/F1 is opened, only two mails are shown. INBOX/F1(copy target) : mail-1, mail-2 only. mail-3 is not copied INBOX/F2(move target) : mail-1, mail-2, mail-3 Mail data check after Folder properties, Repair Folder Msg body of any mail in Inbox/F1, Inbox/F2 is null (IMAP log for append, and appended mail data) > 00000002 0.01318156 14 append "INBOX/F1" "20-Aug-2010 16:54:30 +0900" {1215+} > 00000004 0.01357407 X-UIDL: 0000005d4c354af7 > 00000011 0.01382327 Message-ID: <4C6E34B6.6030609@ops.dti.ne.jp> > 00000017 0.01414426 Subject: test-131 > 00000042 0.94593000 15 append "INBOX/F2" (NonJunk) "20-Aug-2010 16:55:10 +0900" {1213+} > 00000044 0.94631803 X-UIDL: 0000005f4c354af7 > 00000051 0.94686139 Message-ID: <4C6E34DE.80804@ops.dti.ne.jp> > 00000057 0.94700778 Subject: test-133 > 00000071 1.65007234 16 append "INBOX/F2" (NonJunk) "20-Aug-2010 16:54:54 +0900" {1215+} > 00000073 1.65044749 X-UIDL: 0000005e4c354af7 > 00000080 1.65070534 Message-ID: <4C6E34CE.4060001@ops.dti.ne.jp> > 00000086 1.65095818 Subject: test-132 > 00000100 2.50725794 17 append "INBOX/F2" (NonJunk) "20-Aug-2010 16:54:30 +0900" {1215+} > 00000102 2.50763512 X-UIDL: 0000005d4c354af7 > 00000109 2.50794959 Message-ID: <4C6E34B6.6030609@ops.dti.ne.jp> > 00000115 2.50824833 Subject: test-131 > 00000128 3.27126765 18 append "INBOX/F1" {1215+} > 00000130 3.27165723 X-UIDL: 0000005e4c354af7 > 00000137 3.27195525 Message-ID: <4C6E34CE.4060001@ops.dti.ne.jp> > 00000143 3.27229571 Subject: test-132
Summary: Copy step to IMAP folder(append) is not always executed correctly when a filter rule has both action of Copy to IMAP folder and Move to IMAP folder (Qurantine option=On, mailnews.downloadToTempFile=true) → Copy to IMAP(append) is not always executed correctly when a filter rule has both Copy to IMAP and Move to IMAP, and Msg Body of appended mail is null (Qurantine option=On, mailnews.downloadToTempFile=true)
Note: Phenomenon of "Null Msg Body" is already reported to bug 582918.
Blocks: 387361
Depends on: 582918
WADA, you have set this bug blocking 387361, but the changes there were focused on POP3, but the issues of this bug are IMAP. While it is not impossible that bug 387361 could have affected IMAP, it is unlikely, so I would not like that blocking set unless you have been able to confirm the symptoms of this bug are caused by the patch in 387361. Can you confirm that the symptoms that you are showing here are dependent on the patch to bug 387361?
(In reply to comment #2) AFAIR, "Copy to IMAP(and/or to LOCAL Folders, to POP3 folders)" did nothing, or generated phantom mail, or interfered Move step, until your patch for bug 387361 was applied. As you know, bug 387361 occurred without your patch :-). And, "Copy+Move in sigle filter rule" had far severe problem until your patch or some other changes. So, "Blocks: 387361" means that bug 387361 improved very well(at least "message headers" were properly copied/moved if APPEND is issued as expected in "Copy+Move to IMAP" case, even if "Copy+Move to IMAP in single filter rule" case), but your patch for bug 387361 didn't resolve whole problem. I believe "Null Msg Body" is common issue of this bug and bug 582918.
Sorry, I lied about "Null Msg Body". When I tested, "Fetch header only" was enabled for other test, so "Null Msg Body" by copy/move to IMAP folder is normal phenomenon in above test. Problem is "wrong order of append command for Copy/Move to IMAP" and "loss of append operation for a mail copy" only. With Qurantine option=Off, I couldn't produce problem with same test procedure and same test mail, but I can't say that there is no problem with Qurantine option=Off. It may be timing dependent.
Summary: Copy to IMAP(append) is not always executed correctly when a filter rule has both Copy to IMAP and Move to IMAP, and Msg Body of appended mail is null (Qurantine option=On, mailnews.downloadToTempFile=true) → Copy to IMAP(append) is not always executed correctly when a filter rule has both Copy to IMAP and Move to IMAP(Qurantine option=On, mailnews.downloadToTempFile=true)
FYI. For "COPY to Local Folders + MOVE to Local Folders in single filter rule" case, with Qurantine option=On, with same test mail and same test procedure, "Fetch header only=off". I couldn't see problem with this case. Your patch for bug 387361 apparenly resolved remained problems around "COPY & MOVE(including both in single filter rule case) + Qurantine option=On", except special case like this bug.
Please clarify - is a message body is missing in the resulting message? Also, is this strictly related to filters?
(In reply to comment #6) > Please clarify - is a message body is missing in the resulting message? Not problem in "message body of a message". Problem of "messag itself in copy/move target folder of IMAP(external symptom = append is not executed). > Also, is this strictly related to filters? I guess core issue is in IMAP code. But I think filter relevant problem exists; - Filter logging doesn't log filter action failure(known issue) - Mismatch between IMAP code and Filter code in special occasion - Filter can produce the "special occasion", because filter requests many "append of mail" during very short period. My setup of IMAP is special. - IDLE is enabled - Max cached connections=2 (Intentional setting for other tests) - "Check new message" is disabled for any IMAP folder == Inbox is not opened until explicit folder open of Inbox Test results with Tb 5.0. Three mails are filtered and are copied/moved to IMAP. (A) When no folder is opened(two connections can be used for filter copy/move) No problem was observed in filter copy/move. Note: Funny phenomenon = when move, UID is reversed. UID by Copy : mail1=UID1, mail2=UID2, mail3=UID3 UID by Move : mail1=UID3, mail2=UID2, mail3=UID1 This is probably same as "multiple mail copy/move to IMAP". (B) When Inbox is opened(only one connections can be used for filter copy/move) mail1/mail2 was copied to Inbox/F1 by "Copy step" but mail3 was not copied. No mail is appended to Inbox/F2 by "Move step". Because mails are deleted from Inbox of POP3 account, data loss happens. If "filter copy/move move of a mail" corresponds to "single IMAP folder open/append/fetch", I think this kind of problem can be avoided. If "filter move of multiple mails" is not "bulk move of mails to IMAP folder", "reversed order of UID" won't occur.

See Also: → 892424

567119 and 1265697 are probably duplicates of this issue.

Workaround :

  • Once : For each mail account, for each filter :
    • Uncheck the 'Getting New Mail' checkbox,
    • Check the 'Manually Run' checkbox.
  • From time to time, AFTER the Inbox of a mail account has finished downloading the mail contents, click on Menu 'Tools / Run Filters on Folder'.

Suggestion for code fixing :
Can the code trigger the 'Getting New Mail' filters of a mail account only AFTER its Inbox has finished downloading the mail contents ?
Thank you in advance for your work.

Severity: normal → S3
See Also: → 662056
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: