[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

Re: XYENC and E-mail



Carl Distefano wrote on Sun, 01 Feb 2009 07:43:20 -0500

>SMTP uses the sequence "." to signify the end
>of an e-mail transmission. Since the message body itself
>may contain this sequence, SMTP checks the first character
>of each line before sending it; if the line starts with a
>period, the server "escapes" it by inserting an additional
>period at the beginning of the line. The receiving server
>is supposed to do the reverse to incoming messages. If an
>incoming line consists of a lone ".", the tranmission
>terminates, but if a line starting with "." contains
>additional characters, the initial period is deleted, or
>should be, on the assumption that the sender added "." to
>that line. (See RFC 821 ...

Okay, gotcha. Thanks for the heads up. Just goes to show there is nothing
for shaking out the problems with a program than to expose it to the
idiosyncrasies the real world.

>... solved it by having ENCODE expand any period at the
>beginning of a line to its Ascii decimal token, "{046}".
>XYENC.COM could -- and, I think, should -- do something
>similar: Expand any period at the beginning of a line to
>"{tilde}046" (which XYDEC.COM recognizes and decodes
>properly).

Well, there are other approaches that would be far easier for the way
XYENC's logic works, and that I think I would prefer. Since XYENC/XYDEC
defines the character "%" (percent) as whitespace and XYDEC throws "%"
characters away, I think that I would rather just have XYENC inject a "%"
before any period that falls at the beginning of a line. And to me, it
seems that approach is less likely to confuse programs that do cooking or
other post processing of encoded material.

It could also inject just a space, or a tab, but those seem somewhat more
dangerous to me, in terms of the possibility of the email system tampering
with them.

Would the added "%" solution be adequate from your point of view?

Wally Bass