Why Are Your Emails Getting Rejected with Code 554?

You sent a perfectly formatted email. Your SPF, DKIM, and DMARC are set. Your content passed spam checks. And yet, your message vanished with a 554 error before it even reached the inbox. Why?

It’s not always spam. It’s not always a bad domain. Sometimes, the issue is simpler — and more technical — than you think: your email headers were misfolded. If a header line exceeds 998 characters without a valid soft line break, the receiving server rejects it outright during SMTP negotiation. No graylist, no spam filter — just a hard bounce.

Imagine sending a letter with a handwritten address that's 10 inches long and no line breaks. The post office won’t even open it. Email servers treat folded headers the same way. This error is invisible until it happens — and it happens more often than you’d expect, especially in bulk sends with complex metadata.

Key takeaways

  • 554 rejections during SMTP negotiation often stem from misfolded email headers, not spam or authentication issues.
  • Header lines must not exceed 998 characters and must use valid soft line breaks (CRLF followed by whitespace) to avoid rejection.
  • Tools like EmailListChecker.io’s deliverability testing can verify header folding in real time before sending.

What Does 'Folding' Mean in Email Headers?

When an email header line exceeds 998 characters, it must be broken across multiple lines using a soft line break (CRLF followed by a single space or tab) to stay compliant with RFC 5322. This is called folding — splitting long headers without changing their meaning. If not done correctly, receiving servers may reject your message with a 554 error.

The Technical Rule: What 998 Characters Really Means

Each line in an email header must not exceed 998 characters. This includes the header name, colon, and value. If a header like Received or DKIM-Signature runs too long — which happens quickly with nested authentication tags or long IP addresses — the server will treat it as invalid. Even if the content is correct, improper formatting triggers rejection.

For example, a header with multiple Received stamps from proxy chains or long Return-Path fields can easily surpass the limit. When it does, you must fold the content. The standard says you can use only a single space or tab after a line break — no extra whitespace or multiple breaks.

How Folding Works in Practice

Let’s say you have a DKIM-Signature header that’s 1,100 characters. You need to break it logically before the 998-character limit. The line must break on a word boundary (or at least a safe point like a space or semicolon), then continue on the next line with a single space or tab after the CRLF.

The key is that folding isn’t about visual formatting — it’s about how mail servers parse the header. They must treat folded lines as if they were one continuous string. A single space after the line break is the only valid continuation marker. Misplaced or missing spaces lead to parsing errors, which often result in 554 or 552 rejection codes.

The official RFC 5322 specification is the definitive source for these rules. It’s not optional — it’s how every internet-standard email server expects headers to behave.

You can avoid these issues entirely by validating your headers during development. Tools like inbox placement testing help catch header formatting issues before you send to real recipients. They simulate how major providers like Gmail, Outlook, or Yahoo actually parse your messages — including compliance with line length rules.

How Email Headers Are Folded and Unfolded in Practice

You must fold long email headers at 78 characters or less using a soft line break (a newline preceded by a space or tab) to avoid a 554 rejection. If you don’t fold correctly—like inserting a line break in the middle of a word or omitting the required space—receiving servers may reject the message as malformed, even if the header is technically valid. The receiving server automatically unfolds headers during processing, but it relies on proper folding at the source.

Why Header Folding Matters for Deliverability

Most email servers enforce the 998-character limit for entire header lines, including name and value. If your Subject: line hits that limit, you must fold it properly. For example, a long subject might become:

Subject: This is a very long subject line that exceeds the 998-character limit in a standard email header

Notice the newline followed by a space—this is the correct way to fold. The server will reassemble this as a single header during parsing. If your email client or system inserts a line break without the leading space, or breaks a word mid-character, the receiving server sees it as malformed and may reject the message with a 554 error.

How Servers Handle Folded Headers in Reality

According to RFC 5322, the standard governing email formatting, headers must be unfolded during processing using whitespace (space or tab) immediately following a line break. This is a well-documented requirement, not a preference. If the folding is incorrect—say, the newline comes without a preceding space—the server treats it as an error. This doesn’t always trigger immediate rejection, but it increases the risk of being flagged as spam or bouncing silently.

Luckily, most modern email systems follow RFC 5322 correctly. But poorly written scripts, outdated email tools, or custom SMTP implementations can introduce folding bugs. These are the kind of issues that can quietly hurt deliverability over time, especially at scale. A single malformed header can trigger filtering or reputation penalties.

If you're sending bulk emails, ensure your system applies proper folding rules across all headers—not just Subject, but also From, To, and custom fields. Mistakes here aren't always caught during development, especially if you're using a tool that doesn’t validate header syntax. For this reason, many senders now use a verification service that checks for compliance with email standards before sending.

For developers and email teams, running a header syntax test before sending is a smart step. Using a tool like bulk email verification can catch formatting issues before they reach the inbox.

Common Mistakes That Cause 554 Errors via Header Folding

You’re getting a 554 error because your email headers exceed line length limits or are folded incorrectly. SMTP requires header lines to be no longer than 998 characters, and when wrapped, the continuation must start with a single space or tab after the CRLF. Common causes include hard line breaks without indentation, folding across multiple lines without proper spacing, or misaligned whitespace after blank lines. Automated systems often miss these checks, so even small flaws can trigger rejections. See RFC 5322 for the formal specification.

Folding Rules Are Strict, Not Flexible

  • Never use a bare CRLF (line break) at the end of a header line — always add a single space or tab after the newline to indicate continuation.
  • If a header value wraps across two or more lines, each continuation line must begin with exactly one space or tab — no more, no less.
  • Never place a header value immediately after a blank line. This can cause parsing confusion and leads to fold errors that trigger 554 rejections.
  • Even if your email client or app looks correct, a misaligned whitespace character — like a missing space or an extra tab — can break the header structure at the receiving server.

Automated Systems Can Introduce Hidden Issues

Many email generation tools, especially those used in bulk workflows or API integrations, don’t validate line length or folding rules. They may cut lines at arbitrary points without checking for proper continuation formatting. This results in invalid headers that mail servers reject on sight.

For example, a tool generating a Content-Type header might split it at 70 characters with no indentation, causing the server to treat it as a new field. That triggers a 554 error. It’s a silent failure — the email may appear perfect in your inbox preview, but it never lands in the recipient's server.

Proper header folding isn’t just about length — it’s about alignment. The receiver expects a specific structure. One misstep means rejection. Tools that check header format during delivery testing can catch these issues before they reach the inbox.

Use an inbox placement tool to verify how your email headers are interpreted by real servers. Test your full message before sending to a large list.

Run a full inbox placement test to see how your headers and message structure perform across real mail providers.

How to Test If Your Email Headers Are Folded Correctly

You can test if your email headers are folded correctly by sending a real message through your mail server stack and inspecting the raw SMTP transaction log. If any header line exceeds 998 characters or uses invalid line breaks (like no space after a newline), the receiving server may reject the message with a 554 error. This happens because email headers must follow RFC 5322's line length and folding rules — even a single malformed line can break delivery.

Use a Real SMTP Transaction to Trigger the Process

Let’s simulate a real email send using your mail server. Tools like Postfix or Dovecot can log raw transactions. Run a test message through your stack and capture the full SMTP conversation — the server logs will show the complete message you sent, including all headers and body.

  1. Access the raw message log from your mail server or SMTP debugging tool. Most modern logging tools display the full message content, including headers, before delivery.
  2. Inspect each header line separately — no line should be longer than 998 characters. This includes the header name, colon, and the value. Exceeding this limit triggers a 554 rejection.
  3. Verify line breaking format — every line break must be followed by exactly one space or tab. A missing space leads to mis-parsing; two or more spaces can be interpreted as part of the header value, causing rejection.
  4. Reconstruct the header block in a plain text editor — paste all lines into a new file and reassemble them by ensuring each continuation line begins with a single space or tab. Compare your result against RFC 5322's expected syntax.
Use a Real SMTP Transaction to Trigger the ProcessThe 4 steps described in “Use a Real SMTP Transaction to Trigger the Process”, in order.1Access the raw message log from your mail server or SMTP debugging tool.Most modern logging tools display the full message content, includingheaders, before delivery.2Inspect each header line separately — no line should be longer than 998characters. This includes the header name, colon, and the value.Exceeding this limit triggers a 554 rejection.3Verify line breaking format — every line break must be followed byexactly one space or tab. A missing space leads to mis-parsing; two ormore spaces can be interpreted as part of the header value, causingrejection.4Reconstruct the header block in a plain text editor — paste all linesinto a new file and reassemble them by ensuring each continuation linebegins with a single space or tab. Compare your result against RFC5322's expected syntax.
The 4 steps described in “Use a Real SMTP Transaction to Trigger the Process”, in order.

