At 01:55 16/05/2006, Tulsi Ram Mayala wrote:
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.
There are two statements there, one applies to the sender, and one applies
to the receiver.
In your example, you have a bug in the sender (not your software) AND a bug
in the receiver (your software).
You CAN fix the bug in your software - ie do what (2) above says - if the
first character is a period, and it's not on a line of its own, delete the
first character. Statement (2) above isn't ambiguous.
You can't fix the bug in the sending software (unless your software does
that as well...) so don't worry about that. If the developers of the
sending software complain that your software shouldn't remove the leading
'.' unless there's two of them, you have plenty of ammunition to defeat
their arguments!
I can't see it being hard to fix the bug in the receiving software...