0

I hope someone can help me.

What I need is to load dovecot backup files on windows, and save all of them as *.eml, so that I can dig through all mails it contains.

How do I go about this? My web hoster can't help me they say, they say they can only restore a full site backup and that is out of the question.

Edit:

These are the files I have

C:.
├───Maildir
│   │   subscriptions
│   │
│   └───.INBOX.spam
│       └───new
├───mdbox
│   │   dovecot.mailbox.log
│   │   dovecot.mailbox.log.2
│   │   subscriptions
│   │
│   ├───mailboxes
│   │   ├───Concepts
│   │   │   └───dbox-Mails
│   │   │           dovecot.index.cache
│   │   │           dovecot.index.log
│   │   │
│   │   ├───INBOX
│   │   │   ├───dbox-Mails
│   │   │   │       dovecot.index
│   │   │   │       dovecot.index.backup
│   │   │   │       dovecot.index.cache
│   │   │   │       dovecot.index.log
│   │   │   │
│   │   │   ├───Drafts
│   │   │   │   └───dbox-Mails
│   │   │   │           dovecot.index.log
│   │   │   │
│   │   │   ├───Sent
│   │   │   │   └───dbox-Mails
│   │   │   │           dovecot.index.log
│   │   │   │
│   │   │   ├───spam
│   │   │   │   └───dbox-Mails
│   │   │   │           dovecot.index.log
│   │   │   │
│   │   │   └───Trash
│   │   │       └───dbox-Mails
│   │   │               dovecot.index.log
│   │   │
│   │   ├───Junk
│   │   │   └───dbox-Mails
│   │   │           dovecot.index.log
│   │   │
│   │   ├───Trash
│   │   │   └───dbox-Mails
│   │   │           dovecot.index.cache
│   │   │           dovecot.index.log
│   │   │
│   │   └───Sent
│   │       └───dbox-Mails
│   │               dovecot.index
│   │               dovecot.index.cache
│   │               dovecot.index.log
│   │
│   └───storage
│           dovecot.map.index
│           dovecot.map.index.log
│           m.100
│           m.102
│           m.103
│           m.16
│           m.21
│           m.26
│           m.27
│           m.29
│           m.35
│           m.37
│           m.4
│           m.43
│           m.44
│           m.49
│           m.56
│           m.59
│           m.62
│           m.66
│           m.67
│           m.68
│           m.70
│           m.72
│           m.94
│           m.95
│           m.99
│
└───sieve
    └───tmp
Diana
  • 101
  • 2
  • 1
    AFAIK simply giving the email messages stored in a dovecot Maildir directory the `.elm` extension should achieve that. – Bob Jan 12 '21 at 21:46
  • I don't have separate files. I have dovecot.index – Diana Jan 13 '21 at 07:53
  • The dovecot.index is not a (full) backup of your email messages , and contains only some meta data such as imap message UID’s and message status which is useless for your purpose – Bob Jan 13 '21 at 08:32
  • Thank you for your reply. I am digging through the .tar.gz file, I have added info to the question – Diana Jan 17 '21 at 15:31
  • 1
    Your update suggest the following format : https://wiki2.dovecot.org/MailboxFormat/dbox rather than Maildir where each ma message is its own unique file. Maybe you can use dsync to convert to Maildir to achieve your goal – Bob Jan 17 '21 at 20:58

1 Answers1

1

Files in the Maildir sudirectories are the same as *.eml files. Just rename them, adding an extension. Yes, their base names usually look ugly, but the contents is just what you need.

That's not specific to Dovecot, but a feature of Maildir which originally was invented for qmail. For details see its specification.

Nikita Kipriyanov
  • 10,947
  • 2
  • 24
  • 45
  • I don't have separate files, I have dovecot.index – Diana Jan 13 '21 at 07:52
  • 1
    That is not a data storage. Index helps to work with data faster, it can store some data https://wiki.dovecot.org/IndexFiles (as a cache or in order to index it, of course, some useful e-mail headers for example), but generally speaking it is not designed to recover data from it. If all you have is just index file, your data are gone. Sorry. – Nikita Kipriyanov Jan 13 '21 at 09:24
  • Thank you for your reply. I am digging through the .tar.gz file, I have added info to the question – Diana Jan 17 '21 at 15:31