How to read email headers to find where a message was delayed
Email headers contain a complete record of every mail server a message passed through, including timestamps and processing details. Learning to read them is essential for diagnosing delivery delays. Unlike the visible message headers (From, To, Subject), full headers reveal the path taken by your email and where it may have stalled.
Understanding the Received line
The Received line is the most important header for delay diagnosis. Each mail server adds one Received line as it processes the message. Read them in reverse order (bottom to top) to follow the message journey from sender to recipient. Each line contains a timestamp and the server that processed it.
Received: from mail.example.com (mail.example.com [192.0.2.10]) by relay.isp.net (Postfix) with SMTP id 4K8xY9Z2 for <user@recipient.com>; Wed, 15 Jan 2025 14:32:18 +0000 Received: from sender-pc.local (192.0.2.50) by mail.example.com (Postfix) with ESMTP id 3J7wX8Y1 for <user@recipient.com>; Wed, 15 Jan 2025 14:31:45 +0000
In this example, the message left sender-pc.local at 14:31:45, arrived at mail.example.com, then reached relay.isp.net at 14:32:18. The time difference between consecutive Received lines shows where delay occurred. A gap of more than a few seconds between lines suggests a bottleneck at that server.
Identifying delay patterns
- →Large time gap between two Received lines: The server listed in the earlier line delayed the message before forwarding it.
- →Multiple Received lines from the same server: The message was queued or retried, indicating temporary issues like DNS lookups or connection problems.
- →Received lines with delay annotations: Look for phrases like 'delayed by' or queue wait times in the header text.
- →Missing Received lines: Some servers strip headers; this suggests filtering or security scanning.
- →X-Delay or X-Queue-Time headers: Some systems add custom headers documenting processing time.
Extracting and comparing timestamps
Most mail servers use RFC 2822 timestamp format: 'Day, DD Mon YYYY HH:MM:SS +ZZZZ'. Convert all timestamps to UTC to avoid confusion with time zones. Subtract the timestamp of each Received line from the next one (reading bottom-to-top) to calculate dwell time at each server.
Example calculation: Message left sender at: Wed, 15 Jan 2025 14:31:45 +0000 Arrived at mail.example: Wed, 15 Jan 2025 14:31:45 +0000 (0 seconds) Left mail.example: Wed, 15 Jan 2025 14:32:18 +0000 (33 seconds delay) Arrived at relay.isp: Wed, 15 Jan 2025 14:32:18 +0000 (0 seconds)
A 33-second delay at mail.example.com is within normal limits for spam filtering and virus scanning. Delays exceeding 5 minutes warrant investigation of that server's logs, queue depth, or resource constraints.
Common delay sources
- →Spam and virus scanning: 10-60 seconds is typical; excessive delays indicate misconfiguration or resource exhaustion.
- →DNS resolution failures: Causes retries; look for multiple Received lines from the same server with increasing timestamps.
- →Rate limiting: ISPs and mail services throttle messages; timestamps show regular intervals between retries.
- →Authentication checks (SPF, DKIM, DMARC): Can add 5-20 seconds per message during high volume.
- →Recipient server queue: If all Received lines show quick processing but final delivery is slow, the problem is on the recipient's end.
- →Network routing issues: Rare in email, but latency between servers shows in timestamp gaps.
When you identify a server causing delays, note its hostname and IP address, then contact that server's administrator or your ISP. Provide the full email header and the specific Received lines showing the delay. If the delay is at your own server, check mail queue depth, CPU and disk usage, and review logs for errors during that time window.