For those of you who might be interested, I managed to solve the “Invalid or nonexistent document” error.It appeared when i tried to run a compact -a on the mailfile to archive documents that were “marked as expired”.
After running a compact -d on the mailfile, the archiving worked fine again.
Any chance this mailfile is part of a (former) shared mail environment ? If so, there might be an old, invalid “pointer” to the object store. Try unlinking, compacting (copy style) and fixup…
Unfortunately running refreshing indexes did not help. I have also tried trunning fixup and updall on the database but that did not do the trick either…