Skip to content

Instantly share code, notes, and snippets.

@density215
Created July 19, 2012 19:28
Show Gist options
  • Save density215/3146202 to your computer and use it in GitHub Desktop.
Save density215/3146202 to your computer and use it in GitHub Desktop.
Cyrus skiplist corruption repair

We have also seen skiplist corruption in seen databases. I don't have a recovery tool, but I have been able to manually recover seen db's to the point of corruption so that at least most of the users mails are in the correct 'read' state. Typically, you will see errors like:

DBERROR: skiplist recovery /usr/local/imap/user/k/kdelaney.seen: 0D2C should be ADD or DELETE

If you truncate the file at this point, it should fix the problem, and the users mail read state will be valid upto the point of corruption. To do this, convert the hex to decimal (above would be 1372) and use the dd command:

dd if=kdelaney.seen of=kdelaney.seen.fixed bs=1 count=1372

replace the corrupted .seen file with the fixed one and have user log in and should be ok.

Seems to work on the couple I have tried it on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment