Re: (1) dumping twoskip file and (2) getting folder UIDs
Jay Sekora <[email protected]> Tue, 30 Jun 2026 13:51:42 -0400
| Newsgroups | gmane.mail.imap.cyrus |
|---|---|
| Message-ID | <[email protected]> |
Hi and thank you! On Tue, Jun 30, 2026 at 11:09:02AM -0400, Bron Gondwana via Info wrote: > You can use either cyr_dbtool or cvt_cyrusdb to get the text version - > cyr_dbtool is much more powerful. This got me part of the way there; I was able to convert mailboxes.db and the users .seen file to plain text. Interestingly, mailboxes.db has uniqueids for *MANY* of the mailboxes, but not for the specific one I'm looking for (which was the user's INBOX). I was able to get the uniqueid for the relevant INBOX from the cyrus.header file, but that uniqueid does not show up in the user's *.seen file (either the original twoskip file or after converting to flat format). This was bo= th on the user's .seen file for her current inbox, which I know she's read recently, and also on a restored copy from before her accidental deletion/marking-read. For reference, here's the (only matching) line in /tmp/mailboxes.flat converted from mailboxes.db: user.REDACTED %(A %(REDACTED lrswipkxtecdan cyrus lrswipkxtecda) P facult= y F 124565 M 1748834865) (although my copypasting doesn't preserve tabs.) And the same sort of thing shows up for my own INBOX: user.jsekora %(A %(jsekora lrswipcda cyrus lrswipkxtecda) P staff M 1741= 542865) although there *are* other mailboxes that have uniqueids listed in=20 mailboxes.db (in a separate section at the front, which doesn't list anything for my own INBOX or the user's in question): [...] $RUNQ$ngb736k4jbddz7wreeovkcyt$user.OTHERUSER=20=20=20 [...] user.OTHERUSER %(A %(OTHERUSER lrswipkxtecdan) I ngb736k4jbddz7wreeovkcyt = P staff V 1777900694 C 1 F 2 M 1782827859) I'm guessing the distinction here is the age of the mailbox; many of our mailboxes were migrated (via `imapsync`) from our previous IMAP server about a year and a half ago; the few I've spot-checked that *do* have uniqueids are ones that were created more recently. In any case the weirder problem seems to be that the flat file I get from this users' twoskip .seen file doesn't seem to have any reference either to the name (user.$USERNAME) or uniqueid (f13e2zfxso7s3trbkkz4ddqv) of her old inbox. I'm really puzzled by this! She uses Thunderbird to read her mail. I'll ask her how she marks things as seen and whether she has any Thunderbird extensions installed. I'm looking for her seen/unseen state in /var/lib/cyrus/user/U/USERNAME.see= n, and for her INBOX's uniqueid in /var/lib/cyrus/mailboxes.db (where it doesn= 't show up although other users' do) as well as in cyrus.header in the mailbox store (where it does show up). Is there someplace else I'm missing? Jay > HOWEVER - in either case, you're looking at mailbox uniqueids in the > .seen folder. So you're going to need to find those our. With new > enough Cyrus, they will be in the mailboxes.db file. With older cyrus, > you're going to have to read them from the cyrus.header files in each > mailbox. 3.4.3 might be late enough to have put the uniqueids into the > mailboxes.db, I don't remember! Of course - you can also use cyr_dbtool > or cvt_cyrusdb to read the contents of mailboxes.db. > NOTE: work on copies of the files, not the original. Thanks! Jay ------------------------------------------ Cyrus: Info Permalink: https://cyrus.topicbox.com/groups/info/T643419685ae5113c-Me593cd= e58637d031ed5ba72d Delivery options: https://cyrus.topicbox.com/groups/info/subscription