Exchange Message Tracking Logs record every email delivery path through the transport pipeline — sender, recipients, subject, message ID, delivery status, and connector used. Combined with SMTP Protocol Logs that capture raw SMTP transactions, these logs enable complete email flow reconstruction for BEC investigations, phishing campaigns, and data exfiltration via email.
What Are Exchange Server Logs?
Microsoft Exchange Server generates two primary log types for forensic analysis: Message Tracking Logs record the complete delivery path of every email message processed by the transport pipeline, and Protocol Logs capture raw SMTP conversation transcripts between Exchange and other mail servers. Together, they provide end-to-end visibility into email delivery, from the moment a message enters the organization to its final delivery (or rejection).
Message Tracking Logs are CSV files containing fields such as date-time, sender-address, recipient-address, message-subject, message-id, event-id (RECEIVE, SEND, DELIVER, FAIL, etc.), source, connector-id, and total-bytes. Each message generates multiple log entries as it passes through transport agents, content filtering, and delivery queues. The message-id field ties all entries for a single message together across multiple log files.
Exchange Online (Office 365) provides equivalent functionality through the Search-MessageTrackingReport cmdlet and the Microsoft 365 Defender message trace feature, though with different retention periods (default 10 days for detailed trace, 90 days for summary data). On-premises Exchange retains message tracking logs for 30 days by default, configurable via Set-TransportService.
Message Tracking Logs are the only artifact that records the complete delivery path of an email through an Exchange organization. Unlike client-side artifacts (OST/PST), they capture messages that were rejected, quarantined, or routed to journal mailboxes — providing evidence of email activity that never reached the user’s inbox.
Location & Format
| Log Type | Path (Exchange 2016/2019) | Format |
|---|---|---|
| Message Tracking | C:\Program Files\Microsoft\Exchange Server\V15\TransportRoles\Logs\MessageTracking\ | CSV with W3C-style headers |
| SMTP Send Protocol | ...\TransportRoles\Logs\Hub\ProtocolLog\SmtpSend\ | W3C Extended Log Format |
| SMTP Receive Protocol | ...\TransportRoles\Logs\Hub\ProtocolLog\SmtpReceive\ | W3C Extended Log Format |
| Connectivity Log | ...\TransportRoles\Logs\Hub\Connectivity\ | CSV |
| Agent Log | ...\TransportRoles\Logs\Hub\AgentLog\ | CSV |
Key Message Tracking Fields
| Field | Description | Forensic Value |
|---|---|---|
date-time | UTC timestamp of the event | Precise timeline of email processing |
event-id | RECEIVE, SEND, DELIVER, FAIL, EXPAND, REDIRECT, RESOLVE, etc. | Tracks message through each pipeline stage |
sender-address | SMTP sender (envelope From) | True sender identification |
recipient-address | SMTP recipient(s) | All recipients including BCC |
message-subject | Email subject line | Content identification without message body |
message-id | RFC 5322 Message-ID header | Unique identifier to correlate across systems |
total-bytes | Message size in bytes | Identifies messages with large attachments |
source-context | Additional delivery context | Connector, rule, or agent that processed the message |
What It Reveals
- Complete email delivery timeline — Every stage from reception to delivery, with sub-second timestamps.
- All recipients including BCC — BCC recipients appear in tracking logs even though they are hidden from other recipients.
- Failed deliveries and rejections — Messages blocked by content filters, transport rules, or recipient validation.
- Auto-forwarding rules — REDIRECT events reveal mailbox rules forwarding email to external addresses.
- Distribution list expansion — EXPAND events show which individual recipients received messages sent to distribution groups.
- Message size and attachment indicators —
total-bytesidentifies messages carrying large attachments. - Connector and routing path — Which send/receive connectors processed the message, revealing mail flow architecture.
- Journal and compliance copies — JOURNAL events confirm whether messages were captured by journaling rules.
Forensic Use Cases
1. BEC Wire Fraud Investigation
A fraudulent wire transfer request was sent from a compromised vendor email account. Message Tracking Logs show the RECEIVE event for the phishing email, identifying the source IP of the sending server, the SMTP envelope sender, and the exact delivery timestamp. Protocol Logs contain the full SMTP EHLO conversation, revealing the sending server’s hostname and TLS certificate.
2. Insider Email Exfiltration
A departing employee creates a mailbox rule that auto-forwards all received email to a personal Gmail account. Message Tracking Logs show REDIRECT events for every forwarded message, with the external recipient address and timestamps. The source-context field identifies the inbox rule as the cause of the redirect.
3. Phishing Campaign Scope Assessment
After identifying a phishing email, investigators use Get-MessageTrackingLog to search for all messages from the same sender, with the same subject, or with the same Message-ID pattern. This reveals every recipient in the organization who received the phishing email and whether they opened or forwarded it.
4. Data Loss Prevention Audit
DLP transport rules generate tracking log entries when they detect sensitive content (credit card numbers, SSNs, classified markings). Searching for DLP-triggered events reveals which users attempted to send restricted content externally and whether the messages were blocked or allowed.
5. Mailbox Compromise Timeline
During an account compromise, the attacker sends outbound phishing from the victim’s mailbox. Message Tracking Logs establish the exact window of unauthorized sending activity by showing SEND events from the compromised account to external recipients, with source IP addresses identifying the attacker’s infrastructure.
Acquisition Methods
Message Tracking Logs have a 30-day default retention. Collect immediately during incident response — waiting even a few days can result in critical log rotation. For Exchange Online, use Get-MessageTrace within the 10-day detailed window; historical data requires a Message Trace report request.
# Search message tracking logs for a specific sender Get-MessageTrackingLog -Sender "user@company.com" -Start "03/01/2026" -End "03/28/2026" -ResultSize Unlimited | Export-Csv C:\Evidence\tracking.csv # Search for all messages to external domains Get-MessageTrackingLog -EventId SEND -Start "03/20/2026" -End "03/28/2026" | Where-Object {$_.Recipients -like "*@gmail.com"} # Find auto-forward (redirect) events Get-MessageTrackingLog -EventId REDIRECT -ResultSize Unlimited # Exchange Online: Message Trace Get-MessageTrace -SenderAddress "user@company.com" -StartDate "03/20/2026" -EndDate "03/28/2026"
Parsing Tools & Analysis
| Tool | Platform | Notes |
|---|---|---|
| Get-MessageTrackingLog | Exchange Management Shell | Native PowerShell cmdlet; direct query with filtering |
| Log Parser | Windows | SQL-like queries against CSV log files; batch analysis |
| ELK Stack | Cross-platform | Import CSV logs into Elasticsearch for visualization and search |
| Splunk | Cross-platform | Enterprise log analysis with Exchange-specific apps |
| Python (pandas) | Cross-platform | Programmatic CSV analysis for custom investigations |
Retention & Persistence
| Property | On-Premises Exchange | Exchange Online (M365) |
|---|---|---|
| Default retention | 30 days | 10 days (detailed), 90 days (summary) |
| Configurable | Yes — via Set-TransportService -MessageTrackingLogMaxAge | No — fixed by Microsoft |
| Max directory size | 1 GB default | N/A (cloud-managed) |
| Survives reboot | Yes — on-disk CSV files | N/A (cloud service) |
| Log rotation | New file every ~10 MB or 24 hours | Automatic |
Version Differences
| Feature | Exchange 2013 | Exchange 2016/2019 | Exchange Online |
|---|---|---|---|
| Cmdlet | Get-MessageTrackingLog | Get-MessageTrackingLog | Get-MessageTrace |
| Log path | TransportRoles\Logs\MessageTracking | Same | Cloud-only (no file access) |
| Protocol logging | Separate Send/Receive logs | Same + enhanced agent logging | Via Unified Audit Log |
| Retention | 30 days | 30 days | 10 days detailed / 90 days summary |
Anti-Forensics Resilience
| Action | Effect on Logs | Detection |
|---|---|---|
| Delete email from mailbox | No effect — logs are independent of mailbox content | Delivery events persist regardless of mailbox actions |
| Purge Deleted Items | No effect | Logs record original delivery |
| Delete log files manually | Logs destroyed — requires admin access to Exchange server | File system audit logs (4663) detect file deletion in log directory |
| Disable message tracking | No new entries created | Get-TransportService | FL MessageTrackingLogEnabled reveals disabled state |
| Log rotation (age-out) | Logs older than retention period automatically deleted | Collect immediately; do not wait |
MITRE ATT&CK Detection Mapping
| Technique | Name | Exchange Log Evidence |
|---|---|---|
T1114.003 T1114.003 | Email Forwarding Rule | REDIRECT events reveal auto-forwarding to external addresses |
T1566.001 T1566.001 | Spearphishing Attachment | RECEIVE events for phishing with source IP and envelope sender |
T1048 T1048 | Exfiltration Over Alternative Protocol | SEND events with large total-bytes to external recipients |
T1078 T1078 | Valid Accounts | SEND events from compromised account to unusual recipients |
Related Artifacts & Cross-References
| Artifact | Relationship | Cross-Correlation Value |
|---|---|---|
| Outlook OST/PST | Client-side email storage | Message-ID links server logs to specific messages in mailbox |
| Azure AD Sign-in Logs | Authentication events for Exchange Online | Identifies compromised account access times and source IPs |
| Unified Audit Log (M365) | Mailbox audit events: MailItemsAccessed, Send, etc. | Complements message tracking with mailbox-level actions |
| DNS Query Logs | MX record lookups for external delivery | Confirms outbound mail routing decisions |
| Firewall Logs | SMTP connections (port 25/587) to external servers | Network-level confirmation of email delivery |
References
- Microsoft, “Message Tracking” — learn.microsoft.com
- Microsoft, “Protocol Logging” — learn.microsoft.com
- Microsoft, “Get-MessageTrace (Exchange Online)” — learn.microsoft.com
- SANS Institute, “Exchange Forensics” — sans.org
- CrowdStrike, “Exchange Incident Response” — crowdstrike.com
Mjolnir Security — Digital Forensics & Incident Response
Mjolnir Security provides 24/7 incident response, digital forensics, and expert witness testimony. Our DFIR team specializes in Exchange forensics, BEC investigations, email exfiltration analysis, and Microsoft 365 incident response.
mjolnirsecurity.com — 24/7: +1 833 403 5875