New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 26 Oct 2026

SMTP Retry Schedules: How Long Queued Mail Is Retried and How to Tune Backoff and Expiry

How MTAs retry temporary failures: backoff intervals, queue lifetime, warning notices, differences between servers, Postfix settings, application-level retries and how to choose values for transactional and bulk mail.

EB
Written by Ethan Brooks
Transactional Email Specialist
Reviewed by Tomasz Kowalski
  • Published11 Mar 2025
  • Read time6 min
  • Length1,293 words
Share this guide

SMTP was built on the assumption that networks and servers fail, and that failure is often temporary. When a remote server answers with a 4xx code, times out or is unreachable, the sending MTA does not give up. It stores the message in a queue and tries again later, and again after that, until delivery succeeds or a limit is reached. The details of this schedule decide how quickly mail arrives after an outage, how many connections you open against a struggling provider, when senders get warnings and when a message finally bounces. This guide explains how retry schedules work, what common servers do by default, how to tune them for transactional and bulk traffic and how application-level retries should fit on top. It extends managing the mail queue, rate limits and backoff and reading mail logs.

PrincipleTemporary failure means queue and retry with growing intervals until a deadline
DeadlineThe queue lifetime; typical defaults are several days
TuningShorter lifetimes suit time-sensitive mail; longer ones suit resilience
LayeringLet the MTA handle delivery retries; let the application handle submission retries

Which failures are retried

SituationRetried?Notes
4xx reply from the remote server (for example 421, 450, 451, 452)YesThe server said try again later. See 421 errors
Connection refused or timed outYesNetwork or server outage
DNS temporary failureYesResolver or authoritative server problem
TLS handshake failure when TLS is requiredDepends on policySome policies retry, some fail permanently
5xx reply (550, 553, 554 and so on)NoPermanent failure; the message bounces
Domain does not exist (NXDOMAIN)NoPermanent
Greylisting 4xx on first contactYesExpected to pass on a later attempt. See greylisting
Mailbox full 4xxYes, for a whileMay become a bounce at expiry

How backoff works

Retrying at a constant rapid pace would hammer a failing server and fill your logs. MTAs therefore back off: the interval between attempts grows after each failure, up to a maximum. An illustration of a typical pattern:

AttemptApproximate delay since previous tryCumulative time
1Immediate0
25 to 10 minutes10 minutes
3About 15 minutes25 minutes
4About 30 minutes1 hour
5About 1 hour2 hours
6About 2 to 4 hours6 hours
LaterUp to the maximum backoff interval (commonly a few hours)Until the queue lifetime ends

Exact numbers differ between MTAs and settings; the table shows the shape. Some servers also randomise a little so that thousands of queued messages do not all retry at the same second. A newly queued message is typically tried again within minutes, while a message that has been failing for two days is tried only every few hours.

Postfix parameters

# /etc/postfix/main.cf
minimal_backoff_time = 300s          # first retry interval
maximal_backoff_time = 4000s         # cap on retry interval
maximal_queue_lifetime = 5d          # give up and bounce after this long
bounce_queue_lifetime = 5d           # same limit for bounce messages
queue_run_delay = 300s               # how often the queue manager scans deferred mail
delay_warning_time = 4h              # send the sender a "still queued" notice (0 = off)
smtp_connect_timeout = 30s
smtp_helo_timeout = 300s

Each setting has a clear role. maximal_queue_lifetime sets the deadline after which a deferred message bounces; five days is a conservative default that survives long weekends and multi-day provider incidents. delay_warning_time makes Postfix send the original sender a warning that delivery is delayed, which is useful for human senders and noise for automated ones, so it is often disabled on application relays. Remember that bounces and warnings use the null sender; see the null sender. Other MTAs use equivalent options: Exim has retry rules by domain and error type, Sendmail uses queue run intervals and Timeout.queuereturn, and managed relays expose a retry window in their settings or documentation.

Choosing values

