Written by Jennifer Walsh. Reviewed for technical accuracy by Shubham Dixit, Independent Expert in Email Forensics and Data File Conversion. Updated 16 October 2026.
Shubham is an independent external reviewer and not an employee of PCDOTS.
Quick answer. To import Maildir to an IMAP server, copy the Maildir into the user’s mail location on the server, set the owner to the mail account, and Dovecot serves it over IMAP. To merge into a mailbox that already has mail, use the doveadm import command. For Outlook, serve the Maildir on IMAP and connect Outlook to it, or convert the Maildir to a PST.
On this page
How do you import Maildir to an IMAP server?
You import Maildir to an IMAP server by putting the mail where the server expects it, not with a paid tool, whatever a tool-first guide claims. The reason is how Maildir works.
In Maildir, every email is already a separate file in a folder. So on a Dovecot server you copy the Maildir into the user’s mail location, fix the owner, and Dovecot serves it over IMAP. To merge a Maildir into a mailbox that already holds mail, the doveadm import command does it.
Want the mail in Outlook? Outlook can’t open a Maildir on its own, so you serve it on IMAP and connect Outlook over IMAP, or convert the Maildir to a PST. Each route is below, starting with the format that explains them all.
A Maildir reaches an IMAP server by being served on Dovecot or merged with doveadm import, or a converter sends it to IMAP or a PST for Outlook.
“The claim that there’s no manual way is wrong. A Maildir is just a folder of message files, so on a Dovecot box you drop it into the user’s mail location, fix the ownership, and it’s served over IMAP straight away. When a mailbox already has mail, I merge with doveadm import instead of overwriting. The time a converter really earns its place is when you don’t have shell access to the server, or the destination is Outlook, since Outlook can’t read a Maildir and a clean PST saves the fiddling. I always copy one mailbox first and open it before trusting the rest.” Shubham Dixit, Data File reviewer (draft, pending approval)
What is the Maildir mail format?
Maildir keeps every message as a separate file in a directory, which is why it moves so cleanly. It’s the format behind Dovecot, Courier, qmail and many Postfix setups.
How a Maildir is laid out
- Three subfolders.
newholds mail that just arrived,curholds mail the user has seen, andtmpis used while a message is being delivered. - One file per email. Every message is its own file, so nothing is locked inside a single container like a PST or MBOX.
- Maildir++ layout. Folders sit under
~/Maildir, with subfolders dot-prefixed, like~/Maildir/.Sent. That’s the default Dovecot reads.
Because the mail is already files, importing it is mostly a matter of putting the Maildir where the server looks and letting it index. Here’s that native route first.
How to import Maildir to a Dovecot IMAP server
You import the Maildir by copying it into the user’s mail location and letting Dovecot serve it. There’s no separate import for a Maildir that’s in place, Dovecot indexes it on the next login.
Here are the five steps.
- Do the copy during a quiet window, so no new mail lands halfway through.
- Copy the Maildir into the user’s mail location. For system users that’s
~/Maildir, for virtual users a path like/var/vmail/example.com/user/Maildir. - Set the owner to the mail account, with a command like
chown -R vmail:vmail /var/vmail/example.com/user/Maildir. - Leave the server to index it on the next IMAP login. A Maildir that’s in place is served as is.
- Connect over IMAP and confirm the folders and messages appear.
To merge a source Maildir into a mailbox that already has mail, the doveadm import command does it without overwriting. A typical form is doveadm import -u [email protected] maildir:/path/to/source/Maildir '' all. The mail_location setting is what points Dovecot at the Maildir. For a live move between two servers, dsync or imapsync copies mailbox to mailbox instead. One caution, don’t let another program edit the Maildir while Dovecot is live, since that can clash with its locking.
What if the IMAP server isn’t yours to drop files into, like a hosted mailbox? A sync tool pushes the Maildir up over IMAP instead. mbsync (isync) and OfflineIMAP both sync a local Maildir to an IMAP mailbox. You point one side at the Maildir and the other at the account, then sync, and the mail uploads into the server.
Copy the Maildir to the mail location, set the owner, let Dovecot index it, then connect over IMAP.
How to import Maildir files to Outlook
Outlook can’t open a Maildir on its own, so you reach it one of two ways.
Two routes into Outlook
- Over IMAP. Once the Maildir is on an IMAP server, add that account in Outlook over IMAP, let it sync, and the mail appears. Drag it into another mailbox if you’re consolidating.
- To a PST. A converter reads the Maildir and writes a PST you import into Outlook, or sends the mail straight to a Microsoft 365 account. Handy when there’s no server to serve it from.
- Mail only. A Maildir holds messages, not contacts, so address books don’t travel either way. Move contacts separately.
For a few mailboxes the IMAP route is clean and free. For a desktop move with no server, or a bulk job, the converter below is simpler.
When does a Maildir converter help?
The free routes fit an admin with shell access. A converter earns its place when you can’t reach the server shell, when the target is Outlook or Microsoft 365, or when a point-and-click bulk move beats the command line.
PCDOTS MailDir Converter reads a Maildir folder on Windows and exports it to an IMAP account, a PST, MBOX or Office 365 in bulk, keeping the folder tree and attachments. Follow these four steps.
- Install and open the converter, then add your Maildir folder.
- Preview the folders and messages it reads.
- Select IMAP or PST as the output, with the attachment option on.
- For IMAP, enter the target server and login, then convert and check the result.
The converter route, a Maildir folder to an IMAP account or a PST in one batch.
Related reading, our guides to convert Maildir emails to MBOX and migrate Kerio to Office 365. Leaving another server? See migrate Zimbra emails to Gmail.
Shell access makes the Dovecot route free, without it a converter sends the Maildir to IMAP or a PST.
Which method should you use?
Use the Dovecot route for a server you control, doveadm import to merge and a converter for no shell or an Outlook target.
| Method | Best for | Good to know |
|---|---|---|
| Serve on Dovecot | A server you control | Free, copy in, fix owner, index |
| doveadm import | Merging into live mail | Free, keeps the existing mailbox |
| MailDir Converter | No shell, or Outlook | Windows, to IMAP, PST or Office 365 |
Not sure which row is you? Match your setup to the route below.
Match your setup to the route, your own box copies in, a live mailbox merges, a hosted IMAP syncs up, Outlook takes IMAP or a PST.
Key takeaways
- Import Maildir to an IMAP server by copying it into the mail location so Dovecot serves it.
- To merge into a mailbox that already has mail, use the doveadm import command.
- Outlook can’t open Maildir, so serve it on IMAP and connect Outlook, or convert to a PST.
- No shell access or a bulk job to Outlook or Office 365? A converter does it on Windows.
Frequently asked questions
How do I import Maildir to an IMAP server?
Copy the Maildir into the user’s mail location on the server, set the owner to the mail account, and Dovecot serves it over IMAP on the next login. There’s no separate import for a Maildir that’s in place.
What does the doveadm import command do?
It merges a source Maildir into a mailbox that already has mail, without overwriting. A typical form is doveadm import -u [email protected] maildir:/path/to/source/Maildir ” all.
How do I import Maildir files to Outlook?
Outlook can’t open a Maildir directly. Serve the Maildir on an IMAP server and connect Outlook over IMAP, or convert the Maildir to a PST and import that into Outlook.
What is the Maildir format?
A folder-based mailbox where every email is a separate file, with new, cur and tmp subfolders. Dovecot, Courier, qmail and many Postfix setups use it.
Do my contacts come across?
No. A Maildir holds mail only, not contacts, so an address book doesn’t travel with it. Move contacts separately through the old client or server.
Can I import a Maildir without server shell access?
Yes. A converter reads the Maildir folder on Windows and sends it to an IMAP account, a PST or Office 365, so you don’t need a login on the server.
So how are you importing your Maildir mail?
Importing Maildir to an IMAP server is free when you manage the server, because a Maildir is already a folder of message files. Copy it into the mail location for Dovecot to serve, or merge it with doveadm import. For Outlook, serve it on IMAP or convert it to a PST, since Outlook won’t read a Maildir. So how are you importing your Maildir mail, the Dovecot route, or a converter for an Outlook move?