How an email finds your mail server
Sender
you@gmail.com
MX lookup
who takes mail?
Mail server
priority 10 first
Inbox
delivered
Lowest priority number wins; higher numbers are backups
How to Trace an Email's Original Sender IP Address from Headers
When an unfamiliar or suspicious message lands in an inbox, the visible From: line provides almost zero reliable forensic evidence. The Simple Mail Transfer Protocol (SMTP, RFC 5321) was designed without sender identity verification. Any client can insert arbitrary strings into the RFC 5322 From: header. The real proof lives in the unrendered transport headers—specifically the Received: chain stamped chronologically by every Mail Transfer Agent (MTA) handling the message.
How an email finds your mail server
Sender
you@gmail.com
MX lookup
who takes mail?
Mail server
priority 10 first
Inbox
delivered
Lowest priority number wins; higher numbers are backups
RFC 5321 vs RFC 5322: Envelope Sender vs Message Header
To trace an email accurately, you must distinguish between the SMTP envelope sender and the message header address. During an SMTP session, the client issues MAIL FROM:<bounce@example.com>. This is the envelope sender (Return-Path), used by mail systems for bounce handling and SPF validation. The address shown in email clients (From: Executive <ceo@company.com>) is merely part of the RFC 5322 message payload.
Phishing campaigns exploit this separation: an attacker can use an envelope sender authorized on their own domain to pass SPF, while spoofing a target brand in the visible header. Tracing the true sender requires parsing the transport headers that record the physical IP initiating the connection.
How to View Raw Email Headers Across Major Clients
Modern email clients conceal technical headers behind a graphical interface. To view the unrendered RFC 822 MIME source:
- Gmail (Web): Open the message, click the three vertical dots next to Reply, and choose Show original.
- Microsoft Outlook (Desktop): Double-click the email, select File > Properties, and inspect the Internet headers box.
- Outlook on the Web: Click the ellipsis (...) on the message bar and select View > View message details.
- Apple Mail (macOS): Choose View > Message > Raw Source or press
Cmd + Option + U. - Mozilla Thunderbird: Highlight the message and press
Ctrl + U(orCmd + U).
The Anatomy of the Received Header Chain
The fundamental operational rule of email forensics is that Received: headers are prepended. Every time an MTA receives a message and relays it, it attaches a new Received: block to the very top of the existing headers. Consequently, analyzing an email trace requires reading headers in reverse order—from bottom to top.
Received: from mail-relay-04.destination.com (mail-relay-04.destination.com [198.51.100.22])
by mx.yourcompany.com with ESMTPS id 4Zb9K12m
for <recipient@yourcompany.com>; Wed, 23 Oct 2026 14:15:22 +0000
Received: from outbound-mta.mailservice.com (outbound-mta.mailservice.com [203.0.113.88])
by mail-relay-04.destination.com with ESMTPS id 3Ya8J11k
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384);
Wed, 23 Oct 2026 14:15:20 +0000
Received: from submission-node.corp.internal (unknown [192.168.4.15])
by outbound-mta.mailservice.com with ESMTPA id 2Xz7H00j
for <recipient@yourcompany.com>; Wed, 23 Oct 2026 14:15:18 +0000In the trace above, the bottommost line records authenticated client submission (ESMTPA). The middle header shows outbound-mta.mailservice.com handing off to mail-relay-04.destination.com. The topmost header is stamped by your own mailbox provider's inbound MX host.
Establishing the Boundary of Trust
Filtering Out Private and Non-Routable IP Addresses
When inspecting the initial submission hop, you will often notice non-routable private IP addresses defined in RFC 1918 or RFC 6598:
10.0.0.0/8and172.16.0.0/12: Private intranet and cloud VPC subnets.192.168.0.0/16: Local consumer Wi-Fi and office LAN subnets.100.64.0.0/10: Carrier-Grade NAT (CGNAT) assigned by mobile operators.127.0.0.0/8: Local loopback interface.
These addresses cannot be routed across the public internet. If a Received: line shows from workstation.lan (192.168.1.45), that IP identifies a machine on the sender's local subnet. Skip past private subnets until you reach the first public IPv4 or IPv6 address recorded by an internet-facing MTA.
Webmail vs Desktop Mail Clients
When a user sends an email through webmail interfaces like Gmail, Microsoft 365, or iCloud, the web browser talks to internal cloud APIs. The outgoing SMTP message originates directly from the provider's datacenter IP range. In these cases, the headers show only provider infrastructure. Desktop clients like Thunderbird or Outlook connecting over port 587, however, often have their public IP stamped in the initial submission hop or an X-Originating-IP header.
Validating the Sender IP with Reverse DNS (PTR) and FCrDNS
Once you isolate the public IP of the sending mail server, verify its network identity using Forward-Confirmed Reverse DNS (FCrDNS, RFC 1912 Section 1.5):
Query the PTR Record
Perform a reverse DNS lookup to find the pointer hostname:
dig -x 203.0.113.88 +short.Perform Forward Confirmation
Query the forward A record for that hostname:
dig A outbound-mta.mailservice.com +short.Compare Addresses
If the forward A record matches the original IP, the host passes FCrDNS, confirming administrative alignment between the IP and hostname.
Header Comparison: Forensic Reliability Matrix
| Header Field | Source Authority | Forensic Trustworthiness |
|---|---|---|
| From: | Client MUA | Untrusted (Easily spoofed in UI) |
| Return-Path: | Receiving MTA | High (Records envelope MAIL FROM address) |
| Received: (Top) | Your Mailbox Provider | Absolute (Generated by your trusted infrastructure) |
| Received: (Bottom) | Originating Relay | Moderate (Reliable only if preceding hops are verified) |
| Authentication-Results: | Border Inbound MTA | High (Verifies SPF, DKIM, and DMARC verdicts) |
| X-Originating-IP: | Submitting MTA | Low to Moderate (Optional and vendor-dependent) |
Key takeaway
Email tracing begins at your provider's trusted boundary. Start with the top Received header added by your receiving MX server and trace downward to find the first public hop. Validate that IP using reverse DNS and SPF rather than relying on visible From lines.
Check your result and continue troubleshooting
Use the reverse dns lookup tool to inspect the public DNS data relevant to this guide. Record the hostname, query type, resolver and time so you can compare results after a change. This is a DNS check, not a guarantee of worldwide propagation or successful application delivery.
For the underlying behavior and current configuration guidance, consult the official reference. Provider dashboards can change; use the values shown for your own domain rather than copying an example into production.
Need to check a domain's public DNS addresses? Use the Domain IP Lookup tool.
Free tools for this topic
Frequently asked questions
Related reading
How an email finds your mail server
Sender
you@gmail.com
MX lookup
who takes mail?
Mail server
priority 10 first
Inbox
delivered
Lowest priority number wins; higher numbers are backups
Email DNS Records Explained: MX, SPF, DKIM and DMARC
A practical guide to the DNS records email depends on, how routing and authentication work together, and what to verify after a mail migration.
Reverse DNS runs the lookup backwards
IP address
93.184.216.34
the starting point
PTR lookup
in-addr.arpa: their zone, not yours
Hostname
the answer
The reverse zone belongs to whoever owns the IP block, not the domain owner
Reverse DNS Lookup Explained: PTR Records and IP Addresses
The lookup that runs backwards: why your hosting provider controls it, and why missing it quietly sends your email to spam.
The records you will meet in nearly every zone
SPF, DKIM and DMARC Explained: Email DNS TXT Records
Three TXT records stand between your email and the spam folder. What each one does, how to read the syntax, and the safe order to deploy them.