In This Article
- Overview
- Prerequisites
- Identify what your CSV file represents
- Why a CSV file is not a mailbox email import file
- Option 1: Import a contacts CSV into Outlook
- Option 2: Use Microsoft 365 IMAP migration for email
- Option 3: Use classic Outlook and a PST file for a file-based email move
- Recover missing Kerio data before you migrate
- What is not migrated by each method
- When a third-party migration tool may be the better option
Overview
Use this article when you are moving data from Kerio Connect to Microsoft 365 and you have a CSV file that you expect to import into Microsoft 365. A CSV file can be useful in a Microsoft 365 migration, but it is not a universal mailbox container. Microsoft 365 uses CSV files for specific purposes, such as importing contacts into Outlook or telling the IMAP migration service which source mailboxes to connect to. The email messages themselves are migrated from the source IMAP mailbox or imported from an Outlook Data File (.pst), not from a generic mailbox CSV file.
This distinction matters because choosing the wrong import path can make it look like Microsoft 365 is rejecting Kerio data, when the real issue is that the file is the wrong type for mailbox email content. Kerio Connect also does not provide an official outbound migration tool; Kerio’s migration guidance points administrators to manual export methods, target-platform import tools, or third-party utilities instead. See Migrating Content from Kerio Connect to Another Platform.
If the Kerio mailbox is already missing messages, recover the missing data first and migrate second. IMAP migration and PST export/import both move the data that is currently available in the source mailbox or Outlook profile; they do not reconstruct mail that is no longer present in Kerio Connect.
Prerequisites
- Administrative access to Kerio Connect Administration if you need to check IMAP/IMAPS services or recover deleted items.
- A target Microsoft 365 mailbox that already exists and is licensed. Microsoft requires the target mailbox to exist before IMAP migration.
- Credentials for each source Kerio mailbox you plan to migrate by IMAP, unless you have separately verified a supported administrator-credential format for your source IMAP server.
- Network reachability from Microsoft 365 to the Kerio Connect IMAP or IMAPS service.
- Classic Outlook if you plan to use the PST route. Microsoft states that importing a mailbox or calendar using a PST file is not supported in new Outlook and that classic Outlook is included with Microsoft 365 subscriptions that include desktop apps, including Microsoft 365 Business Standard. See Export emails, contacts, and calendar items to Outlook using a .pst file.
Identify what your CSV file represents
Open the CSV file in a text editor or spreadsheet application and check the header row before importing anything. Do not rely on the filename alone. A file called “mailbox.csv” might be a contacts file, a Microsoft IMAP migration batch file, a Kerio user-account export, or another file created manually.
| CSV pattern | What it means | Correct action | What goes wrong if you use it incorrectly |
|---|---|---|---|
| Contact fields such as names, email addresses, phone numbers, company names, or addresses | The file is a contacts CSV. | Import it into Outlook contacts. See Option 1. | It will not create mailbox folders or import email messages because it contains contact records, not mail items. |
EmailAddress,UserName,Password |
The file is a Microsoft 365 IMAP migration batch definition. | Use it when creating an IMAP migration batch in Exchange admin center. See Option 2. | The CSV tells Microsoft 365 which IMAP mailbox to access. It does not contain the email content itself. |
Kerio user-account fields such as Name, Password, FullName, Description, MailAddress, or Groups |
The file is for Kerio Connect user/account import, not Microsoft 365 mailbox email import. | Do not use it as a Microsoft 365 mailbox import file. Create the Microsoft 365 users/mailboxes separately, then choose IMAP or PST for email content. | Microsoft 365 will not treat Kerio account metadata as mailbox messages. Kerio documents this CSV pattern for account import in Importing Users in Kerio Connect. |
| Any other custom columns | The file type is not confirmed. | Identify the source of the file or provide the header row to the migration administrator before proceeding. | Importing an unknown CSV can create incomplete or incorrect contact data, or fail because it is not a supported Microsoft migration file. |
Tip: If the CSV contains special characters or non-English names and you are importing contacts, save it using UTF-8 encoding before import. Microsoft’s Outlook contact-import guidance notes that UTF-8 helps the import tool display all text correctly. See Import or export contacts in Outlook using a .csv file.
Why a CSV file is not a mailbox email import file
In Microsoft’s documented IMAP migration workflow, the CSV file is a control file. Each row identifies the Microsoft 365 mailbox and the source IMAP credentials that Microsoft 365 should use. Microsoft 365 then connects to the source IMAP mailbox and copies mail-folder items from that mailbox. The CSV itself is not the mailbox data. Microsoft documents the required IMAP migration CSV headers as EmailAddress, UserName, and Password. See CSV files for IMAP migration batches in Exchange Online.
For mailbox email content, use one of these supported approaches instead:
- IMAP migration: Microsoft 365 connects to Kerio Connect over IMAP/IMAPS and migrates email from mail folders.
- PST export/import: Classic Outlook exports the Kerio mailbox content visible in the Outlook profile to a PST file, then classic Outlook imports that PST into the Microsoft 365 mailbox.
Important: Microsoft IMAP migration migrates mail-folder items only. It does not migrate contacts, calendar items, or tasks, and Microsoft documents limits such as 500,000 items per mailbox and a 35 MB maximum message size. See What you need to know about migrating your IMAP mailboxes to Microsoft 365 or Office 365.
Option 1: Import a contacts CSV into Outlook
Use this option only when the CSV contains contact data. This works because Outlook has a contacts import workflow for CSV files; it does not mean Outlook can import mailbox email messages from CSV.
- Sign in to the target Microsoft 365 mailbox in Outlook on the web, new Outlook, or classic Outlook.
- Open People.
- Choose the import path for your Outlook version:
- New Outlook: from the navigation bar, select People, then select Import contacts from the ribbon.
- Outlook on the web: from the navigation bar, select People, then select Manage contacts > Import contacts.
- Classic Outlook: go to File > Open & Export > Import/Export, choose Import from another program or file, choose Comma Separated Values, then choose Next.
- Browse to the CSV file and open it.
- Choose how duplicates should be handled if classic Outlook prompts for duplicate handling.
- Select the Contacts folder under the correct Microsoft 365 mailbox.
- Start the import by selecting Import in new Outlook or Outlook on the web, or Finish in classic Outlook.
- Open People and confirm that the expected contacts appear.
Why this works: Contacts are structured records that Outlook can map from CSV columns into contact fields. Email messages are not handled by this contact import workflow.
What to check if the import looks wrong: If names or characters display incorrectly, cancel the import, save the CSV using UTF-8 encoding, and import again. If the CSV does not map columns correctly, correct the CSV headers or field mapping before importing the full file.
Option 2: Use Microsoft 365 IMAP migration for email
Use this option when the goal is to move email from Kerio Connect into Microsoft 365 without buying a third-party migration tool. This is usually the “free” Microsoft-provided path for email-only migration, but it is not a full Kerio-to-Microsoft 365 migration for contacts and calendars.
- In Kerio Connect Administration, go to Configuration > Services.
- Confirm that IMAP or IMAPS is enabled and running. Kerio Connect services are managed under Configuration > Services; by default, services run on standard ports. See Kerio Connect Services.
- Confirm which hostname and port Microsoft 365 should use to reach Kerio Connect. Use the externally reachable Kerio Connect mail hostname. Use IMAPS on port
993when available, or IMAP with STARTTLS on port143if that is the configured secure method in your environment. Kerio explains the difference in Understanding IMAP and IMAPS Protocol Behavior. - Confirm that the firewall allows Microsoft 365 to connect to the Kerio IMAP/IMAPS service. If Microsoft 365 cannot reach the IMAP endpoint, the migration batch cannot read the source mailbox.
- In Microsoft 365, create or verify the target user mailbox and assign the required license.
- Create the IMAP migration CSV. For one mailbox at a time, use one row below the header. For a batch, use one row per mailbox. The required header is:
EmailAddress,UserName,Password
user@your-microsoft-365-domain.example,source-kerio-imap-username,source-kerio-imap-password
EmailAddressis the Microsoft 365 mailbox.UserNameis the Kerio/source IMAP login name for the mailbox being migrated.Passwordis the Kerio/source IMAP password for that mailbox, unless you have verified and are using a source-server-specific administrator credential format.
- In the Exchange admin center, go to Migration.
- Create an IMAP migration endpoint if one does not already exist. Choose IMAP as the endpoint type and enter the Kerio Connect IMAP server name and connection settings.
- Create a migration batch: select Add migration batch, choose Migrate to Exchange Online, then choose IMAP migration.
- Upload the CSV file on the mailbox selection step.
- Configure any filtering options only if you intentionally want to exclude or include specific content.
- Schedule or start the migration batch.
- After the batch completes, verify the mailbox in Microsoft 365: sign in to Outlook, confirm expected folders are present, check message counts where practical, and spot-check recent and older messages.
Microsoft documents the Exchange admin center IMAP migration workflow in Migrate other types of IMAP mailboxes to Microsoft 365 or Office 365.
Why this works: Kerio Connect exposes mailbox email through IMAP/IMAPS, and Microsoft 365 can use IMAP migration to read mail-folder items from an IMAP-enabled source system.
What goes wrong if you skip the checks: If the Microsoft 365 mailbox does not exist, Microsoft has nowhere to place the migrated mail. If IMAP/IMAPS is disabled or blocked by a firewall, Microsoft 365 cannot connect to Kerio Connect. If the CSV contains the wrong source username or password, the migration service cannot authenticate to the source mailbox.
Option 3: Use classic Outlook and a PST file for a file-based email move
Use this option when you need a portable file workflow instead of a server-to-server IMAP pull, or when the mailbox is already fully available in classic Outlook. This route is slower and more manual for many users, but it can be useful for one mailbox at a time.
Warning: Use classic Outlook for the import side. Microsoft states that importing a mailbox or calendar using a PST file is not supported in new Outlook.
- Add the Kerio mailbox to classic Outlook.
- Wait until the Kerio mailbox content you intend to export is visible in Outlook. Do not export before the mailbox content is available, because the PST can only contain data available to the Outlook profile.
- In classic Outlook, go to File > Open & Export > Import/Export.
- Choose Export to a file, then choose Outlook Data File (.pst).
- Select the source Kerio account or the specific folders you want to export.
- Select Include subfolders if you want all folders under the selected mailbox or folder.
- Choose where to save the PST file, then finish the export.
- Add or open the target Microsoft 365 mailbox in classic Outlook.
- Go to File > Open & Export > Import/Export.
- Choose Import from another program or file, then choose Outlook Data File (.pst).
- Select the PST file and import it into the target Microsoft 365 mailbox.
- After import, verify that the expected folders and messages appear in the Microsoft 365 mailbox.
Why this works: PST is Outlook’s mailbox-data file format. Microsoft documents PST export/import as a way to move mailbox content between accounts in classic Outlook.
What goes wrong if you use the wrong Outlook version: New Outlook can work with PST files in limited ways, but Microsoft states that importing a mailbox or calendar using a PST file is not supported in new Outlook. Use classic Outlook for the import workflow.
Recover missing Kerio data before you migrate
If the Kerio mailbox is missing messages because of deletion, cleanup, corruption, or another incident, recover the mailbox before starting the migration. Migrating first moves only the data that is currently available to the migration method.
- In Kerio Connect Administration, go to Configuration > Domains.
- Open the affected domain and check the Messages tab.
- Confirm whether Keep deleted items for was enabled and whether the retention period still covers the missing items.
- If Deleted Items Recovery is available, go to Accounts > Users.
- Select the affected user, then choose More Actions > Recover Deleted Items.
- After recovery, verify the recovered items in the mailbox before starting IMAP migration or PST export.
Kerio documents that Deleted Items Recovery can recover email messages, events, contacts, notes, and tasks when it was enabled for the domain, and that recovered items are found in the user’s Trash folder. See Recovering Deleted Items in Kerio Connect.
Warning: If Deleted Items Recovery does not contain the missing data and backup restoration is required, choose the recovery method before migration. Kerio backup recovery methods can have different effects on current mailbox data. Do not run a restore against a live mailbox unless you understand whether it will merge data or replace existing content.
If you are not sure which recovery method is safe, pause the migration plan and gather the affected domain and username, the missing date range, the Kerio Connect server operating system, the available backup filenames or dates, and whether newer live mailbox content must be preserved. That information is required to choose between Deleted Items Recovery, archive review, KMSRecover, or a manual restore path without risking additional data loss.
What is not migrated by each method
| Method | Migrates | Does not migrate | Use when |
|---|---|---|---|
| Contacts CSV import | Contacts that can be mapped from CSV columns | Email messages, mail folders, calendar items, tasks | Your CSV is clearly a contacts file |
| Microsoft 365 IMAP migration | Email in mail folders | Contacts, calendar items, tasks | You need a free Microsoft-provided email-only migration path |
| Classic Outlook PST export/import | Mailbox data available in the Outlook profile and selected for export | Items not available in the Outlook profile; some metadata such as views, permissions, AutoArchive settings, message rules, and blocked senders lists | You need a file-based move for one mailbox or a small number of mailboxes |
| Third-party migration utility | Depends on the product | Depends on the product | You need a larger or fuller-fidelity migration than IMAP or manual PST workflows provide |
If you also need calendars, Kerio documents manual calendar export to an .ics file in Export Calendars to .ics file. If you also need contacts and do not already have a usable contacts CSV, Kerio documents raw contact storage and CSV conversion workarounds in Exporting Kerio Connect Contacts from raw data and Convert Contacts .eml files into a single CSV file.
When a third-party migration tool may be the better option
Use the built-in Microsoft IMAP migration when the requirement is email-only and the mailbox count is small enough for a controlled migration. Use contacts CSV import or calendar ICS export/import for those data types when a manual process is acceptable.
Consider a third-party migration utility when you need to migrate many users, need a single workflow for email plus contacts plus calendars, or cannot accept the manual effort of separate IMAP, contacts, calendar, and PST procedures. Kerio’s own outbound migration article lists third-party utilities as one of the possible approaches because Kerio Connect does not provide an official outbound migration tool.
Decision checkpoint: If you only need email for one mailbox, start with IMAP migration. If you have a contacts CSV, import it as contacts. If you need full mailbox content in a file workflow, use classic Outlook and PST. If you need email, contacts, calendars, and many users in one project, evaluate third-party migration tools before committing to a manual migration plan.
Ciprian Nastase
Comments