Migrate From Microsoft 365 to OquMail Without Losing Mail
Migrate from Microsoft 365 to OquMail: IMAP with modern sign-in, Outlook PST export, shared mailboxes, removing your domain from the tenant and cancelling.
To migrate from Microsoft 365 to OquMail, copy each mailbox out with Thunderbird or classic Outlook, turn shared mailboxes and distribution lists into OquMail groups, switch your MX records (the settings that tell the internet where to deliver email for your domain), and remove the domain from your Microsoft tenant before you cancel. Every address stays the same. Two Microsoft details catch people out. Exchange Online no longer accepts a plain password over IMAP, so old tools fail to sign in. And Microsoft delivers mail between colleagues inside the tenant until the domain is removed, so half-finished moves lose messages. Here is the order that avoids both.
Quick answer
Lower your DNS TTL a day ahead and add the domain in OquMail with its ownership TXT, DKIM and DMARC records. On cutover day, switch MX to mail.oqumail.com, replace Microsoft's SPF include with OquMail's value, delete the autodiscover CNAME, click Verify and create all mailboxes and groups at once. Then move every user in Microsoft 365 to their onmicrosoft.com address and remove your domain, copy the old mail over IMAP, and let the subscription run out only after the final copy. OquMail has no built-in import, so the copy runs on your computer or with imapsync.
Getting mail out of Exchange Online
- IMAP: outlook.office365.com, port 993, SSL/TLS. Microsoft has retired basic authentication, so the mail app must support modern sign-in (OAuth2). Thunderbird and Outlook do; many older sync tools do not.
- IMAP is on by default for every mailbox, but an admin can switch it off per user, and Microsoft notes that turning on security defaults switches it off as well. If sign-in works but the account never syncs, that is the usual reason.
- Classic Outlook for Windows can save a mailbox as a file: File, Open & Export, Import/Export, Export to a file, Outlook Data File (.pst). It makes a good local backup before you cancel.
- Admins with eDiscovery rights can export whole mailboxes from Microsoft Purview without touching anyone's computer. Useful when someone has already left.
- imapsync works too. Its --office1 option sets the Microsoft host for you, but it needs an OAuth2 access token made with a separate helper script, so it is only worth it for a larger team.
Copying with Outlook or Thunderbird
- In classic Outlook, keep the Microsoft 365 account and add the OquMail mailbox as an IMAP account. Our Outlook for Windows guide has every field.
- In Thunderbird instead, add the Microsoft 365 account first and pick OAuth2 as the authentication method; Microsoft's sign-in window opens. Then add the OquMail account with the settings further down.
- Create matching folders in OquMail and drag folders across while holding Ctrl, so the originals stay put. Do Inbox last.
- Compare the message count in each folder on both sides before you delete anything. The IMAP move guide covers large folders and duplicates.
Shared mailboxes, distribution lists and groups
Microsoft offers several kinds of shared address. OquMail has two building blocks, mailboxes and groups, so map each one before cutover:
- Distribution lists and Microsoft 365 groups become OquMail groups: one address delivered to several mailboxes, up to 50 members each, including up to 10 people outside the company. A workspace can have 10 groups.
- A shared mailbox such as info@ becomes either a group, so new mail lands in each member's own inbox, or a normal OquMail mailbox with its own login. A group has no stored history, so copy the old shared mail into a folder in one person's mailbox, or pick the mailbox option.
- Extra addresses on a user, such as billing@ delivered to the owner, become a group with that person as its member, or a mailbox of their own.
- Room and equipment mailboxes are calendar booking tools. OquMail has no equivalent.
Cutover day, in order
- The day before, lower the TTL on your MX and TXT records to 300 seconds or the minimum your DNS host allows.
- Add the domain in OquMail and publish the ownership TXT, DKIM and DMARC records. Microsoft's DKIM uses two CNAMEs, selector1 and selector2; OquMail's is a TXT under its own selector, so they do not clash. Edit an existing _dmarc record instead of adding a second. Verify reports MX as missing until the next step, which is expected.
- In a quiet hour, replace the MX records (the settings that tell the internet where to deliver email for your domain) that ends in mail.protection.outlook.com with mail.oqumail.com at priority 10, and swap include:spf.protection.outlook.com in your SPF record for OquMail's value.
- Delete the autodiscover CNAME that points to autodiscover.outlook.com. While it exists, Outlook keeps steering people back to Microsoft 365 when they add the new account.
- Click Verify and create every mailbox and group in one sitting. Mail for an address that does not exist yet in OquMail bounces.
- In the Microsoft 365 admin center, open Users, Active users, select everyone and use Change domains to move them to the onmicrosoft.com domain, then remove your domain under Settings, Domains. Until you do, Exchange Online delivers colleague-to-colleague mail inside the tenant without looking at MX; the old host fix explains this. The old mailboxes stay reachable under their onmicrosoft.com usernames for the final copy.
- Connect phones and apps to OquMail, send tests both ways, and start the copy.
The five DNS records OquMail needs
- Ownership (TXT at @) — oqumail-verification=… (your own token is shown in the OquMail dashboard; it proves the domain is yours)
- MX — host @, value mail.oqumail.com, priority 10
- SPF (TXT at @) — v=spf1 MX (Mail Exchanger — where incoming email is delivered) a:mail.oqumail.com ~all
- DKIM (TXT at your selector ._domainkey) — v=DKIM1; k=rsa; p=… (the exact key is shown in your OquMail dashboard)
- DMARC (TXT at _dmarc) — v=DMARC1; p=none; rua=mailto:dmarc@yourdomain.com
Free business email on your own domain
OquMail gives you up to 15 mailboxes on your domain — free — with guided SPF/DKIM/DMARC, webmail, IMAP/SMTP for any mail app, and a send API. Setup is a few DNS records; changes usually take effect within minutes, occasionally up to 48 hours. Start at oqumail.com.
OquMail connection settings
- Incoming (IMAP): mail.oqumail.com, port 993, SSL/TLS
- Outgoing (SMTP): mail.oqumail.com, port 587, STARTTLS
- Username: your full email address (you@yourdomain.com)
- Password: the same password you use for OquMail webmail
Microsoft records to clean up
- MX: the record ending in mail.protection.outlook.com.
- Autodiscover: the CNAME pointing to autodiscover.outlook.com.
- SPF: include:spf.protection.outlook.com.
- Verification: the TXT that starts with MS=, which you can delete once the domain is removed from the tenant.
- DKIM: the selector1._domainkey and selector2._domainkey CNAMEs.
- Teams and Skype: SRV records for _sipfederationtls._tcp (target sipfed.online.lync.com) and _sip._tls, and CNAMEs named sip and lyncdiscover. Keep them only if you still run Teams on this domain.
- Device management: CNAMEs named enterpriseregistration and enterpriseenrollment, if you used Intune.
Calendars and contacts
OquMail is email only, with no calendar and no shared address book. Before you cancel, save calendars from classic Outlook with File, Save Calendar, which writes an .ics file that Google Calendar, Outlook.com or Apple Calendar can import. Export contacts from Outlook on the web under People as a CSV file and import them into your phone or mail app. If your team runs its day on shared Outlook calendars and Teams meetings, Microsoft 365 is honestly the better fit, and our Microsoft 365 vs free email hosting comparison helps you weigh it.
Cancelling without losing data
Microsoft's lifecycle gives you some room. If you turn off recurring billing, the subscription ends on its term date and moves to Disabled for 90 days, when only admins can reach the data; many subscriptions first spend 30 days Expired with normal access, though Microsoft dropped that stage in February 2026 for licence-based plans bought directly under a Microsoft Customer Agreement. If you cancel inside the cancellation window, it goes straight to Disabled, and Microsoft says data you leave behind may be deleted after 90 days and will be deleted no later than 180 days after cancellation. Either way, finish the final copy and save a .pst per person first; our backup guide covers where to keep it.
What you lose and what you gain
- You lose Outlook's Exchange features: shared calendars, meeting rooms, Teams, OneDrive and the desktop Office apps that come with some plans.
- You lose large mailboxes. Microsoft 365 mailboxes are usually far bigger than OquMail's 5 GB, so older years may need to stay in a .pst archive.
- You gain mailboxes that cost nothing for up to 15 people across 3 domains, with no per-user licence.
- You gain IMAP and SMTP that work in any app with a normal password, groups for shared addresses, and a send API for website mail. Outlook still works as your mail app.
Common questions
Will I lose emails when I leave Microsoft 365?
No, as long as you copy before the subscription reaches Deleted. Switching MX only moves new mail. Copy every folder, compare counts, and keep a .pst per person in case someone later needs an old thread.
Can I keep using Outlook with OquMail?
Yes. Add the OquMail mailbox to Outlook as an IMAP account with the settings above. You keep the program you know; only the server changes.
Why does Outlook keep asking me to sign in to Microsoft after the switch?
The autodiscover CNAME still points to autodiscover.outlook.com, or the old Microsoft 365 profile is still in Outlook. Delete the CNAME, remove the old account from Outlook once the copy is done, and add the OquMail account manually.
Do I have to remove my domain from Microsoft 365?
Yes, if anyone stays in the tenant even for a day. Until the domain is removed, Exchange Online keeps delivering internal mail to the old mailboxes. Removal can take from five minutes to a day, depending on how many users, groups and mailboxes still use the domain.
Want to see how your own domain is set up? Use the free SPF checker, DMARC checker and MX lookup: they run in your browser and store nothing.