Skip to content
Home » How Retention Policies can affect PST Import in M365

How Retention Policies can affect PST Import in M365

RETENTION, PST, and IMPORT — these three terms are at the heart of this article, which explores how Microsoft 365 retention policies can significantly impact the process of importing PST files. Whether you’re migrating legacy data or consolidating mailboxes, understanding how to generate PST files is a crucial first step. This article will walk you through the various methods available to create PSTs, and explain how Microsoft 365 handles these imports in the context of its retention policies.

Generate PST files and check MAPI properties

You can generate PST files in several ways, either directly from server side or through Outlook.

  • You can export an Exchange on-premises mailbox using the PowerShell command New-MailboxExportRequest. This command permits you create a PST file from the mailbox and store it on a file share.
Export mailbox to PST file
  • With Exchange Online, you can export an online mailbox to PST files by using Microsoft Purview and its eDiscovery feature. This method allows you to search, collect, and export mailbox content.
export mailbox to PST with pureview
  • You can export a mailbox to a PST file by using Classic Outlook’s built-in export feature. This option lets you manually select the mailbox content and save it as a PST file on your local drive.
Export mailbox to PST with Outlook

  • In case of a disaster where Exchange servers become lost or encrypted by a cyber attack, you can still generate a PST file from the cached OST file used by Classic Outlook. Here, I use the STELLAR tool for this purpose.

Export PST from OST file

➡️ In all cases, we focus now on how one specific message property behaves during export to a PST file: MESSAGE DELIVERY TIME (PR_MESSAGE_DELIVERY_TIME). This property plays a key role when configuring retention policies and managing PST imports through Microsoft Purview.

View email's MAPI properties and PR_MESSAGE_DELIVERY_TIME

The main question to ask is whether this property remains intact during the export process. In most cases, the answer is yes — as shown in the table below.

PST file created byPR_MESSAGE_DELIVERY_TIME intact during exporting to PST
Exchange On-premises with mailbox export reuquest🟩 YES
Microsoft 365 Purview with eDiscovery and export PST🟩 YES
Outlook with Export to PST feature🟩 YES
STELLAR Converter and OST file🟩 YES

Retention policies and PR_MESSAGE_DELIVERY_TIME

Now let’s consider the retention policies applied to the mailboxes where PST files will be imported.

These policies usually rely on the number of years since items were created. When you choose the option “When items were created”, Microsoft 365 uses the PR_MESSAGE_DELIVERY_TIME property to evaluate retention. That’s why it’s essential to generate PST files using tools that preserve this property accurately.

In this example, I configure a retention policy that automatically deletes emails received more than three years ago using Microsoft 365 MFA (Managed Folder Assistant).

retetion policy configuration

Import PST filter and PR_MESSAGE_DELIVERY_TIME

Let’s now look at the PST import process in Microsoft 365. When you import a PST file, you can use an option that filters emails based on their age — “Only import data less than”. This setting also relies on the PR_MESSAGE_DELIVERY_TIME property.

Filter data during import PST M365

Note💡: The PST import engine in Microsoft 365 still imports an email even if it doesn’t include the PR_MESSAGE_DELIVERY_TIME property.

Import PST and retention policies

I use a PST file that contains 4 folders, each with emails from different scenarios: emails received in 2019, emails received in 2025, emails received in 2019 but modified in 2025, and emails received in 2019 with the PR_MESSAGE_DELIVERY_TIME property removed.

I start by importing the PST file using a filter that only includes emails less than one year old. The table below summarizes the results and clearly shows that the import filter relies on the PR_MESSAGE_DELIVERY_TIME property.

PST Folder namePST Folder contentEmails imported with import filer “Only import data lass than 1 year old”
Mails 2019Emails received in 2019 with PR_MESSAGE_DELIVERY_TIME set to 2019🟥 NO
Mails 2019 – Modified 2025Emails received in 2019 with PR_MESSAGE_DELIVERY_TIME set to 2019 and modified in 2025 with PR_LAST_MODIFICATION_TIME set to 2025🟥 NO
Mails 2025Emails received in 2025 with PR_MESSAGE_DELIVERY_TIME set to 2025🟩 YES

Now I import the same PST file without applying any filters into a mailbox that uses a retention policy designed to delete emails older than three years.

The table below summarizes the import results. All emails appear in the mailbox, including those that no longer contain the PR_MESSAGE_DELIVERY_TIME property.

PST Folder namePST Folder contentEmails imported without PST import filter
Mails 2019Emails received in 2019 with PR_MESSAGE_DELIVERY_TIME set to 2019🟩 YES
Mails 2019 – Modified 2025Emails received in 2019 with PR_MESSAGE_DELIVERY_TIME set to 2019 and modified in 2025 with PR_LAST_MODIFICATION_TIME set to 2025🟩 YES
Mails 2029 – Without Delivery TimeEmails received in 2019 with PR_MESSAGE_DELIVERY_TIME property removed🟩 YES
Mails 2025Emails received in 2025 with PR_MESSAGE_DELIVERY_TIME set to 2025🟩 YES

Now, you just need to wait for the Managed Folder Assistant (MFA) to run on the mailbox and delete emails older than 3 years. But, even after forcing MFA with the Start-ManagedFolderAssistant command, nothing happens. When a retention policy specifies that emails older than 3 years must be deleted, the system removes them after 3 years and 30 days. But, the imported emails that are older than 3 years and 30 days remain in the mailbox.

This happens because the Microsoft 365 PST import process automatically sets the mailbox property RetentionHoldEnabled = True, which prevents MFA from processing folders visible to the user.

RetentionHoldEnabled after importing PSR

So, to make retention work properly on the mailbox, you first need to set RetentionHoldEnabled = False on the mailbox. This change allows the Managed Folder Assistant (MFA) to run normally and process imported emails (and existing ones). The table below summarizes how MFA handles the different types of emails used in our test.

PST FOLDERPST FOLDER CONTENTEMAILS DELETED BY MFA (RETENTION POLICY)
Mails 2019Emails received in 2019 with PR_MESSAGE_DELIVERY_TIME set to 2019🟩 YES
Mails 2019 – Modified 2025Emails received in 2019 with PR_MESSAGE_DELIVERY_TIME set to 2019 and modified in 2025 with PR_LAST_MODIFICATION_TIME set to 2025🟩 YES
Mails 2019 – Without Delivery TimeEmails received in 2019 without PR_MESSAGE_DELIVERY_TIME property🟥 NO
Mails 2025Emails received in 2025🟥 NO

To conclude, keep the following key points in mind when working with PST exports and retention policies in Microsoft 365:

  • Always preserve the PR_MESSAGE_DELIVERY_TIME property when exporting data to PST files.
  • The PST import process uses PR_MESSAGE_DELIVERY_TIME to apply filters such as “Only import data less than…”
  • As soon as you import a PST file into a mailbox, Microsoft 365 sets RetentionHoldEnabled = True, which disables the Managed Folder Assistant (MFA) on folders visible to the user.
  • To re-enable retention processing, set RetentionHoldEnabled = False so that MFA can run and apply policies.
  • Retention policies configured with the condition “when items were created” rely on PR_MESSAGE_DELIVERY_TIME property.
  • Take your time to test different configurations, because testing export, import, and retention takes a long time.


By Lionel TRAVERSE
Microsoft 365 Certified Administrator Expert / Microsoft Certified Trainer