Made on Earth Donate

Why did this email land in spam, or take 40 minutes? Reading the headers bottom-up

14 November 2026 · 11 min read · by Varun Agrawal

The tool this post is aboutEmail Header Analyzer: Delays, SPF, DKIM & DMARCPaste an email’s headers to see every server it passed through and how long each hop took, and whether SPF, DKIM and DMARC passed and line up with the From address.

Two complaints reach anyone who runs email for a business, sooner or later. The first: “your newsletter went to my spam folder”, usually followed by “but we set up SPF and DKIM, the service said everything passed”. The second: “your password reset took 40 minutes to arrive, so I gave up”. Both sound like guesswork. Neither is. The message that misbehaved is carrying its own record of what happened, in the headers above the text, and once you know how to read them you can usually point at the line that explains it.

This post walks through both questions using one set of headers, run through the Email Header Analyzer: how the route is recorded and why you read it upside down, how to tell which server held the message, what SPF, DKIM and DMARC each actually prove, and the one rule, alignment, behind most “it passed but still went to spam” cases.

Where the answers are: the headers nobody reads

An email has two parts: the headers and the body. The body is what you read. The headers start with the familiar ones, From, To, Subject and Date, written by the sender’s mail program. Then every mail server that handles the message adds more, and it adds them at the top, above everything already there. Nothing is ever removed on the way.

Two kinds matter here. Each server that passes the message on writes a Received header: where it got the message from, who it is, which protocol was used, and the time on its own clock. And the server that takes the message in for your mailbox writes an Authentication-Results header with its verdicts: did SPF pass, did a DKIM signature verify, did DMARC pass. The spam filter usually adds its own lines too.

Mail programs hide all of this, because it is long and hostile. A message sent through Microsoft 365 to a Gmail address easily carries 80 lines of headers, many of them base64 noise. Gmail shows them under Show original, Outlook under File → Properties → Internet headers, Apple Mail under View → Message → All Headers. That is where both answers are.

Reading Received headers from the bottom up

Because each server adds its Received header on top, the list reads backwards in time. The topmost Received is the last step, your own provider handing the message to your mailbox. The bottom one is the first step, usually the sender’s application or mail server handing the message to its outgoing mail system. To follow the message forward you read from the bottom up.

Each line has the same skeleton, although every mail server writes it slightly differently:

Received: from o25.em.example.net (o25.em.example.net. [198.51.100.25])
        by mx.google.com with ESMTPS id 41be03b00d2f7-…
        for <reader@example.org>
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Fri, 13 Nov 2026 01:52:18 -0800 (PST)
  • from: the server that connected, with the name it greeted with, the name its address resolves to, and the address itself. The address is recorded by the receiving server from the actual connection, so it is the part that can’t be made up by the sender (for that hop).
  • by: the server writing the line.
  • with: the protocol. ESMTPS means the hop was encrypted with TLS, ESMTPSA encrypted and logged in (a mail program or app submitting mail), plain SMTP or ESMTP unencrypted. Microsoft writes Microsoft SMTP Server with the TLS version in brackets.
  • After the last semicolon: the time, on that server’s clock, with its own time zone.

The delay of a hop is the difference between its time and the time of the hop below it. Do that subtraction across a dozen lines in four time zones by hand and you will get one of them wrong, which is the main reason a tool helps here.

A worked example: the newsletter that took 40 minutes and went to spam

Here is the case we will follow. A bookshop, Northwind Books, sends its monthly reading list from news@example.com. Its website hands the mail to a newsletter service, which sends it out from its own servers. A reader with a Gmail address reports two things: the email arrived about 40 minutes after it was sent, and it was in spam. (Every name, domain and address here is invented, from the ranges reserved for examples.)

The reader sends the headers from Show original. Pasted into the analyzer, the Received lines come out like this, oldest first, times in UTC:

StepTime (UTC)What happenedDelay
Date header09:12:40Written by the bookshop’s website
109:13:52from app-3.example.com [203.0.113.40] by queue-07.mailer.example.net, ESMTPSA+1 min 12 s
209:52:17from queue-07.mailer.example.net by o25.em.example.net, ESMTP+38 min 25 s
309:52:18from o25.em.example.net [198.51.100.25] by mx.google.com, ESMTPS, TLS 1.3+1 s
409:52:19Inside Google, to the mailbox+1 s

