files on disk but not in index?

Brian J. Murrell brian at interlinx.bc.ca
Wed May 6 08:32:42 EDT 2020


On Wed, 2020-05-06 at 07:18 -0400, Ken Murchison wrote:
> You can use 'mbexamine' and 'unexpunge -l'

mbexamine looks interesting, but unexpunge -l returns nothing for my
INBOX.  I think this is because expunge is immediate in 2.4.17 isn't
it?

mbexamine's output is pretty terse though.  Given this line from it's
output:

000001> UID:00089183   INT_DATE:994114862 SENTDATE:994089600
SIZE:1537  

is that "00089183" the name of a message file on the disk, minus the
trailing dot?  It seems to be from a brief examination.

But just as a first pass sanity check:

# /usr/lib/cyrus-imapd/mbexamine user.brian | grep \>\ UID: | wc -l
317075
# ls /var/spool/imap/b/user/brian/ | wc -l
10362

Which is the opposite of what I was expecting and neither matches what
my IMAP clients (2 different evolution instances) says about the number
of messages, which is ~4K.  mutt also says there are only ~4K messages:

[Msgs:3999 New:40 Old:2769 Del:34 Flag:54 Post:43 108M]

How can 3 IMAP clients only see ~4K messages yet there be 10K on the
disk?

> I you think you have orphaned (not expunged) message files, you can
> try 
> 'reconstruct -G' on the mailbox to restore them into the index.

And so then "reconstruct -n -G" should report any orphan files?

All I get for it is:

user.brian uid 696911 mismatch: sentdate
user.brian uid 696911 mismatch: gmtime
user.brian uid 697146 mismatch: sentdate
user.brian uid 697146 mismatch: gmtime
user.brian uid 697917 mismatch: sentdate
user.brian uid 697917 mismatch: gmtime
user.brian

So I created an orpan intentionally to see what reconstruct -G does:

# pushd /var/spool/imap/b/user/brian/
# ls -l 1.
ls: cannot access 1.: No such file or directory
# cp -a 1609386. 1.
# ls -l 1.
-rw-------. 1 cyrus mail 1187 Apr 14 20:57 1.
# /usr/lib/cyrus-imapd/reconstruct -n -G user.brian
...
user.brian uid 1 rediscovered - appending
user.brian

So that reconstruct -G seems to be doing what I am looking for, but
it's also telling me there are no orphans.

So while I have no orphans, I do have significant discrepancies between
the number of files on disk and the number of messages imapd is
reporting that are in a mailbox.

Any idea how to reconcile that?

Cheers,
b.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.andrew.cmu.edu/pipermail/info-cyrus/attachments/20200506/d7210cbe/attachment.sig>


More information about the Info-cyrus mailing list