0

My domain host, along with its IMAP server and all my email, recently failed. I have an up-to-date backup of the filesystem, including my mail directory and all its files such as "mail\.@Followup\cur\1360900564.M116310P14891.example.com,S=9818,W=10032%3A2,S".

Is there a way for me to import mail directly from a loose file system into an IMAP server?

All of the tools I can find, such as imapsync and offlineimap and imap_tools, work by copying mail from an active IMAP server to a different IMAP server. But my original IMAP server is dead and beyond resurrection. All I have is the filesystem backup.

2 Answers2

2

The files you have are in maildir format, which is supported by lots of tools. But assuming you are setting up a new imap server you can just drop the files from the backup on the new server in the correct directory and the new imap server will probably just pick them up. At least dovecot does, but most other imap servers which store their mail in maildir format will probably do the same. If you are using the different imap server software this might cause you to lose some metadata, such as which mails are unread, flagged, etc but your mail will all be there.

Alternatively you can import the directory into a local mail client, such as thunderbird or kmail, set up the new imap account and copy the mail from the local folders to the imap folders.

AVee
  • 131
1

For automated solution, you can try some script/tools written for that job.

  • IMAP Tools from . It's a set of Perl programs for use with IMAP servers. One of the feature is maildir to imap script.
  • Isync . It is a command line application which synchronizes mailboxes; currently Maildir and IMAP4 mailboxes are supported.
masegaloeh
  • 18,376
  • 10
  • 58
  • 110