[Imap-uw] Mailbox files validity check

Mark Crispin MRC at CAC.Washington.EDU
Fri Oct 12 17:07:09 PDT 2007


It helps, when reading the following, to refer to the mix driver 
documentation in docs/mixfmt.txt.

The data file names are .mix########, where ######### is a hex digit value 
reflecting the UNIX date/time (seconds since 1970-1-1 00:00:00 UTC) when 
the data file was started.

The mix driver code assumes that this value has leading zeros, although 
this would normally only impact files created before 1978-7-4 23:24:15 
UTC.  Although mixrbld will see other names (such as .mix123456), the mix 
driver will assume that file number 123456 is .mix00123456 and thus not 
find the data file for that file number.

mixrbld assumes that UIDs are assigned ascending in both the individual 
data files and in the overall data files.  Otherwise you'll get that "data 
file ran backwards" message.  It does the right thing anyway, although if 
this happens it does a very inefficient linear scan through the linked 
list to find the right place rather than simply appending to the tail of 
the list in the normal case.  Or, at least it tries to do the right thing; 
the code looks right but I have never tested it since it won't happen 
except in artificial circumstances.

I still don't understand why you needed to rename the files, and what 
originally happened to cause all this.

On Fri, 12 Oct 2007, Unric David wrote:

> Yes Mark, some files were renamed. I did checked and already fixed all 
> files have 8 digits after .mix in their names. So what is the rule for 
> proper mail filenames so I can fix it with another perl hacking ?

Thanks in an advance.

David

>---------------------------------------------------------
>Od: Mark Crispin
>Přijato: 12.10.2007 3:47:54
>Předmět: Re: [Imap-uw] Mailbox files validity check
>
>Something else is going on that you haven't explained.  You mentioned an 
>
>error message:
>
> 	Data file Resurrect/.mix01245185 UID ran backwards (286e < 29a7)
>
>
>
>How did you get a data file named .mix01245185?  Presumably, you didn't 
>
>take a time machine back to August 10, 1970 at 17:29:41 UTC. ;-)
>
>
>
>Did you do something to restore the files under different names?
>
>
>
>If you did, are you aware that mix data files must have precisely 8 hex 
>
>digits in their name?  mixrbld would probably get confused by a data file 
>
>named .mix322 and pass on that confusion in the rebuilt index to the mix 
>
>driver.
>
>
>
>Without seeing the mailbox, I have difficulty in advising you since I 
>
>don't quite understand what is wrong with it (much less how it got that 
>
>way).
>
>
>
>Can you explain what happened to this mailbox, and what steps that you 
>
>took?
>
>
>
>-- Mark --
>
>
>
>http://staff.washington.edu/mrc
>
>Science does not emerge from voting, party politics, or public debate.
>
>Si vis pacem, para bellum.
>
>
>
>
>
>
>
>
> ------------------------------------------
>
> http://mail.atlas.cz/wapmail/

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.


More information about the Imap-uw mailing list