logo
search
Email Search Issues

How to Extract Email Addresses from Exchange 2016 Mailboxes

Emma BrownEmma Brown Oct 9, 2026 868 views

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.

How to Extract Email Addresses from Exchange 2016 Mailboxes
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.
Before you start

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.

Solution 1Recommended

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.

1
Open Classic Outlook

Launch classic Microsoft Outlook where the target Exchange 2016 mailbox is fully configured and cached.

2
Access the VBA Editor

Press ALT + F11 on your keyboard to open the Microsoft Visual Basic for Applications (VBA) editor.

3
Insert a New Module

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.

4
Run the Macro

Press F5 to execute the script and export the collected email addresses and dates to a CSV or text file.

Use an Outlook Macro to Extract Addresses
Script Customization: Since Microsoft does not provide a default macro for this exact scenario, you may need to write or source a custom VBA script. For scripting assistance, you can ask in the Microsoft Q&A Exchange forum.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installation package for your operating system.
  2. 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions to set up the software.
  3. 3. Analyze Exported Data: Open WPS Spreadsheet to import and easily filter your exported Exchange email address CSV files.
Fully compatible with Microsoft Excel (.xlsx, .csv) for analyzing exported email address lists seamlessly.Free and lightweight suite including Writer, Spreadsheet, and Presentation tools.Familiar user interface requiring zero learning curve for traditional Office users.Cross-platform support across Windows, macOS, Linux, iOS, and Android.
QA img-9

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/.