Exchange OnlineDeep dive

FortiMail to Exchange Online, part 1: assessment, sizing and the migration plan

Plan a FortiMail server-mode move to Exchange Online for 500 mailboxes and 4 TB: inventory what FortiMail does, size every mailbox, estimate copy time, pick licenses and order the work.

When FortiMail runs in server mode it isn't just a spam filter: it is the mail server. It hosts the mailboxes, filters inbound mail and often relays mail for applications as well. This series follows a realistic project: about 500 FortiMail mailboxes holding roughly 4 TB move to Exchange Online, and 100 of those mailboxes belong to former employees whose mail must be kept without paying for licenses. In this first part I'll build the plan: what to inventory, how to size the data, how long the copy will take, which licenses fit and the order to do the work in.

How this guide is organized: The series and the end state → Step-by-step → Risks to settle before the pilot → Verify the planFlow diagram of the article's sections in reading order: 1. The series and the end state. 2. Step-by-step (6 steps: Confirm what FortiMail is doing today; Measure every mailbox, not just the total; Estimate how long the copy takes; Choose licenses for the active users; Pick a method for each kind of data; Put the work in the right order). 3. Risks to settle before the pilot. 4. Verify the plan. Toolbox: Get-Mailbox, User › User.1The series and theend state2Step-by-step3Risks to settle beforethe pilot4Verify the plan1Confirm whatFortiMail is do…2Measure everymailbox, not j…3Estimate howlong the copy…4Chooselicenses for t…5Pick a methodfor each kind…6Put the work inthe right orderTOOLBOXGet-MailboxUser › UserHow this guide is organized: The series and the end state → Step-by-step → Risks to settle before the pilot → Verify the planFlow diagram of the article's sections in reading order: 1. The series and the end state. 2. Step-by-step (6 steps: Confirm what FortiMail is doing today; Measure every mailbox, not just the total; Estimate how long the copy takes; Choose licenses for the active users; Pick a method for each kind of data; Put the work in the right order). 3. Risks to settle before the pilot. 4. Verify the plan. Toolbox: Get-Mailbox, User › User.1The series and the end state2Step-by-step1Confirm what FortiMail is doing today2Measure every mailbox, not just the total3Estimate how long the copy takes4Choose licenses for the active users5Pick a method for each kind of data6Put the work in the right order3Risks to settle before the pilot4Verify the planTOOLBOXGet-MailboxUser › User
At a glance: how this guide is organized · 6 steps · 2 key settings and tools

The series and the end state#

The project splits into five workstreams, one per part:

PartWorkstreamOutcome
1 (this post)Assessment and planInventory, mailbox sizes, licenses, timeline
2Mailbox migrationAbout 400 active mailboxes copied with IMAP batches and cut over
3Former employees100 leaver mailboxes kept in Exchange Online without licenses
4Mail gatewayMX, connectors, SPF, DKIM, DMARC and relay clients moved off FortiMail
5ArchivesFortiMail archives and old mail placed in archive mailboxes or retained on purpose

The project is done when every active user works in an Exchange Online mailbox, the leavers' mail sits in Microsoft 365 where the right people can reach it, the MX record no longer points at the FortiMail mailbox server, no application relays through it any more, and the archive data has a documented home. Only then can the unit be rebuilt for another role or retired.

Step 1: Confirm what FortiMail is doing today#

Start with the operation mode, because it decides the whole design. Fortinet documents three modes. In gateway and transparent mode FortiMail filters mail for another server and doesn't host mailboxes. In server mode it is a standalone email server: users read their mail in its web interface or retrieve it with POP3 or IMAP. Everything in this series assumes server mode. If your unit runs in gateway mode, the mailboxes live on another server, and that server is your migration source.

