Closed Bug 720646 Opened 12 years ago Closed 8 years ago

Unique Message-ID: shoulld be generated upon each Save As Template and is better generated upon each Save As Draft

Categories

(MailNews Core :: Composition, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1279869

People

(Reporter: World, Unassigned)

References

(Blocks 2 open bugs)

Details

This is spin-off of bug 704193 comment #8.

Unique Message-ID: shoulld be generated upon each Save As Template and is better generated upon each Save As Draft.

Background:

Tb uses same Message-id: when Save As Template and Save As Draft.
(1) Save As Template
(1-1) Compose a mail, Save As Template
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: a1@a.a.a)
(1-2) At same composition window, change To:, second Save As Template
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: a2@a.a.a)
(1-3) Edit As New of Subject: Template-1, change To:, Save As Template
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: b1@b.b.b
(1-4) Edit As New of Subject: Template-1, without change Subject, Save As Template
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: c1@c.c.c
(2) Compose mail from Template-1, To: a1@a.a.a, Save As Draft
(2-1) Change To:, Save As Draft
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: d1@d.d.d
(2-2) Change To:, Save As Draft again
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: d2@d.d.d
(2-3) Draft at step (2-1) is deleted.
(3) Compose mail mail from Template-1, To: a2@a.a.a, Save As Draft
(3-1) Change To:, Save As Draft
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: e1@e.e.e
(3-2) Change To:, Save As Draft again
    Message-ID: <4F1E0C94.7030905@x.x.x>, Subject: Template-1, To: e2@e.e.e
(3-3) Draft at step (3-1) is deleted.

Due to same Message-Id:, following problems occur in Tb.

(A) Problem in "delete old draft"
When delete of old version of draft mail, search of old draft is done by "search for Message-Id: 4F1E0C94.7030905@x.x.x" using SEARCH command of IMAP if UIDPLUS is not supported by IMAP server.
So, which draft mail is deleted depends on "which mail server returns", and if server returns multiple mails of same Message-Id:, all is up to Tb.

If Subject: is different, Tb is perhaps not confused. However, if Subject: is same too in addition to same Message-ID:, Tb may deletes oldest one. It may depend on order of returned mail from IMAP server. 

(B) "Problem in "Reply with Template" (reported to bug 533229)
Filter rule of "If Subject contains ttt, Reply with template named Template-1(Subject:Template-1) in Templates folder under Local Folders" is saved in msgFilterRules.dat like next.
> name="reply-with-template-1"
> action="Reply"
> actionValue="mailbox://nobody@Local%20Folders/Templates?messageId=4F1E0C94.7030905@x.x.x&subject=Template-1"
> condition="AND (subject,contains,ttt)"
If multiple template mails have same Messae-ID: and same Subject:, "which template is used upon Reply with Template" is unpredictable. All is up to Tb.

(C) Unwanted bug like bug 704193.
When different draft mails(To: is different) of different UID have same Message-ID: and Subject:, Tb confuses and shows same To: for different mails even though server correctly returns different data for different UID.

All of (A), (B), (C) is divine justice on Tb's generation of non-unique Message-ID:.

Because any mail can be edited by "Edit As New" and "Edit As New" can be invoked on same mail multiple times/at same time, and because mail of same Message-ID: can be generated by mail copy, "Save As Draft" is also better generate unique Message-ID: upon each draft save including auto-save.
Blocks: 704193
Blocks: 533229
Note:
Because bug 321355 exists, "Edit As New" of draft mail is same as "Edit" of existent draft mail. So, "multiple mails of same Message-Id:" is not generated by single "Edit As New" of a darft mail which is not created by "copy of mail, draft mail, template mail", even if user executed "Edit As New" on existent draft mail in Drafts folder.
So, as far as user normaly uses draft mail,
  Compose a mail, Save As Draft, Exit, single "Edit" on a draft mail  
"draft mail of same Messagge-Id:" is not generated by editing of existent draft mail.
Blocks: 640018
This is a problem for me. Somehow, using the Thunderbird Conversations addon causes a template, that was based on a different template, to show in the preview pane as exactly the same as the original message, even if the content of the second template is now completely different.

There are other issues as described here: https://github.com/protz/GMail-Conversation-View/issues/551

The Conversations addon is great, but this TB issue that Conversations seems to reveal with templates makes it very challenging to use Conversations, since I use templates extensively.
In case anyone is using TB Conversations add-on, the temporary workaround is to un-check "View>Conversation View" while browsing your templates folder, then re-enable in regular mail folders.
Blocks: 771165
Will be fixed in bug 321355.
Depends on: 321355
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.