The whole trip took 39 minutes 39 seconds from the Date header to the mailbox, and the analyzer’s note says the slowest hop accounts for 97% of it. That hop’s line was written by o25.em.example.net, the newsletter service’s sending server, and says it received the message from queue-07, the service’s own queue, at 09:52. The queue had accepted it from the bookshop at 09:13. So the message sat inside the newsletter service for 38 minutes before going anywhere. Gmail took it in one second after it was sent.

That is a useful answer. It isn’t Gmail, it isn’t the reader’s connection, and it isn’t the bookshop’s website. It is the sending service’s queue, which for a bulk send is normal: services pace large campaigns to stay under each mailbox provider’s rate limits, and a password reset routed through the same queue as a 50,000-address newsletter waits its turn. The fix is to send transactional mail (resets, receipts) through a separate stream or service that isn’t queued behind campaigns.

Reading delays: what a long hop usually means

  • Inside a sending service, between two of its own servers: a queue. Bulk mail is throttled on purpose.
  • At the first server of the receiving side, after a gap: often greylisting. The receiver told the sender “try again later” on the first attempt, and the sender’s retry schedule decided the delay, commonly 5 to 30 minutes.
  • Between two servers of the receiving organisation: a security gateway or attachment sandbox scanning the message.
  • Between the Date header and the first server: something on the sender’s side. The Date comes from the mail program, so an outbox waiting for a network, a scheduled send or a laptop that was asleep all show up here.
  • A negative delay: two clocks that disagree. A few seconds backwards is normal clock skew; an hour usually means a server with its time zone set wrong.

SPF, DKIM and DMARC: what each one proves

Now the spam folder. The topmost Authentication-Results header, written by mx.google.com, says:

dkim=pass header.i=@example.net header.s=s1 header.b=Xk3vQ9pL;
spf=pass (google.com: domain of bounce+7f3a2c@em.example.net designates
    198.51.100.25 as permitted sender) smtp.mailfrom="bounce+7f3a2c@em.example.net";
dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=QUARANTINE) header.from=example.com

Two passes and a fail. This is exactly the situation where the sender says “but SPF and DKIM pass”, and they are right, and it doesn’t help. To see why, it helps to be precise about what each check proves.

SPF checks that the server that connected is allowed to send mail for a domain. But not the domain in the From address: the domain of the envelope sender, the address bounces go to, which ends up in the Return-Path header. Newsletter services set the envelope sender to their own bounce-handling domain so they can process bounces for you. Here it is bounce+7f3a2c@em.example.net. So SPF proved that 198.51.100.25 may send for em.example.net. True, and says nothing about example.com.

DKIM checks a signature over the message: the signing domain publishes a public key in DNS, and if the signature verifies, the signed headers and the body haven’t changed since that domain signed them. The signing domain is the d= in the DKIM-Signature header, and it can be any domain that has a key. Here it is example.net, the newsletter service’s own domain, because the bookshop never set up signing for its own domain in the service. DKIM proved that example.net signed this message. Also true, also nothing about example.com.

DMARC is the one that connects the checks to the address people actually see. It passes only if SPF or DKIM passes for a domain that lines up with the From domain. And example.com published a DMARC record with p=quarantine: “if mail claiming to be from us fails DMARC, put it in spam”. Gmail did as it was asked.

Alignment: the rule that trips up third-party senders

“Lines up” has a name, alignment, and two strengths.

Relaxed alignment, the default, accepts any domain with the same organisational domain as the From domain. The organisational domain is the part someone registered: news.example.com and bounce.example.com both belong to example.com. Finding it isn’t as simple as keeping the last two labels, because of suffixes like co.uk: shop.example.co.uk belongs to example.co.uk, and co.uk isn’t anybody’s. So the analyzer, like real receivers, uses the Public Suffix List, the same list the WHOIS lookup uses to find where a registration starts.

Strict alignment, set with adkim=s or aspf=s in the DMARC record, needs the exact same name.

For our newsletter the analyzer’s alignment table reads:

CheckDomainOrganisational domainResultRelaxedStrict
SPF (Return-Path)em.example.netexample.netpassnot alignednot aligned
DKIM d= (selector s1)example.netexample.netpassnot alignednot aligned

