Subject: RE: how is Re actually used?

From: "Larry Osterman (Exchange)" <[email-masked]>
Date: Thu, 5 Nov 1998 10:22:01 -0800

Exchange server, decomposes the subject into PR_SUBJECT_PREFIX and
PR_NORMALIZED_SUBJECT when receiving a message.  The subject prefix contains
the characters before the ":" character, and the normalized subject contains
the characters AFTER the ":" character.

The rules for decomposing the subject into subject and subject prefix are:

	(1) Strip all leading whitespace from the original subject.

	(2) Convert the subject to unicode from whatever character set it is
currently in.

	(3) Scan the first 4 characters in the subject.  Scan terminates on
one of the 
following conditions:

		(3a) If a ":" is the first character in the subject, there
is no prefix.
		(3b) If a space or the numbers '0'-'9' appears, there is no
prefix.
		(3c) If the string terminates, there is no prefix.
		(3d) If there is a ":" character after the first character,
the string 
			to the left of the ":" is considered to be the
subject prefix, the remainder of the subject (after
			stripping whitespace between the ":" and the next
character is considered the normalized subject.

MAPI clients (Outlook in corporate mode, or the original Exchange client)
compose replies by setting PR_SUBJECT_PREFIX to the appropriate prefix
string for the current client language, and appending PR_NORMALIZED_SUBJECT.

And yes, we do know that this has problems when you receive a subject like:

Subject: CC:Mail Interoperability

If an exchange client replies to this message, it becomes:

Subject: Re:Mail Interoperability

Larry Osterman
Sent from larryo-laptop.dns.microsoft.com running NT5 and Outlook 98 and
Exchange Server 5.5.  Please notify the sender of any difficulties

-----Original Message-----
From: D. J. Bernstein [mailto:[email-masked]]
Sent: Thursday, November 05, 1998 8:27 AM
To: [email-masked]
Subject: how is Re actually used?

Simon Lyall writes:
> It is "Re: " with the space.

Are you sure about that?

BSD mail creates a reply subject as follows:

   (1) Strip all leading whitespace from the original subject.

   (2) If the subject starts with "Re:" without regard to case, print
       "Subject: " and the subject.

   (3) Otherwise, print "Subject: Re: " and the subject.

elm creates a reply subject as follows:

   (1) Strip all leading whitespace from the original subject.

   (2) Change the subject to "your mail" if it is empty.

   (3) If the subject starts with "Re:" without regard to case, strip
       the "Re:" and any subsequent whitespace.

   (4) Print "Subject: Re: " and the subject.

mh creates a reply subject as follows:

   (1) If the subject starts with whitespace, or with "Re:" without
       regard to case, strip it and repeat this step.

   (2) Print "Subject: Re: " (by default) and the subject.

pine creates a reply subject as follows:

   (1) Strip all leading whitespace from the original subject.

   (2) Change the subject to "your mail" if it is empty.

   (3) If the subject starts with "Re:" without regard to case, print
       "Subject: " and the subject.

   (4) Otherwise, print "Subject: Re: " and the subject.

I also checked trn, one of the popular UNIX newsreaders. It skips "Re:"
and an optional extra space.

All these programs will see the "Re:" in "Subject: Re:Databases". Some
of them will insert a space into subsequent replies; some won't.

If you have information about other programs, please send it to the
mailing list.

---Dan
1000 recipients, 28.8 modem, 10 seconds.
http://pobox.com/~djb/qmail/mini.html

---

From: [email-masked] (Kai Henningsen)
Date: 06 Nov 1998 22:23:00 +0200

> string for the current client language, and appending PR_NORMALIZED_SUBJECT.
         *******************************

Aaaaaaaaaaaaaaaaaaaaaaargh!!

> Subject: Re:Mail Interoperability

Nope, it becomes

Subject: AW:Mail Interoperability

At least in this part of the world it does.

Would you please kill the person who had this _interesting_ idea?

MfG Kai

---

From: Antony Bowesman <[email-masked]>
Date: Thu, 12 Nov 1998 10:47:46 +0900

> > string for the current client language, and appending PR_NORMALIZED_SUBJECT.

Exchange is not the only one.  TeamWARE Mail also allows configurable
prefixes in the mail client for Reply, Forward and Replace. :(

-- 
Antony Bowesman
[email-masked]