Skip to content

SMTPClientSession: replace bare newlines in message content with CRLF. #4689

@obiltschnig

Description

@obiltschnig

Since SMTP servers (specifically, Postfix since early 2024) are increasingly rejecting emails containing bare newlines in their content (which is not valid in SMTP) due to potential SMTP smuggling attacks, its worth discussing whether SMTPClientSession should automatically normalize all bare linefeeds in messages to CRLF sequences.

The proper place for this fix would be in the MailOutputStream class, which already deals with CRLF sequences.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions