Skip to content

Noncompliance with RFC 5321, Section 4.5.2. Transparency #10

@TysonMN

Description

@TysonMN

RFC 5321, Section 4.5.2. Transparency says in part

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

  • When a line of mail text is received by the SMTP server, it checks the line. If the line is composed of a single period, it is treated as the end of mail indicator. If the first character is a period and there are other characters on the line, the first character is deleted.

Here is the relevant method in EmbeddedMail. I see two problems with this.

First, EmbeddedMail does not remove the extra period added by mail clients when the line begins with a period.

Second, EmbeddedMail ignores white space when checking for the end of mail indicator. If the email body should contain

aa
 .
bb
cc

then a compliant mail client will send

aa
 .
bb
cc
.

and EmbeddedMail will create two messages, one with body

aa

and one with body

cc

Fixing this is easy, but it would conflict with RPs #6 and #8. I will wait for these PRs to be resolved before creating a fix for this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions