Exchange OnlineHow-to

FortiMail to Exchange Online, part 3: former employees' mailboxes without licenses

Keep 100 former employees' FortiMail mail in Exchange Online without licenses: unlicensed shared mailboxes, the 50 GB and hold limits, exceptions that need a license and shortcuts to avoid.

One in five mailboxes in this project belongs to someone who has left. The business wants that mail in Microsoft 365, but it doesn't want to pay for 100 licenses that nobody will ever sign in with. That's achievable, within clear limits. In this part I'll set out what Microsoft's licensing rules allow, compare the possible designs, and then build the license-free one: one shared mailbox per former employee, filled with the same IMAP endpoint as part 2.

How this guide is organized: What the rules allow → The options → Step-by-step → What not to do → VerifyFlow diagram of the article's sections in reading order: 1. What the rules allow. 2. The options. 3. Step-by-step (4 steps: Create the shared mailboxes; Size them and settle the exceptions; Migrate the data; Be clear about retention). 4. What not to do. 5. Verify. Toolbox: Set-Mailbox, DisplayName, PrimarySmtpAddress, records.team@contoso.com, EmailAddress.1What the rulesallow2The options3Step-by-step4What not to do5Verify1Create the sharedmailboxes2Size them and settle theexceptions3Migrate the data4Be clear about retentionTOOLBOXSet-MailboxDisplayNamePrimarySmtpAddressrecords.team@contoso.comEmailAddressHow this guide is organized: What the rules allow → The options → Step-by-step → What not to do → VerifyFlow diagram of the article's sections in reading order: 1. What the rules allow. 2. The options. 3. Step-by-step (4 steps: Create the shared mailboxes; Size them and settle the exceptions; Migrate the data; Be clear about retention). 4. What not to do. 5. Verify. Toolbox: Set-Mailbox, DisplayName, PrimarySmtpAddress, records.team@contoso.com, EmailAddress.1What the rules allow2The options3Step-by-step1Create the shared mailboxes2Size them and settle the exceptions3Migrate the data4Be clear about retention4What not to do5VerifyTOOLBOXSet-MailboxDisplayNamePrimarySmtpAddressrecords.team@contoso.comEmailAddress
At a glance: how this guide is organized · 4 steps · 5 key settings and tools

What the rules allow#

Microsoft's shared mailbox documentation and the Exchange Online limits page set the boundaries:

  • A shared mailbox stores up to 50 GB without a license. Raising it to 100 GB needs an Exchange Online Plan 2 license.
  • Microsoft lists more situations that need a license on the shared mailbox: a larger in-place archive and litigation hold each require Exchange Online Plan 2, or Plan 1 with the Exchange Online Archiving add-on. Advanced features such as Defender for Office 365, eDiscovery (Premium) and retention policies may need licensing too.
  • Whoever opens a shared mailbox needs their own Exchange Online license; the shared mailbox doesn't. Microsoft states that a shared mailbox supports at most 25 users, and that its own account isn't meant for signing in, so block sign-in and keep it blocked.
  • You can't stop people with access from deleting messages in a shared mailbox.
  • When a shared mailbox reaches its limit it can receive for a while but can't send, and after that senders get non-delivery reports. For a migration, it means the copy stops at the quota.

The options#

Which home for a former employee's mailboxDoes the leaver's mail fit in about 45 GB? if Yes: Must it be on legal hold or unchangeable? if No: Unlicensed shared mailbox (No license; block sign-in, hide it, grant access to a small group); if Yes: License it or make it inactive (Litigation hold, or a retention policy before the account is deleted); if No: Is a license acceptable for this mailbox? if Yes: Shared mailbox with Plan 2 (100 GB, plus an archive and litigation hold if needed); if No: Keep it outside Microsoft 365 (On FortiMail or as a protected PST until retention ends)Does the leaver's mail fit inabout 45 GB?Must it be on legal hold orunchangeable?FIXUnlicensed sharedmailboxNo license; block sign-in,hide it, grant access to asmall groupNoNOTELicense it or make itinactiveLitigation hold, or aretention policy before theaccount is deletedYesYesIs a license acceptable for thismailbox?FIXShared mailbox withPlan 2100 GB, plus an archive andlitigation hold if neededYesNOTEKeep it outsideMicrosoft 365On FortiMail or as aprotected PST untilretention endsNoNoWhich home for a former employee's mailboxDoes the leaver's mail fit in about 45 GB? if Yes: Must it be on legal hold or unchangeable? if No: Unlicensed shared mailbox (No license; block sign-in, hide it, grant access to a small group); if Yes: License it or make it inactive (Litigation hold, or a retention policy before the account is deleted); if No: Is a license acceptable for this mailbox? if Yes: Shared mailbox with Plan 2 (100 GB, plus an archive and litigation hold if needed); if No: Keep it outside Microsoft 365 (On FortiMail or as a protected PST until retention ends)Does the leaver's mail fit in about 45 GB?YesMust it be on legal hold or unchangeable?NoFIXUnlicensed shared mailboxNo license; block sign-in, hide it, grant access toa small groupYesNOTELicense it or make it inactiveLitigation hold, or a retention policy before theaccount is deletedNoIs a license acceptable for this mailbox?YesFIXShared mailbox with Plan 2100 GB, plus an archive and litigation hold ifneededNoNOTEKeep it outside Microsoft 365On FortiMail or as a protected PST until retentionends
Figure 1 · Decision tree Which home for a former employee's mailbox. Most leavers fit in an unlicensed shared mailbox. Size and legal holds decide the exceptions, and putting everyone's mail into one mailbox is never an option.
DesignLicenseCapacityWho can reach the mailRetention
Unlicensed shared mailbox per leaverNone50 GBNamed staff with Full Access (up to 25)No litigation hold; people with access can delete
Shared mailbox with Exchange Online Plan 2One per mailbox100 GB plus archiveSameLitigation hold available
Inactive mailboxOnly while you load it; freed when the account is deletedThat of the license usedOnly through Microsoft Purview eDiscovery and content searchKept by a retention policy or hold
PST files on a file shareNoneDisk spaceAnyone with access to the filesNothing in Microsoft 365, and not searchable there
Leave it on FortiMailNone in Microsoft 365Existing disksFortiMail administratorsFortiMail's own, for as long as the hardware lives

