"Lost" e-mail after alternate partition offline

Timo Sirainen tss at iki.fi
Wed Apr 6 22:39:16 UTC 2016

On 01 Apr 2016, at 21:15, Daniel van Ham Colchete <daniel.colchete at gmail.com> wrote:
> Hey guys!
> I've got a problem here and I wish you could help me. A drive failed here
> and went offline for some time. This was a alternate storage drive so it
> took a while (hours) for us to notice. There was a problem with DRBD also,
> so it didn't move to the redundancy, it just went offline.

It's a good idea to keep the alt storage mountpoint directory's permissions so that Dovecot doesn't have read permissions to it unless it's mounted. That way Dovecot would just start logging errors instead of thinking that the alt storage mails are lost.

> I was able to recover all the files there, but a few of my users still
> don't see their old e-mails, the ones that are supposed to be on the
> alternate storage.
> From what I could troubleshoot here file are there, vmail user can access
> them, so it's not a permission issue, but a doveadm dump on the index file
> of each mail folder, won't show the e-mail at the alternate storage drive.
> So, they are there (at the filesystem), but they aren't (from a imap
> client).
> Is there a way to rebuild the dovecot.index file, re-adding everything back
> to each folder?

There aren't any easy ways to fix it except doveadm fore-resync.

More information about the dovecot mailing list