Retrieving mail from read-only mdbox

Peter Benko pbopbo at freemail.hu
Fri Jun 2 00:27:47 EEST 2017


>This is a 'has anyone run into this and solved it' post. And yes, I've been
>reading and re-reading TFM but without luck. The background is that I'm
>working on tooling before we start a mass maildir->mdbox conversion. One of
>those tools is recovering mail from backups (easy as pie with maildir).
>
>We've got all of our email on Netapp file servers. They have nice
>snapshotting but the snapshots are, of course, readonly.
>
>My question: is there a doveadm command that will allow for email to be
>retrieved from a readonly mdbox, either directly (like manipulating the
>mdbox files directly) or by doveadm talking to the dovecot processes?
>
>Ideally, there'd be something like doveadm dump, but that could dump
>selected message contents.
>
>I've tried using IMAP with mail_location pointed at the snapshot, but,
>though I can get a listing of emails in the mailbox, the fetch fails when
>dovecot can't write-lock dovecot.index.log.
>
>If anyone has gotten something similar to work, I'd love to hear about it.
>A working IMAP setup would be the ideal, since it's more easily automatible
>(but I'll take whatever I can get).
>
>Any and all hints are most welcome!

Hi Mark,

I had exactly the same problem as you. I also tried to put the INDEX to a writeable fs (also to MEMORY) but it did not work. What I did in the end is that I created a writeable version of my read-only snapshot using AuFS. This way I was able to access the snapshot over IMAP and destroy the AuFS mount when finished.

It's not a perfect solution, but it works :)

Regards,

Peter



More information about the dovecot mailing list