[OT] SendMail in NT

Gerald Combs gerald at ethereal.com
Thu Mar 14 20:46:26 CST 2002


On Thu, 14 Mar 2002, Jonathan Hutchins wrote:

> A question, Chris,  if a period on a line by itself ends the message text,
> how can you send a line that has only a period, as you did?
> 
> .

Well, according to RFC 821 the MTA handles it in-band:

      4.5.2.  TRANSPARENCY

         Without some provision for data transparency the character
         sequence "<CRLF>.<CRLF>" ends the mail text and cannot be sent
         by the user.  In general, users are not aware of such
         "forbidden" sequences.  To allow all user composed text to be
         transmitted transparently the following procedures are used.

            1. Before sending a line of mail text the sender-SMTP checks
            the first character of the line.  If it is a period, one
            additional period is inserted at the beginning of the line.

            2. When a line of mail text is received by the receiver-SMTP
            it checks the line.  If the line is composed of a single
            period it is the end of mail.  If the first character is a
            period and there are other characters on the line, the first
            character is deleted.

Any line beginning with a period has a period prepended on the sending
side and removed on the receiving side.  I can verify this with a packet
trace if anyone is interested.

.

The complete text of RFC 821 can be found at
http://www.ietf.ort/rfc/rfc0821.txt and many other places.

.




More information about the Kclug mailing list