Then list everything the unit does, because each item needs a new home in Microsoft 365 or a deliberate decision to drop it:

  • Domains, users and aliases. In server mode you can export the user accounts from Domain & User › User › User with Export .CSV. That file becomes the backbone of your mapping sheet: FortiMail account, Microsoft 365 user, license or shared mailbox, migration wave.
  • How users sign in. Local FortiMail passwords, or an authentication profile that checks passwords against a directory. This decides how the migration gets credentials (part 2).
  • How users read mail. Webmail and IMAP users keep their mail on FortiMail. POP3 users often download it into a local data file and leave little on the server. Their history lives in PST files on their PCs, which IMAP migration can't see, so plan a PST import for them (part 5).
  • Address books and calendars. Server mode keeps a global and per-domain address book under Domain & User › Address Book, which you can export as CSV or vCard, and users can keep their own contacts and calendars in webmail. IMAP migration moves none of these.
  • Email archiving. Archive accounts and policies under Email Archiving, with their retention period and storage location (local disk, NAS or a remote FTP or SFTP server). Part 5 deals with them.
  • Security and content features. Antispam and antivirus profiles, content and DLP rules, identity-based encryption, disclaimers, DKIM signing and quarantine reports. Part 4 maps each one to its replacement.
  • Relay clients. Applications, scanners and printers that send through FortiMail because an access control rule lets them. They stop working on cutover day unless someone moves them.

Step 2: Measure every mailbox, not just the total#

4 TB across 500 mailboxes averages 8 GB, but the average hides the mailboxes that shape the design. What you need is the distribution, sorted into bands that match Exchange Online's limits:

Mailbox sizeWhat it means in Exchange Online
Up to about 45 GBFits every license, and fits an unlicensed shared mailbox (50 GB) with room to spare.
45 to 100 GBNeeds a 100 GB mailbox. Too big for an unlicensed shared mailbox, so for a leaver it becomes an exception (part 3).
Over 100 GBDoesn't fit a primary mailbox. Plan Large Mailbox Onboarding, which copies over IMAP into the primary and archive mailboxes (part 5).

Count items as well as gigabytes. IMAP migration copies at most 500,000 items per mailbox (newest first), skips messages larger than 35 MB and ignores folders with a forward slash (/) in their name, and Exchange Online holds at most 1 million items in one folder. A mailbox that breaks one of these rules needs attention before its wave, not after it.

The most reliable way to get the numbers is Microsoft's mailbox analysis for Google Workspace and IMAP sources. It reads each source mailbox through the same IMAP endpoint and CSV format you'll use for the migration, and reports item counts and sizes per folder. It runs in Exchange Online PowerShell only, and for IMAP sources the target Exchange Online mailboxes must already exist:

PowerShell
Connect-ExchangeOnline

# Uses the IMAP endpoint and CSV format from part 2
New-MigrationBatch -Analyze -Name "FML-Analysis-01" -SourceEndpoint "FortiMail-IMAP" -AutoStart `
    -CSVData ([System.IO.File]::ReadAllBytes("C:\Migration\analysis-01.csv"))

# Estimated item count and size (bytes) per mailbox
Get-MigrationUser -BatchId "FML-Analysis-01" | Format-Table Identity, Status, Estimate*

# Folder by folder for one mailbox
$stats = Get-MailboxAnalysisRequestStatistics "amal.hassan@contoso.com" -IncludeAnalysisResult -IncludeFolderDetails
$stats.MailboxAnalysisResult.AnalysisResultDataRows | Format-Table FolderPath, ItemCount, ItemSize

Folders over 100 GB are flagged as warnings in the results. Copy the totals into the mapping sheet and add two columns: the size band and the planned license or mailbox type.

Step 3: Estimate how long the copy takes#

IMAP migration is a pull: Exchange Online connects to FortiMail's IMAP service and copies the mail. Three things set the pace: how fast FortiMail can serve IMAP (its disks, CPU and session limits), your internet uplink, and Microsoft's migration service, which copies 20 mailboxes at a time by default and up to 100 if you raise the endpoint's concurrency.

The uplink sets the ceiling. Assuming the migration can use about 70% of it:

UplinkAbout 70% of it4 TB at that rate
100 Mbps31.5 GB per hourAbout 127 hours (5.3 days)
200 Mbps63 GB per hourAbout 63 hours (2.6 days)
1 Gbps315 GB per hourAbout 13 hours

Real migrations rarely reach that ceiling, because the IMAP server is usually the bottleneck. Microsoft publishes duration estimates for generic IMAP onboarding per mailbox, based on earlier customer migrations: a mailbox up to 10 GB typically finishes in a day; 10 to 50 GB in one to two days; 50 to 100 GB in one day at the median but up to eight days at the 90th percentile; 100 to 200 GB in three to 29 days. Above 200 GB isn't supported.

So measure your own rate in the pilot (part 2) and plan with it. If the pilot sustains 25 GB per hour across the endpoint, 4 TB needs about 160 hours: 6.7 days of continuous copying, or about 13 days if you only copy 12 hours a night. At 10 GB per hour it's 400 hours, roughly 17 days nonstop. That sounds long, but it doesn't have to fit into a weekend. An IMAP batch keeps synchronizing every 24 hours until you remove it, so the bulk copy runs in the background for weeks while people keep working on FortiMail, and the cutover only has to bring over the last day's mail.

Step 4: Choose licenses for the active users#

Mailbox and archive sizes come from the license. These are the values on Microsoft's Exchange Online limits page, including the 2026 increase for the Business suites; check the current page before you buy:

LicensePrimary mailboxArchive mailbox
Exchange Online Plan 1, Office 365 E150 GB50 GB
Microsoft 365 Business Basic, Business Standard100 GB (raised from 50 GB in a June–September 2026 rollout)50 GB
Microsoft 365 Business Premium100 GB (same rollout)100 GB, auto-expanding up to 1.5 TB
Exchange Online Plan 2, Office 365 and Microsoft 365 E3 or E5100 GB100 GB, auto-expanding up to 1.5 TB (3 TB for E5-class licenses, rolling out from October 2026)

Three practical points for 400 users:

  • Microsoft 365 Business plans are limited to 300 users per plan, so 400 people usually means an Enterprise plan or a mix, for example Business plans for most users and Exchange Online Plan 2 or E3 for the rest.
  • Anyone whose mailbox is between 50 and 100 GB needs a 100 GB license. Exchange Online Plan 1 users who need a large archive can add Exchange Online Archiving.
  • After licenses are assigned, check the quota Exchange actually applies with Get-Mailbox amal.hassan@contoso.com | Format-List ProhibitSendReceiveQuota before that user's wave starts.

The 100 leavers don't need licenses at all if their mailboxes fit in 50 GB. Part 3 covers the rules and the exceptions.

Step 5: Pick a method for each kind of data#

DataMethodNotes
Mail in active users' FortiMail mailboxesIMAP migration batchesBuilt in and free; mail folders only; needs each mailbox's credentials (part 2)
Mailboxes over 100 GBLarge Mailbox OnboardingIMAP into the primary and archive mailboxes by date or folder; PowerShell only (part 5)
Leavers' mailIMAP batches into unlicensed shared mailboxes50 GB per mailbox; pilot it first (part 3)
POP3 users' PST filesPST import over the networkAbout 24 GB a day per mailbox (part 5)
Contacts and calendarsExport and import, or a third-party toolIMAP migration doesn't move them
FortiMail email archiveA decision with legal, not a defaultPart 5

Third-party migration tools are a reasonable alternative when you want contacts, calendars or date filters in one pass, and Microsoft's migration performance page lists several vendors. The native tools cover everything in this series at no extra cost.

Step 6: Put the work in the right order#

From FortiMail inventory to a retired mail serverStep 1: Inventory FortiMail. Mode, users, sign-in, POP3 users, archives and relay clients Step 2: Size every mailbox. Analysis batch: items and GB per folder, exceptions listed Step 3: Licenses and leaver mailboxes. Licensed active users, unlicensed shared mailboxes for leavers Step 4: Pilot and measure. GB per hour from the pilot sets the wave plan Step 5: Pre-sync in waves. Users stay on FortiMail; batches sync every 24 hours Step 6: Cut over. MX, Autodiscover, SPF and DKIM, then Outlook and phones Step 7: Archives, then retire FortiMail. PST imports, the archive decision, a final backup and disposal1Inventory FortiMailMode, users, sign-in,POP3 users, archivesand relay clients2Size every mailboxAnalysis batch: itemsand GB per folder,exceptions listed3Licenses and leavermailboxesLicensed active users,unlicensed sharedmailboxes for leavers4Pilot and measureGB per hour from thepilot sets the wave plan5Pre-sync in wavesUsers stay on FortiMail;batches sync every 24hours6Cut overMX, Autodiscover, SPFand DKIM, then Outlookand phones7Archives, thenretire FortiMailPST imports, the archivedecision, a final backupand disposalFrom FortiMail inventory to a retired mail serverStep 1: Inventory FortiMail. Mode, users, sign-in, POP3 users, archives and relay clients Step 2: Size every mailbox. Analysis batch: items and GB per folder, exceptions listed Step 3: Licenses and leaver mailboxes. Licensed active users, unlicensed shared mailboxes for leavers Step 4: Pilot and measure. GB per hour from the pilot sets the wave plan Step 5: Pre-sync in waves. Users stay on FortiMail; batches sync every 24 hours Step 6: Cut over. MX, Autodiscover, SPF and DKIM, then Outlook and phones Step 7: Archives, then retire FortiMail. PST imports, the archive decision, a final backup and disposal1Inventory FortiMailMode, users, sign-in, POP3 users, archives and relayclients2Size every mailboxAnalysis batch: items and GB per folder, exceptionslisted3Licenses and leaver mailboxesLicensed active users, unlicensed shared mailboxes forleavers4Pilot and measureGB per hour from the pilot sets the wave plan5Pre-sync in wavesUsers stay on FortiMail; batches sync every 24 hours6Cut overMX, Autodiscover, SPF and DKIM, then Outlook andphones7Archives, then retire FortiMailPST imports, the archive decision, a final backup anddisposal
Figure 1 · Process From FortiMail inventory to a retired mail server. The order that keeps users working: inventory and sizing first, a measured pilot, background waves while everyone stays on FortiMail, then one cutover and the archive work.
  1. Tenant ready. Add and verify the domain, create the users (synchronized with Microsoft Entra Connect if you have Active Directory, cloud-only otherwise) and assign licenses. The target mailboxes must exist before any IMAP batch can run.
  2. Leaver mailboxes. Create the shared mailboxes for former employees (part 3).
  3. DNS. Lower the MX record's TTL to 3,600 seconds well before cutover, as Microsoft recommends, and confirm who can change DNS at short notice.
  4. FortiMail ready for IMAP. Certificate, firewall rule for Exchange Online, connection limits and credentials (part 2).
  5. Analysis and pilot. Size the mailboxes, then run a pilot of five to ten mailboxes that includes one of the largest, and record the GB per hour.
  6. Waves. Pre-sync everyone in waves while users stay on FortiMail.
  7. Cutover. MX, Autodiscover, SPF and DKIM, then the clients (parts 2 and 4).
  8. Final syncs. Keep the batches running for at least 72 hours after the MX change, then remove them.
  9. Archives. PST imports and the FortiMail archive decision (part 5).
  10. Decommissioning. Retire or rebuild FortiMail after the rollback window and the archive decision.

Risks to settle before the pilot#

  • No administrator login for IMAP. Microsoft can migrate with one administrator account only when the IMAP server supports it. Its CSV guidance shows formats for servers such as Exchange, Dovecot and Mirapoint, and FortiMail isn't among them. Unless Fortinet documents delegated IMAP access for your firmware, plan for per-user credentials.
  • Directory passwords. If FortiMail checks passwords against Active Directory, the migration password is the user's directory password, and also their Microsoft 365 password if you synchronize password hashes to Microsoft Entra ID.
  • Changing FortiMail's mode. Fortinet warns that changing the operation mode resets most of the configuration to factory defaults. Don't switch the production unit to gateway mode until its mailboxes and archives are out and backed up (part 4).
  • Retention requirements. Ask legal and HR how long leavers' mail and the archive must be kept, and who may search them. The answers decide parts 3 and 5.
  • Oversized items and awkward folders. Messages over 35 MB and folders with a forward slash in the name need manual handling.
  • Relay clients. Every application that relays through FortiMail needs a new path before cutover (part 4).

Verify the plan#

Before the pilot starts, you should have these in hand:

  • A mapping sheet: every FortiMail account with its Microsoft 365 address, license or shared mailbox, size band and wave.
  • Analysis results for every mailbox, with the exceptions listed: active mailboxes over 100 GB, leaver mailboxes over 45 GB, mailboxes over 500,000 items and folders that won't migrate.
  • A license plan that covers every active mailbox's size.
  • The MX TTL lowered, and the DNS owners briefed.
  • A communication plan for users and a rollback plan: the MX record goes back to FortiMail while the batches still run.

After the pilot, add one more number: the measured GB per hour. With it, the wave plan becomes arithmetic rather than hope.

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)