Kind of mailSuggested approachReason
Password resets, one-time codesShort lifetime (for example 1 to 4 hours), then fail fast and tell the applicationA code that arrives next day is useless
Order confirmations, receiptsModerate (for example 1 to 2 days)Still valuable later, but the customer expects speed
Newsletters and campaignsHours to 1 day for time-bound offers; longer for evergreen contentAvoid delivering last week's sale next week
Alerts and monitoringShort lifetime plus another channelA stale alert misleads
Internal business mailStandard (several days)Resilience matters more than speed
Mail to a destination with a known long outageHold the queue for that domain, do not hammer itManual control saves resources

If you shorten the lifetime for time-sensitive mail, make sure the application learns the outcome: use webhooks or log events to notify your system when a message expires so that it can resend through another channel. See delivery events.

Retries at different layers

  • Application to relay (submission). If the relay does not accept the message, because of a timeout or a 4xx, the application must retry with backoff and, where possible, an idempotency key so that a retry cannot send twice. See idempotency and retries.
  • Relay to recipient (delivery). The MTA handles this with the schedule described here. The application should not resubmit a message that was accepted.
  • Recipient provider internals. After acceptance, the receiving provider may delay or filter; those retries are invisible to you.
  • Webhook delivery to your endpoint. Your platform retries event callbacks separately. See webhook reliability.

A common error is double retrying: the application times out waiting for a response, resubmits, and the recipient receives the message twice because the first submission had actually been accepted. Combine timeouts with idempotency keys or message identifiers and check the relay's record before resending.

Reading retry behaviour in logs

Each attempt produces a log line with status=deferred and the remote reason. The sequence of timestamps for one queue ID shows the actual backoff. Look for the pattern of reasons: identical rate-limit text means you should slow your sending to that provider, a connection timeout suggests a network or firewall issue, and a changing set of reasons may point to a flapping remote system. Use the commands in the log guide to count deferrals by reason and domain, and check the queue size over time.

Example timeline of an outage

Suppose a recipient provider has a four-hour incident beginning at 10:00. A message submitted at 10:05 is tried at once and receives a temporary error, so it is queued. It is retried after a few minutes, then after about a quarter of an hour, then about an hour, with each attempt logged as deferred. By 14:30 the provider has recovered and the next scheduled attempt succeeds, so the message is delivered a little over four hours late. Nothing was lost, no one had to resend and the sender received at most a delay warning if one was configured. Now imagine the same incident with a one-hour queue lifetime: the message would bounce at 11:05, the sender would receive a failure notice and the application would have to decide whether to resend. Neither behaviour is wrong; they simply represent different promises about timeliness, which is why the lifetime should match what the mail is for.

Practical guidance

  1. Keep defaults unless you have a reason; they were chosen for resilience.
  2. Shorten lifetimes only for streams where late delivery is harmful, and ideally use separate relays or queues for them.
  3. Do not set the minimum backoff extremely low; fast retries against a rate-limiting provider make things worse.
  4. Disable delay-warning notices for automated senders so you do not create noise.
  5. Monitor queue age, not only queue size: a small queue of very old messages is a warning sign.
  6. Document the schedule in your runbook so support staff can tell customers when a message will finally bounce.
  7. During provider outages, resist the urge to flush the queue repeatedly; let backoff protect both sides.

The retry schedule is a quiet part of email reliability. Understand how it behaves, tune it for the kinds of mail you send and make sure applications and webhooks cover what the MTA cannot, and temporary trouble will mostly stay invisible to your users.

Send through a managed relay Retries, queues and events handled for you.

Explore SMTP relay

References and further reading

Frequently asked questions

How long does an MTA retry a deferred message?

Often about five days by default, with intervals growing from minutes to hours, but it depends on the server settings.

Which errors are retried?

Temporary failures such as 4xx replies, timeouts, connection failures and temporary DNS errors; 5xx replies are permanent and bounce.

Should I shorten the queue lifetime for password resets?

Often yes, to a few hours, as long as the application is told when delivery fails so it can offer another route.

What is a delay warning?

A notice to the sender that a message is still queued, controlled by settings such as delay_warning_time in Postfix.

How do I avoid duplicate sends on retries?

Use idempotency keys or message identifiers and check whether the relay already accepted the message before resubmitting.

Topics#retries#queue#backoff#postfix#deferrals
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales