Messaging Fundamentals Series

📤 Understanding Mail Queues and Bounces From a "Top 1%" Perspective: What's the Difference Between a Soft Bounce and a Hard Bounce?

Introduction

This article is part of the Top 1% Series Complete Article Guide, the 5th article in the Mail Infrastructure Series.

Prerequisite Knowledge

The Big Picture

graph TB
    Send["Mail sent"]
    Try["Attempt an SMTP connection<br/>to the destination server"]
    Code{"What's the SMTP response code?"}
    Success["250: delivery succeeded"]
    Soft["4xx: temporary error<br/>(soft bounce)"]
    Hard["5xx: permanent error<br/>(hard bounce)"]
    Queue["Re-queue and<br/>retry after an interval"]
    Bounce["Send an error notification<br/>(a bounce email) to the sender"]
    Send --> Try --> Code
    Code -->|"2xx"| Success
    Code -->|"4xx"| Soft --> Queue --> Try
    Code -->|"5xx"| Hard --> Bounce

A Thorough, Grounds-Up Explanation

The Mail Queue: Not Giving Up Right Away, Even Without Immediate Delivery

When Postfix accepts a piece of mail, it first stores it temporarily in a queue (under /var/spool/postfix/). Even if it attempts a connection to the destination server and fails, it doesn’t discard the mail on the spot — it keeps it in the queue and retries after an interval. The mailq command lets you list mail currently sitting in the queue.

mailq

Soft Bounce vs. Hard Bounce: The First Digit of the SMTP Response Code Decides Its Fate

The response code from the destination server carries an entirely different meaning depending on its leading digit.

Response CodeCategoryMeaningPostfix’s Behavior
2xxSuccessDelivery completed normallyRemoved from the queue
4xxTemporary error (soft bounce)The recipient’s mailbox is full, temporary overload, and similarKept in the queue, retried later
5xxPermanent error (hard bounce)The destination address doesn’t exist, the domain doesn’t exist, and similarNot retried; an error notification (a bounce email) is sent to the sender

Remembering the distinction — 4xx (soft bounce) is a temporary state, “no good right now, but might succeed later,” while 5xx (hard bounce) is a permanent state, “will never succeed no matter how many times you try” — lets you predict how Postfix will behave next just by seeing the response code.

An Expiration: Retries Don’t Continue Forever

Even soft-bounce retries have an upper limit, maximal_queue_lifetime (5 days by default). If delivery still hasn’t succeeded once this period elapses, Postfix gives up and sends a bounce email back to the sender.

What a Pro Sees Here (Top 1% Understanding)

Why a Bounce Email’s Sender Address Is “Blank”

Look closely at a bounce email, and you’ll notice its sender address (MAIL FROM) is empty (<>). This is a deliberate design choice, distinct from an ordinary mail send, as covered in The Top 1% Hands-On for Building a Mail Server With Postfix and Dovecot’s treatment of SMTP and MAIL FROM. If a bounce email itself carried a normal sender address, delivery of that bounce email failing would produce a bounce-of-a-bounce, and that chain could repeat infinitely. Using an empty sender address (the null sender, <>) deliberately forbids generating a bounce for a bounce, at the protocol level.

Why Bounce Rate Directly Determines a Bulk Sender’s Reputation

Major mail providers like Gmail and Outlook monitor the rate of hard bounces, per sending domain and IP address, as a key signal for judging a sender’s reputation. A source that keeps sending large volumes to nonexistent addresses gets judged as likely running sloppy list management — a probable spammer — and even a legitimate newsletter can end up routed to spam, or rejected outright. Anyone handling email marketing in real-world work needs to promptly remove any address that produces a hard bounce from future send lists, to protect their sender reputation.

Common Misconceptions and Pitfalls

Troubleshooting Perspective

  1. Mail isn’t arriving for a while: Check mailq for anything stuck in the queue, and use postqueue -p to check the detailed status.
  2. Mail to a specific address never seems to arrive: Check the response code in mail.log to separate 4xx (a temporary error, possibly still retrying) from 5xx (a permanent error, likely already bounced).
  3. Legitimate marketing email started landing in spam: Check whether your recent hard-bounce rate has risen, and remove invalid addresses from the list.

Summary

Takeaways to Apply Today

  1. When troubleshooting mail delivery, first separate whether the response code is 4xx or 5xx.
  2. If you handle email marketing, promptly remove any address that produces a hard bounce from your list.

References

Comments

Feel free to leave thoughts, questions, or corrections below (sign in with a GitHub account to comment or react).