Beware of bare linefeeds in Exchange Server email

A bare linefeed is a single linefeed character that isn't preceded by an ASCII carriage return. In some instances, virus scanners or security appliances will insert bare linefeeds into an Exchange Server email and cause delivery failures.

A bare linefeed is a single linefeed character (LF or ASCII 10) that isn't preceded by an ASCII carriage return (CR or ASCII 13) character. Since a carriage return is always supposed to be followed by a linefeed according to RFC 822bis, any message that has a bare linefeed in it is supposed to be rejected by the email server it was sent to.

When this happens, the receiving email server typically prepares a rejection message that mentions the problem. This is often accompanied with the directive See http://pobox.com/~djb/docs/smtplf.html.

The URL describes the bare linefeed issue and has some suggested fixes for a number of popular Unix-based mailers (and even a few Windows mailers). Unfortunately, there is no fix listed in the event this problem crops up when you're using Exchange Server.

When you're running Exchange Server, the culprit is almost always not Exchange Server itself but a third-party add-on or appliance -- a virus scanner that runs as part of Exchange Server or a hardware device that scans emails in transit to and from your Exchange server.

Under certain conditions (such as a very long, unwrapped text line), the virus scanner or appliance may mistakenly inject a bare linefeed and cause outgoing email to fail. Some more archaic email clients will also try to end a message with a linefeed, a period and a linefeed instead of a CR-LF-period-CR-LF string, which will also fail.

The easiest way to find out if the device or scanning engine in question is the culprit is simply to take it out of service for a time and see if the problem repeats itself. If not, you'll need to see if an upgrade for that device/program exists -- or perhaps consider a replacement that doesn't cause such issues.

About the author: Serdar Yegulalp is editor of Windows Insight, a newsletter devoted to hints, tips, tricks, news and goodies for all flavors of Windows users.

Do you have comments on this tip? Let us know.

Related information from SearchExchange.com:

  • Tip: Using an appliance to reduce the performance impact of spam
  • Tip: How and why to disable certain ESMTP verbs
  • Fast Guide: Exchange Server security essentials
  • 5 tips in 5 minutes: Securing Exchange Server 2003
  • Step-by-Step Guide: How to use ISA Server as an SMTP filter

    Please let others know how useful this tip was via the rating scale below. Do you have a useful Exchange Server or Microsoft Outlook tip, timesaver or workaround to share? Submit it to SearchExchange.com. If we publish it, we'll send you a nifty thank-you gift.

  • Dig Deeper on IT operations and infrastructure management

    Cloud Computing
    Enterprise Desktop
    • Understanding how GPOs and Intune interact

      Group Policy and Microsoft Intune are both mature device management technologies with enterprise use cases. IT should know how to...

    • Comparing MSI vs. MSIX

      While MSI was the preferred method for distributing enterprise applications for decades, the MSIX format promises to improve upon...

    • How to install MSIX and msixbundle

      IT admins should know that one of the simplest ways to deploy Windows applications across a fleet of managed desktops is with an ...

    Virtual Desktop