Forensic ArtifactWindows: Email

Exchange Server Logs

Exchange Message Tracking Logs record every email's delivery path, sender, recipient, subject, and status. Protocol logs capture SMTP transactions.

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.

Key Insight

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 TypePath (Exchange 2016/2019)Format
Message TrackingC:\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

FieldDescriptionForensic Value
date-timeUTC timestamp of the eventPrecise timeline of email processing
event-idRECEIVE, SEND, DELIVER, FAIL, EXPAND, REDIRECT, RESOLVE, etc.Tracks message through each pipeline stage
sender-addressSMTP sender (envelope From)True sender identification
recipient-addressSMTP recipient(s)All recipients including BCC
message-subjectEmail subject lineContent identification without message body
message-idRFC 5322 Message-ID headerUnique identifier to correlate across systems
total-bytesMessage size in bytesIdentifies messages with large attachments
source-contextAdditional delivery contextConnector, rule, or agent that processed the message

What It Reveals

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

Collection Warning

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.

POWERSHELL / EXCHANGE
# 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

ToolPlatformNotes
Get-MessageTrackingLogExchange Management ShellNative PowerShell cmdlet; direct query with filtering
Log ParserWindowsSQL-like queries against CSV log files; batch analysis
ELK StackCross-platformImport CSV logs into Elasticsearch for visualization and search
SplunkCross-platformEnterprise log analysis with Exchange-specific apps
Python (pandas)Cross-platformProgrammatic CSV analysis for custom investigations

Retention & Persistence

PropertyOn-Premises ExchangeExchange Online (M365)
Default retention30 days10 days (detailed), 90 days (summary)
ConfigurableYes — via Set-TransportService -MessageTrackingLogMaxAgeNo — fixed by Microsoft
Max directory size1 GB defaultN/A (cloud-managed)
Survives rebootYes — on-disk CSV filesN/A (cloud service)
Log rotationNew file every ~10 MB or 24 hoursAutomatic

Version Differences

FeatureExchange 2013Exchange 2016/2019Exchange Online
CmdletGet-MessageTrackingLogGet-MessageTrackingLogGet-MessageTrace
Log pathTransportRoles\Logs\MessageTrackingSameCloud-only (no file access)
Protocol loggingSeparate Send/Receive logsSame + enhanced agent loggingVia Unified Audit Log
Retention30 days30 days10 days detailed / 90 days summary

Anti-Forensics Resilience

ActionEffect on LogsDetection
Delete email from mailboxNo effect — logs are independent of mailbox contentDelivery events persist regardless of mailbox actions
Purge Deleted ItemsNo effectLogs record original delivery
Delete log files manuallyLogs destroyed — requires admin access to Exchange serverFile system audit logs (4663) detect file deletion in log directory
Disable message trackingNo new entries createdGet-TransportService | FL MessageTrackingLogEnabled reveals disabled state
Log rotation (age-out)Logs older than retention period automatically deletedCollect immediately; do not wait

MITRE ATT&CK Detection Mapping

TechniqueNameExchange Log Evidence
T1114.003 T1114.003Email Forwarding RuleREDIRECT events reveal auto-forwarding to external addresses
T1566.001 T1566.001Spearphishing AttachmentRECEIVE events for phishing with source IP and envelope sender
T1048 T1048Exfiltration Over Alternative ProtocolSEND events with large total-bytes to external recipients
T1078 T1078Valid AccountsSEND events from compromised account to unusual recipients

Related Artifacts & Cross-References

ArtifactRelationshipCross-Correlation Value
Outlook OST/PSTClient-side email storageMessage-ID links server logs to specific messages in mailbox
Azure AD Sign-in LogsAuthentication events for Exchange OnlineIdentifies 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 LogsMX record lookups for external deliveryConfirms outbound mail routing decisions
Firewall LogsSMTP connections (port 25/587) to external serversNetwork-level confirmation of email delivery

References

  1. Microsoft, “Message Tracking” — learn.microsoft.com
  2. Microsoft, “Protocol Logging” — learn.microsoft.com
  3. Microsoft, “Get-MessageTrace (Exchange Online)” — learn.microsoft.com
  4. SANS Institute, “Exchange Forensics” — sans.org
  5. 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.

Digital ForensicsIncident ResponseExpert WitnessEmail ForensicsBEC InvestigationM365 Forensics

mjolnirsecurity.com — 24/7: +1 833 403 5875