Common Pitfalls in Header Folding

Even small errors slip through. For example, a long From: header with an embedded HTML signature may exceed 998 characters if not folded properly. Or, using a newline without a leading space (e.g., a line break right after the colon) invalidates the entire header. These issues aren’t caught by most mail client previews — only by SMTP-level inspection.

Once you verify all rules are met, your email headers are compliant. If you’re still seeing 554 errors, check for misconfigured headers like Received: or Message-ID: that may include embedded content or improper formatting. Automated tools like inbox placement testing can also simulate delivery conditions and catch folding issues before they impact real campaigns.

How Emaillistchecker.io Helps Prevent 554 Errors

You can test if your email headers are folded correctly by simulating real server interactions through inbox-placement testing. Emaillistchecker.io doesn’t just check addresses—it validates how your email would be processed during SMTP negotiation, flagging misfolded headers, excessive line length, and improper continuation patterns that trigger a 554 rejection before you send.

What Triggers a 554 Error and How It’s Detected

SMTP servers reject messages with malformed headers using code 554. One common cause is header lines longer than 998 characters without proper folding—especially in widely used fields like Received, Subject, or Content-Type. The RFC 5322 standard defines exact rules for line continuation with a space or tab after a line break. When these rules are violated, servers reject the message outright. Emaillistchecker.io detects these violations by emulating actual mail server behavior during a real-time SMTP handshake.

Why Structural Testing Matters Beyond the Address

Even if every email address in your list is valid, misformatted headers can still cause delivery failure. Let’s say you send a campaign with a deeply nested Received chain or a long subject line with no folding. Some servers will reject it immediately with a 554 response, even though the address was correct. Emaillistchecker.io prevents this by testing full email structure during inbox-placement checks. It evaluates header length, folding syntax, and line continuation patterns exactly as a real server would.

You can run a test directly through the inbox placement tool to see how your message would be received by major providers—without sending it. The report will identify folding errors and other SMTP-level issues that aren’t obvious from the address alone. This includes detecting when a long header continues without a proper CRLF + space, a common oversight in scripts that build emails dynamically.

While tools like ZeroBounce or NeverBounce focus on address validation, Emaillistchecker.io goes deeper. By simulating real SMTP negotiation, it catches structural flaws that lead to 554 rejections—issues that only surface during the actual delivery process. It’s not about the address, but how your message is packaged. The same applies to integrations with SendGrid, Mailchimp, or HubSpot: even well-configured systems can misfold headers if templates aren’t validated.

Test your email's delivery readiness before sending to ensure your headers are correctly folded and your message will pass server checks.

The Real Impact of a Misfolded Header on Deliverability

Even a single misfolded email header can trigger a 554 rejection, causing your message to be blocked outright. Receiving servers treat improperly formatted headers as a sign of non-compliance with SMTP standards, and they won’t accept the message. This isn’t just a minor glitch—it’s a hard bounce that harms your sender reputation and can lead to long-term deliverability issues.

Why a Single Misfold Can Derail Your Send

SMTP requires headers to be folded correctly when they exceed 78 characters. If a header isn’t broken at the right place—usually after a space or comma—the receiving server may reject the entire message with a 554 error. These errors are treated as hard failures by mail transfer agents, meaning the recipient’s server won’t even attempt to deliver the email.

That means no delivery, no soft bounce, no retry. The message disappears into the void. You might assume the message is clean, that your authentication is solid, and that your list is valid—but if the header isn’t folded correctly, it doesn’t matter. The protocol blocks it before content even gets inspected.

How This Hurts Your Sender Reputation

Repeated 554 rejections, even if isolated, signal to email providers that your sending infrastructure isn’t reliable. Some receiving servers flag repeat offenders, which can lead to IP or domain blacklisting—even if your content is spam-free and your SPF/DKIM/DMARC are properly set.

Studies show that repeat authentication failures or protocol violations are among the top reasons for reduced inbox placement. The problem isn’t just the error itself—it’s the cumulative effect. One misfolded header might not sink your entire campaign. But if you’re making this mistake across dozens or hundreds of messages, your reputation starts to degrade in ways you won’t see until deliverability drops.

Testing for header folding during campaign prep isn’t optional. It’s part of due diligence. You can’t rely on inbox placement tools or deliverability checkers to catch every protocol-level flaw—especially not after the message is already sent. Use your inbox placement test to verify results, but prevent the issue before it happens.

