Create and manage inactive mailboxes
Inactive mailboxes let you retain former employees' email after they leave your organization and can be accessed by authorized people who have been granted eDiscovery permissions for compliance or legal reasons. For example, administrators, compliance officers, and records managers who can then use Content Search to search and export the contents of an inactive mailbox. Inactive mailboxes can't receive email and aren't displayed in your organization's shared address book or other lists.
For more information about inactive mailboxes, see Learn about inactive mailboxes.
Tip
If you're not an E5 customer, use the 90-day Microsoft Purview solutions trial to explore how additional Purview capabilities can help your organization manage data security and compliance needs. Start now at the Microsoft Purview trials hub. Learn details about signing up and trial terms.
Create an inactive mailbox
Making a mailbox inactive requires a hold on the mailbox, and then deleting the mailbox or corresponding user account.
To make a mailbox inactive, it must be licensed correctly so that a hold can be applied to the mailbox before it's deleted. After the user account is deleted, any Exchange Online license associated with the user account will be available to assign to a new user.
We recommend you use Microsoft 365 retention to apply the hold on the mailbox. Other methods are covered in Learn about inactive mailboxes.
The best way to delete a mailbox is to delete the corresponding user account in the Microsoft 365 admin center. For information about deleting user accounts, see Delete a user from your organization. However, you can also delete the mailbox by using the Remove-Mailbox cmdlet in Exchange Online PowerShell. For more information, see Delete or restore user mailboxes in Exchange Online.
The following table summarizes the process of making an inactive mailbox for different retention scenarios.
To... | Do this... | Result |
---|---|---|
Retain mailbox content indefinitely after an employee leaves the organization | 1. Apply Microsoft 365 retention settings with retain actions for the mailbox (a retention policy) or specific email items (one or more retention labels). 2. Wait for the retention settings to be applied. 3. Remove the user's Microsoft 365 account. |
All content in the inactive mailbox that has retention settings applied, including items in the Recoverable Items folder, is retained indefinitely. |
Retain all mailbox content for a specific period after an employee leaves the organization and then delete the mailbox | 1. Apply a Microsoft 365 retention policy to the mailbox with retention settings that retain and then delete items when the retention period expires. 2. Wait for the retention settings to be applied. 3. Remove the user's Microsoft 365 account. |
When the retention period for a mailbox item expires, the item is moved to the Recoverable Items folder and then it's permanently deleted (purged) from the inactive mailbox when the deleted item retention period (for Exchange mailboxes) expires. The retention period of the Microsoft 365 retention policy is always based on the original date a mailbox item was received or created. |
Note
If Microsoft 365 retention settings that are configured to retain, or retain and then delete content, is already applied to the mailbox or mailbox items, or a Litigation hold is already placed on a mailbox, or then all you have to do to create an inactive mailbox is delete the corresponding user account.
View a list of inactive mailboxes
You can use the Microsoft Purview portal or the Microsoft Purview compliance portal to view a list of the inactive mailboxes in your organization.
Note
The portals are limited to displaying up to 5,000 inactive mailboxes. To view more than 5,000 inactive mailboxes, you must use Exchange Online PowerShell as described after the step instructions.
For this configuration, you can use the Microsoft Purview portal or you might still be able to use the older Microsoft Purview compliance portal. Sign in with a Compliance administrator account for your organization.
Depending on the portal you're using, navigate to one of the following locations:
Sign in to the Microsoft Purview portal > Solutions > Data Lifecycle Management card > Policies > Retention policies.
Sign in to the Microsoft Purview compliance portal > Solutions > Data lifecycle management > Microsoft 365 > Retention Policies.
Select the Inactive mailbox option. For example, from the Microsoft Purview portal:
The Inactive mailboxes page displays a list of inactive mailboxes. Select one to see details about that inactive mailbox. Details include the Exchange identifier for the mailbox and whether it's on Litigation Hold.
You won't see other types of holds in the details pane, for example a Microsoft 365 retention policy or eDiscovery hold. To find this information, see How to identify the type of hold placed on an Exchange Online mailbox.
If you have many inactive mailboxes, you might find it easier to search and sort a CSV file for the details you see in the list: On the Inactive mailboxes page, select Export.
Alternatively, you can run the following command in Exchange Online PowerShell to display the list of inactive mailboxes:
Get-Mailbox -InactiveMailboxOnly -ResultSize Unlimited | FT DisplayName,PrimarySMTPAddress,WhenSoftDeleted
You can also run the following command to export the list of inactive mailboxes and other information to a CSV file. In this example, the CSV file is created in the current directory.
Get-Mailbox -InactiveMailboxOnly -ResultSize Unlimited | Select Displayname,PrimarySMTPAddress,DistinguishedName,ExchangeGuid,WhenSoftDeleted | Export-Csv InactiveMailboxes.csv -NoTypeInformation
Note
It's possible that an inactive mailbox might have the same SMTP address as an active user mailbox. In this case, the value of the DistinguishedName or ExchangeGuid property can be used to uniquely identify an inactive mailbox.
Search and export the contents of an inactive mailbox
You can access the contents of the inactive mailbox by using the Content Search tool in the Microsoft Purview portal or the Microsoft Purview compliance portal. For more information, see the Feature reference for Content search article.
Change the hold duration for an inactive mailbox
After a mailbox is made inactive, you might be able to change the duration of the hold applied to the inactive mailbox.
For step-by-step procedures, see Change the hold duration for an inactive mailbox.
Recover an inactive mailbox
If a former employee returns to your organization, or if a new employee is hired to take on the job responsibilities of the former employee, you can recover the contents of the inactive mailbox.
When you recover an inactive mailbox, the mailbox is converted to a new mailbox, the contents and folder structure of the inactive mailbox are retained, and the mailbox is linked to a new user account. After it's recovered, the inactive mailbox no longer exists.
For step-by-step procedures and more information about happens when you recover an inactive mailbox, see Recover an inactive mailbox.
Restore the contents of an inactive mailbox to another mailbox
If another employee takes on the job responsibilities of a former employee, or if another person needs access to the contents of the inactive mailbox, you can restore (or merge) the contents of the inactive mailbox to an existing mailbox.
When you restore an inactive mailbox, the contents are copied to another mailbox. The inactive mailbox is retained and remains an inactive mailbox. The inactive mailbox can still be searched using eDiscovery, its contents can be restored to another mailbox, or it can be recovered or deleted at a later date.
For step-by-step procedures, see Restore an inactive mailbox.
Delete an inactive mailbox
If you no longer need to retain the contents of an inactive mailbox, you can permanently delete the inactive mailbox by removing the hold applied to the inactive mailbox.
For more details and step-by-step procedures, see Delete an inactive mailbox.