CRLFDOT (filter)

From Mailutils
Revision as of 12:23, 26 October 2011 by Gray (talk | contribs)
Jump to navigationJump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

The CRLFDOT filter is useful for data I/O in such protocols as POP3 and SMTP. In encode mode, this filter replaces each LF ('\n' or ASCII 10) character by CRLF ("\r\n", ASCII 13 10), unless already preceded by a CR, and "byte-stuffs" the input by outputting an additional '.' in front of any '.' appearing at the beginning of a line. Upon closing the filter in this mode, it outputs additional ".\r\n".

When decoding, the reverse is performed: each "\r\n" is replaced by a single '\n', and additional dots are removed from beginning of lines. A single dot on a line by itself marks the end of the stream and causes the filter to return EOF.

See also