You can test and validate your email structure at scale using tools that analyze SMTP-level formatting. For example, inbox placement testing includes header validation as part of the delivery simulation, helping you spot problems before campaigns go live.

For more technical details, refer to RFC 5322, which defines the standard for Internet message format and header folding rules. A small oversight in one character can have outsized consequences.

Best Practices for Avoiding 554 Errors During Email Campaign Setup

554 errors often stem from improperly folded email headers—especially when lines exceed 998 characters. You can prevent this by validating your full raw email before sending, checking header structure in debug mode, and testing every campaign draft through a deliverability pipeline. This isn’t optional; it’s a core part of reliable sending.

Validate Before You Send

  • Always inspect the full raw email output before sending, especially when using templates or automation tools. Hidden line breaks and improper folding are common in dynamic content.
  • Use tools that expose the raw message: PHPMailer’s getSentMIMEMessage(), SendGrid’s debug mode, or your SMTP client’s logging output.
  • Enable full SMTP logging in your mail server or outbound service. This lets you catch line-length violations and malformed headers before they hit a server.

Make It Part of Your Pipeline

  • Integrate header validation into your deliverability testing pipeline. Test every campaign draft, not just the final version.
  • Use RFC 2822 as your guide: headers must not exceed 998 characters per line, including the field name and colon.
  • Check headers like From, To, Subject, and Received—they’re most likely to get folded incorrectly when long values are used.
  • Let’s be clear: a single improperly folded header—like a 140-character From name—can trigger a 554 rejection from even major providers.
  • Verify your automation workflow isn’t appending long metadata chains or tracking parameters that push header length beyond the limit.
Header folding errors are among the most preventable causes of 554 rejections. The fix isn’t in routing or reputation—it’s in how you format what you send.

For teams building or testing campaigns, use a real-time verification tool that shows raw output. Tools like inbox-placement testing help confirm delivery readiness, and catching header issues early avoids rejections at scale.

Why Automated Tools Still Need Human Oversight for Header Folding

You can’t rely solely on automated tools to catch header folding issues, even if they pass SPF, DKIM, and DMARC checks. Some templating engines and email service providers generate headers without enforcing line length limits, and edge cases—like long dynamic fields or nested content—can still produce malformed headers that trigger a 554 rejection at the SMTP level. This means your messages might pass validation internally but fail in transit, even if everything else looks correct.

How Folding Rules Get Bypassed in Practice

Even platforms that claim full compliance with RFC 5322 still sometimes drop the ball with complex content. For example, a dynamically generated campaign with a long subject line, multiple merge tags, or extended tracking parameters can silently create a header that exceeds the 78-character line limit. The SMTP server won’t accept this—no matter how clean the authentication checks are—and you’ll get a 554 error without any indication that the header was the real issue.

Let’s be clear: no email platform enforces header folding by default. Some ESPs like SendGrid or Mailchimp offer tools to validate basic syntax, but they don’t simulate the full SMTP handshake. They may show “valid” or “pass” on a dashboard, but that’s not the same as surviving real-world delivery. An email can pass all protocol checks and still hit a wall at the receiving server’s validation layer because of an improperly folded header.

This is where human oversight matters. You should treat header folding not as an afterthought, but as a core part of your deliverability pipeline. Tools like inbox placement testing help you simulate real delivery conditions, including how servers parse headers during connection. These tests verify not just authentication, but whether the full message structure—including line breaks in headers—survives the SMTP gate.

Even the most thorough automated system can miss a poorly folded header if the test data doesn’t include long, realistic content. That’s why we recommend including edge-case scenarios—especially in campaigns with highly dynamic fields—when validating your templates. A 554 rejection isn’t always about spam; it’s often about a single line that’s too long and violates a strict server rule.

For deeper verification, especially when scaling, bulk verification can help identify recurring header formatting issues across large sends. It isn’t just about catching invalid addresses—it’s about ensuring every delivered message meets the standards that actual mail servers enforce. If you automate the process, you must also audit the results for subtle, protocol-level failures that automation can overlook.

How Emaillistchecker.io’s Deliverability Tests Catch Header Issues