For a requirement worded "migrate them without assigning a license", the first row is the answer for every leaver whose mailbox fits in 50 GB. The second and third rows are for the exceptions: mailboxes that are too big, or people whose mail is under a legal hold.

The inactive mailbox route needs a word of explanation. Microsoft turns a mailbox into an inactive mailbox when a hold or retention policy is on it and the user account is then deleted. The mailbox must be licensed so the hold can apply, and once the account is deleted that license is free to assign to someone else. The inactive mailbox can't receive mail, disappears from the address book and is reached only by people with eDiscovery permissions. It's the strongest option for retention, but it needs a license while you load and hold each mailbox.

Step 1: Create the shared mailboxes#

Create one shared mailbox per leaver, with the leaver's original address, so searches by address and replies to old threads still make sense. A CSV with Alias, DisplayName and PrimarySmtpAddress columns drives it:

PowerShell
Connect-ExchangeOnline
Connect-MgGraph -Scopes "User.ReadWrite.All"

$leavers = Import-Csv "C:\Migration\leavers.csv"
foreach ($l in $leavers) {
    New-Mailbox -Shared -Name $l.Alias -Alias $l.Alias -DisplayName $l.DisplayName -PrimarySmtpAddress $l.PrimarySmtpAddress
}

# Once the mailboxes exist: block sign-in, hide them from the address book, grant access
foreach ($l in $leavers) {
    $mbx = Get-Mailbox -Identity $l.PrimarySmtpAddress
    Update-MgUser -UserId $mbx.ExternalDirectoryObjectId -AccountEnabled:$false
    Set-Mailbox -Identity $l.PrimarySmtpAddress -HiddenFromAddressListsEnabled $true
    Add-MailboxPermission -Identity $l.PrimarySmtpAddress -User "records.team@contoso.com" -AccessRights FullAccess -AutoMapping $false
}

Grant access to a small mail-enabled security group (here records.team@contoso.com) rather than to individuals. Then decide what should happen to mail that still arrives at these addresses: leave it, forward it to a manager with Set-Mailbox -ForwardingAddress, or accept internal senders only with Set-Mailbox -RequireSenderAuthenticationEnabled $true.

Watch out: if the leavers' accounts are still synchronized from Active Directory with their email addresses, those addresses are already taken in Microsoft Entra ID and the shared mailboxes can't use them. Take those accounts out of the synchronization scope, or clear their address attributes, before you create the mailboxes.

Step 2: Size them and settle the exceptions#

Run the analysis batch from part 1 against the shared mailboxes. In the CSV, EmailAddress is the shared mailbox, and the credentials are those of the leaver's FortiMail account. Because nobody uses these accounts any more, you can reset their FortiMail passwords without affecting anyone. One catch: if FortiMail checks passwords against Active Directory and the leavers' directory accounts are disabled or deleted, the IMAP sign-in fails, so first give those accounts a password FortiMail can verify.

PowerShell
New-MigrationBatch -Analyze -Name "Leavers-Analysis" -SourceEndpoint "FortiMail-IMAP" -AutoStart `
    -CSVData ([System.IO.File]::ReadAllBytes("C:\Migration\leavers-all.csv"))

Get-MigrationUser -BatchId "Leavers-Analysis" | Format-Table Identity, Status, EstimatedTotalCount, EstimatedTotalSize

EstimatedTotalSize is in bytes, and 45 GB is 48,318,382,080 bytes. Every leaver above that line is an exception, because the mailbox has to hold the data and keep some headroom under the 50 GB cap. Decide each exception with legal and HR:

  • License it with Exchange Online Plan 2: 100 GB, plus an archive and litigation hold if needed.
  • Make it inactive: migrate into a licensed mailbox, apply the retention policy, confirm the hold, delete the account, and reuse the license for the next one.
  • Keep it outside Microsoft 365, on FortiMail or as a protected PST file, until its retention period ends, if nobody needs to search it.

Step 3: Migrate the data#

Use the endpoint from part 2, with separate batches for the leavers so their errors don't mix with the active users' waves:

PowerShell
New-MigrationBatch -Name "Leavers-01" -SourceEndpoint "FortiMail-IMAP" `
    -CSVData ([System.IO.File]::ReadAllBytes("C:\Migration\leavers-01.csv")) -AutoStart

