Gionatan Danti
2020-May-11 13:45 UTC
Deleting messages from filesystem with sdbox mail format
Dear list, I recently had to delete some messages from an sdbox mailbox, for which I used the canonical "doveadm expunge" command without issues. However I got curious and, on a test mailbox, I deleted an unimportant message directly from the filesystem (rm u.650). After removing the file, the webmail continued to show it in the mail list - but no text was retrieved when I selected it. I supposed this was due to dovecot.index.cache and, indeed, deleting the cache got rid of the message in the webmail list. While I understand that it is not recommended (deleting and regenerating the index cache is an expensive operation), I wonder if removing a file from the filesystem, and regenerating the index cache file, is a safe operation when using an sdbox mailstore. Specifically, I would like to know if, after a manual filesystem deletion, the main index file (dovecot.index) is automatically updated by dovecot (reflecting the deletion) or if lingering references are kept in it. Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it [1] email: g.danti at assyoma.it - info at assyoma.it GPG public key ID: FF5F32A8
> On 11/05/2020 16:45 Gionatan Danti <g.danti at assyoma.it> wrote: > > > Dear list, > I recently had to delete some messages from an sdbox mailbox, for which > I used the canonical "doveadm expunge" command without issues. > > However I got curious and, on a test mailbox, I deleted an unimportant > message directly from the filesystem (rm u.650). After removing the > file, the webmail continued to show it in the mail list - but no text > was retrieved when I selected it. I supposed this was due to > dovecot.index.cache and, indeed, deleting the cache got rid of the > message in the webmail list. > > While I understand that it is not recommended (deleting and regenerating > the index cache is an expensive operation), I wonder if removing a file > from the filesystem, and regenerating the index cache file, is a safe > operation when using an sdbox mailstore. Specifically, I would like to > know if, after a manual filesystem deletion, the main index file > (dovecot.index) is automatically updated by dovecot (reflecting the > deletion) or if lingering references are kept in it. > > Thanks. > > -- > Danti GionatanIf you manually change the mailbox contents like that, you need to run doveadm force-resync to fix the situation. Aki
Gionatan Danti
2020-May-11 14:37 UTC
Deleting messages from filesystem with sdbox mail format
Il 2020-05-11 15:54 Aki Tuomi ha scritto:> If you manually change the mailbox contents like that, you need to run > doveadm force-resync to fix the situation. > > AkiOk, so it means that dovecot will *not* automatically fix the index file and I need to reconstruct the index file, right? Just for completeness: will not fixing the index file (after a manual deletion) cause unexpected issues, or "only" lingering reference to a delete email? Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it [1] email: g.danti at assyoma.it - info at assyoma.it GPG public key ID: FF5F32A8
Seemingly Similar Threads
- [EXT] Re: Deleting messages from filesystem with sdbox mail format
- Deleting messages from filesystem with sdbox mail format
- Per-protocol ssl_protocols settings
- Questions about hardlinks, alternate storage and compression
- Cache auth credentials on Samba domain member