Subject: References and In-Reply-To (section 3.6.4)

From: Jamie Zawinski <[email-masked]>
Date: Sun, 17 Jan 1999 19:09:44 -0800

Section 3.6.4 says:

> The "In-Reply-To:" and "References:" fields are used when creating a 
> reply to a message. They hold the message identifier of the original 
> message and the message identifiers of other messages (for example, in 
> the case of a reply to a message which was itself a reply). If the 
> original message contains a "Message-ID:" field, the contents of that 
> field body are copied into the body of an "In-Reply-To:" field and into 
> the body of a "References:" field in the new message. If the original 
> message contains a "References:" field and/or an "In-Reply-To:" field 
> already (hence a reply to a reply), the contents of the old 
> "References:" field are copied to the "References:" field in the new 
> message, appending to it the contents of the old "In-Reply-To:" field 
> (if its message identifier was not already in the "References:" field) 
> and the contents of the "Message-ID:" field of the original message. In 
> this way, a "thread" of conversation can be established.

I find this very confusing.

Can we change it to the following?  I think I have said what the above
is trying to say.  I think this kind of structure ("how should I
populate this field", and talking about the two fields separately) is
easier to understand.

    The "In-Reply-To:" and "References:" fields are used when creating
    a reply to a message.  They hold the message identifier of the
    original message and the message identifiers of other messages (for
    example, in the case of a reply to a message which was itself a
    reply).  The "In-Reply-To:" field may be used to identify the
    message to which the new message is a reply, while the
    "References:" field may be used to identify a "thread" of
    conversation.

    When creating a reply to a message, the "In-Reply-To:" and
    "References:" fields of the resultant message are constructed as
    follows:

    The "In-Reply-To:" field shall contain the contents of the
    "Message-ID:" field of the message to which this one is a reply
    (the "parent message").  If the parent message has no "Message-ID:"
    field, then the new message shall have no "In-Reply-To:" field.

    The "References:" field shall contain the contents of the
    "References:" field of the parent message (if any), followed by the
    "Message-ID:" field of the parent message (if any).  If the parent
    message contains neither a "References:" field nor a "Message-ID:"
    field, then the new message shall have no "References:" field.

Comments?

-- 
Jamie Zawinski
[email-masked]    http://www.mozilla.org/   (work)
[email-masked]        http://www.jwz.org/       (play)

---

From: Robert Elz <[email-masked]>
Date: Mon, 18 Jan 1999 14:31:01 +1100

Date:        Sun, 17 Jan 1999 19:09:44 -0800
    From:        Jamie Zawinski <[email-masked]>
    Message-ID:  <[email-masked]>

  | Comments?

Much clearer.

You did miss one part of the original though, which is that as it is,
the References field is supposed to be constructed from

	old-references old-in-reply-to old-message-id

(where "old" means "from the parent message")

Of course, since, if the parent is following the rules of this draft, the
old-in-reply-to will already be in old-references, we either get duplicates,
or the doc needs to say that dups need to be eliminated.

If we do it the way your text reads, and drop the old-in-reply-to element
from the references construction, then when replying to messages from a
mailer which doesn't build references properly (according to this draft)
but instead makes just an "in-reply-to" the reference to the parent of
that message will be lost from the chain after one more reply.

kre

---

From: Jamie Zawinski <[email-masked]>
Date: Thu, 28 Jan 1999 05:06:14 -0800

> Much clearer.

Thanks.

> (where "old" means "from the parent message")

Right, I missed that...

> that message will be lost from the chain after one more reply.

Ok, what about the following?  It doesn't address the situation of

  References: <A> <B>
  In-Reply-To: <C>
  Message-ID: <D>

but I don't think that occurs today or will reasonably occur in the 
future (except for the case where B = C.)

It seems to me that duplicate elimination isn't necessary, if you 
assume that in the case where a message contains both References and
In-Reply-To, that the In-Reply-To field is redundant.  I think that's 
a safe assumption.

Too bad this swells the rules to four paragraphs instead of two,
but I guess there's nothing to be done.  I think it's still clearer
than trying to express the whole thing in one compound sentence.

    If the parent message contains a "References:" field, then the
    "References:" field of the new message shall contain the contents
    of the "References:" field of the parent message, followed by the
    "Message-ID:" field of the parent message (if any.)

    If the parent message does not contain a "References:" field, but
    does contain an "In-Reply-To:" field, then the "References:" field
    of the new message shall contain the contents of the "In-Reply-To:"
    field of the parent message, followed by the "Message-ID:" field of
    the parent message (if any.)

    If the parent message contains neither a "References:" field nor an
    "In-Reply-To:" field, then the "References:" field of the new
    message shall contain the contents of the parent's "Message-ID:"
    field.  If the parent also has no "Message-ID:" field, then the
    new message shall have no "References:" field.

    Note that these rules mean that if both "References:" and
    "In-Reply-To:" fields are present in the parent message, the
    "In-Reply-To:" field will not be consulted when constructing the
    headers of the reply message.

Any objections?

Question: since, by these rules, generating both a "References:" field 
and an "In-Reply-To:" field results in redundancy, should we advise
that if a "References:" field is generated, the "In-Reply-To:" field
should be omitted?  That is, that one SHOULD emit one or the other but
not both?

---

From: Robert Elz <[email-masked]>
Date: Fri, 29 Jan 1999 00:41:31 +1100

Date:        Thu, 28 Jan 1999 05:06:14 -0800
    From:        Jamie Zawinski <[email-masked]>
    Message-ID:  <[email-masked]>

  | Any objections?

No.    I might tend to attempt to lessen the implication that a
References header should be used only for replies (it ought be be able
to also be used when a message simply quotes text from another message,
so the recipient can find the other message and thus evaluate the quote in
context), but as I'm not sure what words to write to achieve that, I
wouldn't object to it as written.

  | Question: since, by these rules, generating both a "References:" field 
  | and an "In-Reply-To:" field results in redundancy, should we advise
  | that if a "References:" field is generated, the "In-Reply-To:" field
  | should be omitted?  That is, that one SHOULD emit one or the other but
  | not both?

I would prefer not.   Finding my own message-id in an "In-Reply-To" field
is a strong clue that the message is a direct reply to something I have
written (it doesn't always work, as sometimes people "reply" to a message
I wrote in order to really reply to a quote from another message that I
included, or to a message that I forwarded, not replying to anything of
mine at all - but most of the time it is useful)

Simply finding a message-id in the references list (even as the last entry)
gives much less of a clue in that direction.

kre

---

From: "Bart Schaefer" <[email-masked]>
Date: Thu, 28 Jan 1999 08:48:06 -0800

On Jan 29, 12:41am, Robert Elz wrote:
} Subject: Re: References and In-Reply-To (section 3.6.4)
}
}     Date:        Thu, 28 Jan 1999 05:06:14 -0800
}     From:        Jamie Zawinski <[email-masked]>
}     Message-ID:  <[email-masked]>
} 
}   | Any objections?
} 
} No.    I might tend to attempt to lessen the implication that a
} References header should be used only for replies (it ought be be able
} to also be used when a message simply quotes text from another message,
} so the recipient can find the other message and thus evaluate the quote in
} context), but as I'm not sure what words to write to achieve that, I
} wouldn't object to it as written.

