How to Extract Email Addresses from Exchange 2016 Mailboxes
Question details
The user needs to collect email addresses and message dates from emails sent and received by a specific user over the past 18 months, as standard message traces do not retain data for that long.

- Product
- Microsoft Exchange 2016
- Device & OS
- not provided
- Scenario
- Performing long-term historical email address extraction and mailbox analysis for auditing or record-keeping.
- Observed behavior
- Exchange message trace generally does not provide data retention for a period as long as 18 months, requiring alternative extraction methods.
Ensure you have administrative access to the Exchange 2016 server or full mailbox permissions in classic Outlook before attempting to extract long-term mailbox data.
Use an Outlook Macro to Extract Addresses
If you have the target mailbox configured in classic Outlook, you can use a VBA macro to iterate through mail folders and export the required addresses and dates.
Standard Exchange message traces typically only retain data for a limited time (often up to 30 or 90 days), making them unsuitable for an 18-month historical extraction. A macro running within the Outlook desktop client bypasses this limitation by reading the cached or online mailbox items directly.
Launch classic Microsoft Outlook where the target Exchange 2016 mailbox is fully configured and cached.
Press ALT + F11 on your keyboard to open the Microsoft Visual Basic for Applications (VBA) editor.
Click 'Insert' from the top menu, select 'Module', and paste your custom VBA script designed to loop through the Inbox and Sent Items to extract sender/recipient addresses and message dates.
Press F5 to execute the script and export the collected email addresses and dates to a CSV or text file.

Use Exchange eDiscovery and Compliance Tools
For enterprise-level or long-term mailbox analysis, rely on Exchange 2016's built-in compliance tools rather than simple PowerShell commands.
Looking for a Lightweight Alternative to Microsoft Office?
While Exchange and Outlook handle complex enterprise email environments, you might need a fast, reliable, and cost-effective office suite for handling exported CSV files and daily document tasks. WPS Office provides excellent compatibility with Microsoft Office formats, allowing you to seamlessly manage data without expensive subscriptions.
- 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
- 3. Analyze Exported Data: Open WPS Spreadsheet to import and easily filter your exported Exchange email address CSV files.

Frequently Asked Questions
Why can't I use Exchange Message Trace for 18-month-old emails?
By default, Exchange Server message tracking logs are only retained for a short period (typically 30 days). Even with extended retention or Office 365 historical traces, the maximum limit is usually 90 days, making it impossible to trace 18 months back using message tracking alone.
Can I use PowerShell to extract email addresses from an Exchange mailbox?
Yes, you can use the Get-MessageTrackingLog cmdlet in PowerShell, but it will only retrieve data within your server's log retention period. For an 18-month timeframe, PowerShell cannot pull from message tracking logs; you must extract from the actual mailbox items using EWS (Exchange Web Services) scripts or eDiscovery.
Where can I get support for writing Outlook VBA macros or Exchange PowerShell scripts?
You can find community support and expert examples for Outlook VBA scripting and Exchange management on the official Microsoft Q&A forums at https://learn.microsoft.com/en-us/answers/.




