From: MAILER-DAEMON@berkeley.edu 79 Date: Thu, 9 Jun 1988 22:23 EDT From: pgs@xx.lcs.mit.edu To: UNIX-HATERS Subject: mailer warts Did you ever wonder how the Unix mail readers parse mail files? You see these crufty messages from all these losers out in UUCP land, and they always have parts of other messages inserted in them, with bizarre characters before each inserted line. Like this: From Unix Weenie piffle!padiddle!pudendum!weenie Date: Tue, 13 Feb 22 12:33:08 EDT From: Unix Weenie piffle!padiddle!pudendum!weenie To: net.soc.singles.sf-lovers.lobotomies.astronomy.laser- lovers.unix.wizards.news.group In your last post you meant to flame me but you clearly don’t know what your talking about when you say % $ Received: from magilla.uucp by gorilla.uucp % $ via uunet with sendmail % $ … so think very carefully about what you say when you post From your home machien because when you sent that msg it went to all the people who dont want to read your falming so don’t do it ):-( Now! Why does that “From” on the second line preceding paragraph have an angle bracket before it? I mean, you might think it had some- thing to do with the secret codes that Usenet Unix weenies use when talking to each other, to indicate that they're actually quoting the fif- teenth preceding message in some interminable public conversation, but no, you see, that angle bracket was put there by the mailer. The mail reading program parses mail files by looking for lines beginning with “From.” So the mailer has to mutate text lines beginning with “From” so’s not to confuse the mail readers. You can verify this for yourself by sending yourself a mail message containing in the mes- sage body a line beginning with “From.” This is a very important point, so it bears repeating. The reason for “From” comes from the way that the Unix mail system to distinguishes between multiple e-mail messages in a single mailbox (which, following the Unix design, is just another file). Instead of using a special control sequence, or putting control information into a separate file, or putting a
80 Mail special header at the beginning of the mail file, Unix assumes that any line beginning with the letters F-r-o-m followed by a space (“ ”) marks the beginning of a new mail message. Using bits that might be contained by e-mail messages to represent infor- mation about e-mail messages is called inband communication, and any- body who has ever taken a course on telecommunications knows that it is a bad idea. The reason that inband communication is bad is that the commu- nication messages themselves sometimes contain these characters. For this reason, sendmail searches out lines that begin with “From ” and changes them to “From.” Now, you might think this is a harmless little behavior, like someone burp- ing loudly in public. But sometimes those burps get enshrined in public papers whose text was transmitted using sendmail. The recipient believes that the message was already proofread by the sender, so it gets printed ver- batim. Different text preparation systems do different things with the “” character. For example, LaTeX turns it into an upside question mark (¿). If you don't believe us, obtain the paper “Some comments on the assumption- commitment framework for compositional verification of distributed pro- grams” by Paritosh Pandya, in “Stepwise Refinement of Distributed Sys- tems,” Springer-Verlag, Lecture Notes in Computer Science no. 430, pages 622–640. Look at pages 626, 630, and 636—three paragraphs start with a “From” that is prefixed with a ¿. Sendmail even mangles mail for which it isn’t the “final delivery agent”— that is, mail destined for some other machine that is just passing through some system with a sendmail mailer. For example, just about everyone at Microsoft uses a DOS or Windows program to send and read mail. Yet internal mail gets goosed with those “Froms” all over the place. Why? Because on its hop from one DOS box to another, mail passes through a Unix-like box and is scarred for life. So what happens when you complain to a vendor of electronic mail ser- vices (whom you pay good money to) that his machine doesn’t follow pro- tocol—what happens if it is breaking the law? Jerry Leichter complained to his vendor and got this response: Date: Tue, 24 Mar 92 22:59:55 EDT From: Jerry Leichter leichter@lrw.com To: UNIX-HATERS Subject: That wonderful “From” From: A customer service representative5