Both passes belong to example.net. The From address is example.com. No row both passes and aligns, so DMARC fails, and the analyzer’s top finding says so in one line: what passed belongs to example.net, not example.com, the usual result of sending through a newsletter, CRM or helpdesk service without setting up DKIM for your own domain there.

The fix, checked the same way

Every serious sending service has a page called something like “domain authentication” or “sender authentication”. It gives you two or three DNS records to publish, usually CNAMEs that point a selector under your domain at a key the service manages. After that, the service signs your mail with d= your own domain or a subdomain of it.

Change only that in the example, so the signature says d=news.example.com, and run the headers through the analyzer again. The DKIM row now reads: news.example.com, organisational domain example.com, pass, aligned under relaxed alignment, not under strict. The SPF row is still not aligned, because bounces still go to the service’s domain, and that doesn’t matter: DMARC needs only one aligned pass. The overall result turns to pass, and the only finding left is the 38-minute queue.

Two things are worth noticing. First, you don’t need to make SPF align; many services can’t, and DKIM alignment is the sturdier of the two anyway, because SPF breaks whenever a message is forwarded (the forwarder’s server isn’t in your SPF record) while a DKIM signature survives as long as nobody edits the message. When the analyzer sees DMARC passing on SPF alone with DKIM passing only for some other domain, it points that out for this reason. Second, if your DMARC record says adkim=s, a subdomain signature won’t do: you need d=example.com exactly. Tick the DNS box in the analyzer and it reads your DMARC record and uses its own setting.

Which verdicts to trust

One trap when reading results headers by hand: Authentication-Results is just text, and anyone can put one into a message before sending it. A phishing message can arrive carrying a header that says dkim=pass; dmarc=pass, written by the phisher.

What protects you is position. Your provider adds its own results on arrival, above everything that was already there, and well-behaved providers delete any results header that claims their name from incoming mail. So the topmost Authentication-Results is the one to read. The analyzer takes its verdicts from that header and names the server that wrote it. Others are listed underneath with a note; one that claims your provider’s name but sits below the Received line where your provider took the message in was already in the message on arrival, and is called out as forged or left over.

There are honest reasons for several results headers: a company security gateway in front of Microsoft 365 adds one, then Microsoft adds another; mailing lists and forwarding services add ARC-Authentication-Results to vouch for what they saw before forwarding broke SPF. The analyzer shows those too, but still reads the topmost one as the receiver’s decision.

And one limit to be honest about: a DKIM signature covers the body as well as the headers, so it can’t be re-verified from a header paste. Nobody can do that without the whole message. The pass or fail is the receiving server’s, which had the whole message. What the analyzer adds is the part that only needs domains: the alignment.

Limits and tips

  • Get the headers from the recipient. Headers copied from your own Sent folder have no Received lines and no verdicts yet: they were saved before the message left. Ask someone who received it, ideally the person who found it in spam.
  • Paste everything. Gmail’s Show original page has a summary box at the top; the analyzer skips it and reads the headers below. A whole .eml file works too, and the browser sends only the headers.
  • Look at the spam filter’s own lines. Microsoft 365 writes a spam confidence level (SCL, 5 and above is Junk), a bulk complaint level (BCL) and the folder it chose (dest:J is Junk); SpamAssassin writes a score and the rules that fired. Gmail writes nothing, so with Gmail the authentication results are your main clue.
  • Check Reply-To. A message from billing@ one domain whose replies go to another domain is ordinary for a helpdesk and a classic trick in invoice fraud. The analyzer flags it whenever the organisational domains differ.
  • DNS has moved on. The live lookup reads today’s DMARC record and DKIM key. If a key was rotated after the message was sent, it shows as missing now even though it verified then.
  • Clocks lie a little. Delays of a few seconds either way are within normal clock drift between servers. Look for minutes.

Most email mysteries come down to one of two lines: a Received header with a long gap below it, or an Authentication-Results header where the passes belong to someone else’s domain. Paste the headers into the Email Header Analyzer and both are on the first screen. If the fix involves DNS, the DNS lookup shows your SPF, DKIM and DMARC records as the rest of the internet sees them.

Try it now, freeEmail Header Analyzer: Delays, SPF, DKIM & DMARCPaste an email’s headers to see every server it passed through and how long each hop took, and whether SPF, DKIM and DMARC passed and line up with the From address.

More from the blog

All posts →