If k messages are in the archive, messages k-1 and k-2 are missing
from both indices. A new post bubbles the missing messages up one.
I would guess that mhonarc is failing to write the .mhonarc.db file
when you are adding messages. You did not state how mhonarc is being
invoked, but a warning message should be generated if mhonarc is unable
to write the db. You may want to check the timestamp and permissions
on .mhonarc.db to see if things look okay. The timestamp should be the
same time as the newest written files in the archive.
To supplement Earl's suggestion about timestamps, the code suggests that
there should be a definite order of timestamps on messages, indices, and
1. messages are written to disk.
2. then two indices are written to disk.
3. then .mhonarc.db is written to disk. (step omitted if only regenerating
indexes with no new messages)
I'd interpret this as follows:
a. If some message files are newer than the indices, then the index writing
b. If an index file is newer than .mhonarc.db, then .mhonarc.db writing
Further, since the messages and indices are based on .mhonarc.db's data as
updated in memory, the first failure to write .mhonarc.db will have its
effect on the next launch of mhonarc.