When sending emails, you may encounter a delivery failure due to a technical issue called a "bare LF" (Line Feed).

This occurs when an email message contains a Line Feed (\n) character without a preceding Carriage Return (\r). According to RFC 2821, all lines in email messages must be properly terminated with a CRLF sequence (\r\n). If a message contains only a bare LF (\n), most mail servers will reject it as invalid.

What Does RFC 2821 Say?

RFC 2821 explicitly states:

"SMTP commands and, unless altered by a service extension, message data, are transmitted in 'lines'. Lines consist of zero or more data characters terminated by the sequence ASCII character 'CR' (hex value 0D) followed immediately by ASCII character 'LF' (hex value 0A). This termination sequence is denoted as <CRLF> in this document. Conforming implementations MUST NOT recognize or generate any other character or character sequence as a line terminator."

"In addition, the appearance of 'bare' 'CR' or 'LF' characters in text (i.e., either without the other) has a long history of causing problems in mail implementations and applications that use the mail system as a tool. SMTP client implementations MUST NOT transmit these characters except when they are intended as line terminators and then MUST, as indicated above, transmit them only as a <CRLF> sequence.

Since our mail servers strictly adhere to this standard, any email that does not comply will be rejected, resulting in a 451 error. 

How to Fix Bare LFs

If you experience email delivery failures due to bare LFs, follow these steps to resolve the issue:

  1. Check for Anti-Virus or Security Software
    Some anti-virus programs or email security tools scan outgoing messages and may alter line endings inadvertently. If you are using such software, try disabling it temporarily or checking its settings to ensure it does not modify email content, often by adding a signature indicating that said message was scanned for malware.

  2. Update Your Email Client
    Most modern email clients and mail servers already comply with RFC standards. However, if you are using an outdated or custom email client, check for updates and apply them to ensure proper message formatting.

  3. Check Line Endings in Scripts
    If you send emails via scripts or automated systems, ensure that line endings are correctly formatted before sending. They should be set to use CRLF sequence (\r\n) instead of bare LF (\n).