I had a question and suggestion for RFC 2821:
Here is the case that demonstrates the dot destuffing functionality in
strongmail MTA:
[root(_at_)localhost strongmail-mta]# telnet 0 25 Trying 0.0.0.0...
Connected to 0 (0.0.0.0).
Escape character is '^]'.
220 localhost.localdomain StrongMail SMTP Service Version: 3.1.5(2.00.222)
ready at Mon, 15 May 2006 10:43:42 -0700 for server 27509 helo sdfasd 250 Ok
mail from:<dsfsdafs(_at_)sadffas(_dot_)com> 250 Ok rcpt
to:<dsfsd(_at_)dsafsd(_dot_)com> 250 Ok data
354 send the mail data, end with .
.one
..two
.one
...three
....four
.
250 ok, Accepted
quit
221 Service closing transmission channel Connection closed by foreign host.
[root(_at_)localhost strongmail-mta]# cat log/test.mail
From <dsfsdafs(_at_)sadffas(_dot_)com> Mon May 15 10:44:26 2006
.one << We do not remove dot in
case of single dot.
.two
.one << We do not remove dot in
case of single dot.
..three
...four
However there are conflicting statements in RFC regarding single dot. Here are
the RFC statements:
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.
This implies a reciever should never recieve a line with single dot followed
by characters (other than CRLF).
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.
This says remove dot even in case of single dot followed by charactes other
than CRLF. IT SHOULD HAVE BEEN IF MORE THAN ONE DOTS.
In my opinion single dot case is not a valid test case.
RFC 2821 should be corrected accordingly.