maddy
maddy copied to clipboard
Implement maddyctl imap-fsck
For performance purposes, go-imap-sql implements some operations in a way that does not use SQL engine capability to detect and fix inconsistency errors. Such go-imap-sql bugs can make storage unusable. There is a need for utility that will do its best to make it usable again.
- Remove non-existent messages from the index
- Remove dangling messages (or optionally add them to the "lost+found" account so they can be inspected)
- Reassign UIDs for affected mailboxes (and change UIDVALIDITY)
- Update message counters
- Rebuild cached headers from actual messages