BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Migrating hundreds of mbox files to an IMAP server?



On Sun, 1 Jun 2025 22:36:06 +0000
"dbarrett at blazemonger.com" wrote:

> What's the best way to import 600 mbox files to an IMAP server?

The most consistent and reliable, albeit slow, method is to connect
your email client to both servers/backends and copy messages. You might
need to chunk up the copies depending on how much mail you're trying to
queue up.

A faster but more complex method is to reprocess mbox files with
formail (a procmail tool) to redeliver to the target server, something
like

cat mail.mbox | formail -s /usr/sbin/sendmail me at fastmail.com

-s tells formail to split the mbox file into individual messages. I'm
sure there are ways to use IMAP instead of SMTP here.

You may be able to convert the mbox files to proper Maildir directories
and use a sync tool with those. I've never tried this so I don't know
the steps.


"admin at bclug.ca" wrote
> Side note, Thunderbird supports MailDir storage locally (each message
> is its own file instead of each folder being a large file with many
> messages).

It's not actually Maildir. It's more like MH with a Maildir-like
directory structure.

-- 
\m/ (--) \m/