How would I know if an e-mail originates from Office 365?

I know I can look at the oldest Received header of a message to see where it originates from, but how would I use that header value to know it was sent from an Office 365 account?

It looks like the TLD exchangelabs.com is a candidate, but I'd like to know for sure.

Dani AI

Generated

Short answer: a single relay hostname alone is not definitive. was right to inspect the oldest relay, noted a first-hop look can point to a consumer service, and is correct that clients can be configured to use any SMTP host. The reliable approach is to combine (1) the earliest relay IP ownership, (2) standard mail-auth results, and (3) Exchange/Microsoft-specific transport headers — together they give a high-confidence answer.

A practical checklist:

  • Find the earliest external hop and note the sending IP (the first relay outside the sender�s environment).
  • Do a reverse-DNS and WHOIS/ASN lookup on that IP to see if the netblock belongs to Microsoft.
  • Inspect authentication headers (Authentication-Results): look for SPF pass, a valid DKIM signature that aligns with the From header, and DMARC alignment. Passing auth results from Microsoft-owned infrastructure is strong evidence.
  • Look for Exchange Online transport headers (the X-MS-* family added inside Microsoft mailflow) — their presence supports Office 365 handling.
  • Cross-check the sending IP against Microsoft�s published mail IP ranges (see Microsoft�s Office 365 IP web service) to confirm ownership.

Cautions: hybrid setups, partner relays, or third-party mail services authorized by a tenant can make attribution ambiguous. For incident-level certainty, correlate with tenant audit/mail trace logs from the sender�s Microsoft 365 admin or request provider logs. For published ranges and guidance on email authentication see Microsoft documentation: Office 365 IP Address and URL web service and .

Recommended Answers

All 4 Replies

I think it is outlook.com as first hop from server to your mailbox.

I think it is outlook.com

That's what I thought before looking into any e-mails. Did not find a single instance.

In Outlook you can configure the outgoing server(s) to be whatever you want (eg Google). There's absolutely no requirement to use outlook.com or any other particular server.

That I understand, I am not trying to determine whether it was sent with the Outlook application, but with Outlook/Office SMTP (server).

If it was sent with GMail then the first/oldest Received header would contain the TLD google.com or gmail.com (I checked).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.