I'd also prefer that References: be usable for other kinds of message
relationships.  For example, why couldn't the References: header of one
message include the message-id of a second message, where that second
message is encapsulated in the first as a message/rfc822 body part?

}   | Question: since, by these rules, generating both a "References:" field 
}   | and an "In-Reply-To:" field results in redundancy, should we advise
}   | that if a "References:" field is generated, the "In-Reply-To:" field
}   | should be omitted?  That is, that one SHOULD emit one or the other but
}   | not both?
} 
} I would prefer not.   Finding my own message-id in an "In-Reply-To" field
} is a strong clue that the message is a direct reply

I agree with Robert on this.

The only other issue I have with Jamie's new text is whether there should
be any mention of obs-in-reply-to.  Since all the obsolete syntax is a
"MUST reasonably interpret," and there were before no widely-followed rules
govering messages that contain both In-Reply-To: and References:, it seems
to me that e.g. the assumption that In-Reply-To: is redundant when both
appear may not be a valid assumption.  (In fact, I know for a fact that
you can't even rely on there being exactly one In-Reply-To:.)

-- 
Bart Schaefer                                                   Zanshin
http://www.well.com/user/barts                   http://www.zanshin.com

---

From: Jamie Zawinski <[email-masked]>
Date: Thu, 28 Jan 1999 12:07:01 -0800

> wouldn't object to it as written.

I guess my feeling is, you have to decide whether "References" is to
be a grab-bag of related message IDs, or a map through the thread.
In RFC 822, it was the former; in RFC 1036, it is very strictly the
latter.

I think the RFC 1036 interpretation is far and away the most useful
and practical, and that current practice supports that.

> Finding my own message-id in an "In-Reply-To" field is a strong clue
> that the message is a direct reply to something I have written [...]
> Simply finding a message-id in the references list (even as the last
> entry) gives much less of a clue in that direction.

Well, with the text as written, they would be equivalent, by definition.

My guess would be that in the real world today, the chances that a
message that listed mine as the last element in References was not a
reply, and that a message that listed mine in In-Reply-To was not a
reply, are about the same.  But perhaps your experience says otherwise.