The main subject of this blog post is the “Re:” prefix used in the “Subject:” header line of most email replies, but the implicit subject is how MailMate handles the huge gap between theory and practice when dealing with many email headers. The story of the “Re:” prefix is in many ways a typical email header story. What may seem like a simple problem quickly becomes very complicated when 40 years of email history has made its mark. The Devil is in the details.
When used in a reply, the field body MAY start with the string “Re: “ (from the Latin “res”, in the matter of) followed by the contents of the “Subject:” field body of the original message.
It even includes an explanation of what “Re:” means although I’m with this guy on that one, but the Latin interpretation serves a purpose as we’ll see further below. For the sake of completion, the meaning of “Re:” was changed (corrected?) to be from the Latin “in re” in RFC 5322.
Ok, that was a nice bit of history and it actually started before I was born which means I don’t have to feel so old today. A similar history exists for many other of the standard email headers, but in the special case of the “Re:” prefix you might ask: Why standardize it at all? I hope that is going to be evident at the end of this blog post.
Add “Re:” to the subject of replies and replies only.
Do not add another prefix when replying to a reply.
As we’ll see further below then the following clarification would also have been nice: Do not use any localized variants of “Re:”.
It might not have helped if the reply prefix had been standardized, but the lack of standardization certainly did not help. Variations of the prefix were invented and they resulted in various problems. I’ll describe 3 prefix related problems below.
Re: This correspondence now involves 4 messages.
Re: Re: This correspondence now involves 4+1 messages.
The “smart” email client might be able to merge the prefixes when replying and therefore the above could be an acceptable side effect until all email clients supported the counters, but this now seems unlikely to ever happen. It does not help that this has never been standardized.
This is probably why it was decided that “Re:” is a Latin abbreviation.
Things get even more complicated when also considering forwarding related prefixes and other semi-standard conventions. Now, the question is, what can MailMate do about this?
Translations of the “re” or “fw”/”fwd” tokens are not specified for removal in the base subject extraction process. An attempt to add such translated tokens would result in a geometrically complex, and ultimately unimplementable, task.
Update October 6th, 2016: Too many false positives means that this is going to be replaced with an expression including a specific list of known prefixes. It’s also going to be configurable.
This is geek language for a (possibly repeated) sequence of two or three Unicode letters followed by an optional counter and a mandatory colon. The colon can actually be one of two kinds of colon. The usual one and a so-called full-width colon. The latter is used in the Chinese prefix “回信：” and possibly by other languages as well.
MailMate is quite liberal with respect to what it identifies as a prefix. It is therefore also important that the prefix is handled with care. As we’ll see below it is mostly used for improving the display and sorting of subject lines. An exception is the generation of a subject line for a reply for which MailMate tries to never add more than a single “Re:”. This strategy adheres to Postel’s law: “Be liberal in what you accept, and conservative in what you send”.
Display all subject lines with the same order of elements and without extraneous whitespace between these elements. The blob and, in particular, the order of the prefix and the blob is not standardized and therefore varies a lot.
Proper sorting of messages by subject.
Only compare the body of a subject when trying to determine whether or not the subject has changed between a message and its reply (MailMate warns about such a change before sending a reply).
Only prefix a subject line with a single “Re:” when generating a reply.
Allow searches for messages with a particular subject blob or subject body.
If you don’t like that (and you feel adventurous) then you can create your own columns or override the existing ones using low-level customizations.