You can test if your email headers are folded correctly to avoid 554 rejection by sending a real email through Emaillistchecker.io’s inbox placement test. It simulates actual delivery from Gmail, Outlook, and Yahoo, checking for protocol-level issues like misfolded headers that break SMTP. If a header exceeds 78 characters without proper line folding, it triggers a 554 error — the test detects this and shows exactly when and why the connection failed, not just that it did.

Testing at the Protocol Level, Not Just in the Inbox

Most tools only check if an email arrives in the inbox. Emaillistchecker.io goes deeper. It mimics the full SMTP handshake used by major providers. During this handshake, it verifies that every header field — from From to Message-ID — is properly formatted, including correct line folding at 78 characters or less. Misfolded headers are a common cause of hard bounces, especially with strict filters like Gmail’s.

When a message fails due to a malformed header, the platform doesn’t just return “rejected.” Instead, it returns a clear diagnostic: “554 5.5.2 Error: message header too long” or “554 5.1.3 Bad sender address — headers misformatted.” This helps you isolate the issue to a specific field or line, not just assume it’s spam or an invalid address.

Header folding isn’t optional. It’s defined in RFC 5322, which requires email headers to be broken at 78 characters with a soft line break. Even small deviations can cause rejection. Emaillistchecker.io validates compliance with that standard in real SMTP environments, not in simulated checks that miss network-level failures.

Let’s say you’ve sent a newsletter with a long tracking URL in the Subject header. Most tools would flag it as spam or assume the address is bad. But Emaillistchecker.io shows that the SMTP server rejected the message during the DATA phase, not because of content, but because the header line exceeded the limit — and that’s exactly how 554 errors happen.

Use our inbox placement test to catch these protocol-level breakdowns before they damage your sender reputation. The same system that checks deliverability also reveals exactly how and why emails fail — no guesswork, no vague bounce codes. You’ll know if the problem was a misfolded header, a rejected domain, or a content filter.

Prevent 554 Errors Before They Happen

Header folding is invisible in most email clients but can trigger a 554 rejection at the server level, silently blocking delivery.

Testing header correctness before sending prevents avoidable bounces, protects sender reputation, and maintains inbox placement.

Use a deliverability testing service like Emaillistchecker.io to audit headers as part of your prep workflow. One fold error can cost thousands of undelivered messages — test early, test thoroughly.

Keep reading

Ready to put this into practice? Emaillistchecker.io verifies emails with 98.9% accuracy — start with 100 free verifications.

Frequently asked questions

What does SMTP 554 mean when sending an email?

A 554 error is a hard rejection from the receiving mail server during SMTP negotiation. It often indicates a structural issue, such as a misfolded header, invalid syntax, or policy block.

Can header folding trigger a 554 error?

Yes. If a header line exceeds 998 characters and is not properly folded with a soft line break (CRLF + space/tab), the server may reject it with a 554 error.

How long can an email header line be?

No header line should exceed 998 characters. This is defined by RFC 5322. Lines longer than this must be folded using a CRLF followed by a single space or tab.

How do I tell if my email headers are folded correctly?

Inspect the raw text of the email message. Use logging tools from your mail server or ESP to view the full SMTP transaction. Verify each line is under 998 characters and fold points use CRLF + one space or tab.

Should I manually check every email header?

For critical campaigns or large lists, yes. Use automated tools to validate structure, but always verify a sample to catch edge cases.

Can email verification tools like Emaillistchecker.io test header folding?

Yes — through its inbox-placement and deliverability testing, Emaillistchecker.io simulates real mail server interactions and flags structural errors like misfolded headers.

What happens if I send an email with a misfolded header?

The receiving server may reject the message with a 554 error, leading to a hard bounce. This reduces deliverability and can harm sender reputation.

Is header folding required for all email types?

Yes — all email messages must follow RFC 5322. Even transactional or marketing emails are subject to the same folding rules.

Do major email providers check header folding?

Yes — Gmail, Outlook, Yahoo, and others validate header syntax during SMTP handshakes. Malformed headers are often rejected without further inspection.

Can header folding cause delays?

Usually not. Misfolded headers cause immediate rejections (554), not delays. The error occurs before message processing begins.

How can I fix a misfolded header?

Reconstruct the header with proper CRLF followed by a single space or tab after long lines. Use a plain text editor with line length indicators to validate.

What’s the difference between hard and soft line breaks in email headers?

A hard line break (CRLF only) ends a line but does not continue it. A soft line break (CRLF + space/tab) allows continuation — required for folding long headers.