nmh-workers
[Top] [All Lists]

[Nmh-workers] mail threading headers

2006-05-25 13:03:06
[ if you don't care about the esoterica of threading and header
support, move along.  i've gotten along without this for years. 
you probably could too.  ]

it was pointed out to me, just yesterday, that my MH configuration
has not been adding or propagating the "References:" header.  my
replcomps file is quite old -- presumably the template i copied
eons ago didn't include References support.  (it does provide
In-Reply-To, which may be why no one else has ever complained.)

so i went to the current nmh sources, and pulled out the recipe i
found there:

    %;
    %; Make References: and In-reply-to: fields for threading.
    %; Use (void), (trim) and (putstr) to eat trailing whitespace.
    %;
    %<{message-id}In-reply-to: %{message-id}\n%>\
    %<{message-id}References: \
    %<{references}%(void{references})%(trim)%(putstr) %>\
    %(void{message-id})%(trim)%(putstr)\n%>\

this (as far as i can tell) creates an In-reply-to from the
previous Message-Id (if it exists), and creates a References from
the previous References (if any) plus the previous Message-Id
(again, only if the previous Message-Id exists).

however, RFC 2822 has this to say:

    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 will contain the contents of the "Message-
   ID:" field of the message to which this one is a reply (the "parent
   message").  If there is more than one parent message, then the "In-
   Reply-To:" field will contain the contents of all of the parents'
   "Message-ID:" fields.  If there is no "Message-ID:" field in any of
   the parent messages, then the new message will have no "In-Reply-To:"
   field.

[ so far so good (modulo the fact that i have no idea how one would
attempt to reply to more than one message at once) ]

   The "References:" field will contain the contents of the parent's
   "References:" field (if any) followed by the contents of the parent's
   "Message-ID:" field (if any).

[ again, so far so good. ]

   If the parent message does not contain
   a "References:" field but does have an "In-Reply-To:" field
   containing a single message identifier, then the "References:" field
   will contain the contents of the parent's "In-Reply-To:" field
   followed by the contents of the parent's "Message-ID:" field (if

[ there's the issue -- the fallback use of In-Reply-to. ]

   any).  If the parent has none of the "References:", "In-Reply-To:",
   or "Message-ID:" fields, then the new message will have no
   "References:" field.


so -- how important is it to use In-reply-to in a new References
header if there was no previous References header?  the default
nmh template doesn't do it.  should we care?

the RFC essentially says:
    if (references || inreplyto || messageid) {
        newreferences = (references || inreplyto) . messageid
    }

or, equivalently

    if (references) newreferences = references
    else if (inreplyto) newreferences = inreplyto
    if (messageid) newreferences = newreferences . messageid

none of which means i have the faintest clue how to translate
that into mhl-speak.  does anyone have an mhl snippet that does the
above?  if so, should it become the default?

paul
=---------------------
 paul fox, pgf@foxharp.boston.ma.us (arlington, ma, where it's 73.6 degrees)



_______________________________________________
Nmh-workers mailing list
Nmh-workers@nongnu.org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>