Get-MigrationUser -BatchId "Leavers-01" | Format-Table Identity, Status, SyncedItemCount, SkippedItemCount
Get-EXOMailboxStatistics -Identity jane.doe@contoso.com | Format-List DisplayName, ItemCount, TotalItemSize

Note: Microsoft's IMAP migration documentation is written for user mailboxes and doesn't discuss shared mailboxes as targets either way. Admins report that IMAP batches into unlicensed shared mailboxes complete normally, but prove it in your own tenant with a pilot of two or three leavers before you commit all 100.

Two decisions differ from the active users:

  • Exclusions. When the point is retention, legal may want everything, including the trash and junk folders. Don't exclude folders out of habit.
  • When to remove the batch. If a leaver's address no longer receives mail on FortiMail, remove the batch once the mailbox is Synced and checked. If it still receives mail, keep the batch running until after the MX cutover, like everyone else's.

Step 4: Be clear about retention#

An unlicensed shared mailbox keeps the mail in Exchange Online, but it isn't a records system: there's no litigation hold without a license, and anyone with Full Access can delete items. Keep the access group small and put that decision in writing. Where legal needs mail that can't be altered, license those few mailboxes and place them on litigation hold, or use the inactive mailbox route. Before you delete an account to make its mailbox inactive, confirm the hold really is on it:

PowerShell
Get-Mailbox -Identity jane.doe@contoso.com | Format-List LitigationHoldEnabled, InPlaceHolds

# After the account is deleted (it can still be restored for 30 days)
Get-Mailbox -InactiveMailboxOnly -ResultSize Unlimited | Format-Table DisplayName, PrimarySmtpAddress, WhenSoftDeleted

Microsoft recommends Microsoft 365 retention policies, rather than litigation hold or eDiscovery holds, for creating inactive mailboxes. My guide to retention policies, litigation hold and inactive mailboxes covers the setup.

What not to do#

  • One mailbox for everyone. Importing all the leavers into one licensed mailbox, or into its archive, is the tempting shortcut, and it breaks the rules. Microsoft states that an archive mailbox can only hold mail for a single user or entity, that using archive mailboxes to store mail from multiple users is prohibited, and that it can refuse extra archive storage when a user's archive holds other users' data.
  • Unlicensed user mailboxes. When a user mailbox's license is removed, Exchange Online keeps the data for only 30 days. Convert a user mailbox to a shared mailbox before you remove its license, or start with shared mailboxes as above.
  • Signing in to a shared mailbox. Its account only anchors the mailbox. Keep sign-in blocked and grant access through permissions.
  • Long access lists. If more than 25 people need a leaver's mail, choose a different design.

Verify#

PowerShell
# Quota and address-book visibility
Get-EXOMailbox -RecipientTypeDetails SharedMailbox -ResultSize Unlimited -Properties HiddenFromAddressListsEnabled, ProhibitSendReceiveQuota |
    Format-Table DisplayName, PrimarySmtpAddress, HiddenFromAddressListsEnabled, ProhibitSendReceiveQuota

# Who has access
Get-MailboxPermission -Identity jane.doe@contoso.com | Where-Object { $_.User -notlike "NT AUTHORITY*" } |
    Format-Table User, AccessRights

# Sign-in blocked: good is False
Get-MgUser -UserId (Get-Mailbox jane.doe@contoso.com).ExternalDirectoryObjectId -Property AccountEnabled |
    Format-List AccountEnabled

Then compare item counts with FortiMail for a sample of leavers, and ask a member of the records team to open two or three of the mailboxes in Outlook on the web and run a search in each.

References#

Written and checked against current Microsoft Learn documentation. Test changes with a pilot group before rolling them out to everyone, and if an admin center path has moved since, search for the setting name instead.

Spotted a mistake, or did this fix work differently for you? Email me or message me on LinkedIn — corrections are credited in the article.

Written by

Omer Eltayeb

M365 Subject Matter Expert, former Microsoft Cloud Solutions Architect, Microsoft Certified Trainer and Microsoft Innovative Educator Expert (2024–26) and Microsoft Elevate Educator Expert (2026–27). I share practical, step-by-step guides, study plans, scripts and toolkits for Microsoft Intune, Configuration Manager, Microsoft Entra ID, Microsoft Defender, Exchange and Microsoft 365 with the community.

Microsoft Certified Trainer (MCT) 2026Microsoft Innovative Educator Expert 2025–2026Microsoft Elevate Educator Expert 2026–2027ISC2 Certified Information Systems Security Professional (CISSP)Microsoft 365 Certified: Enterprise Administrator Expert (MS-102)