doc/record-format.txt
changeset 0 6f7a81934006
equal deleted inserted replaced
-1:000000000000 0:6f7a81934006
       
     1 Record Format
       
     2 -------------
       
     3 
       
     4 Syntax notes:
       
     5 - ( P )* means "zero or more of the P"
       
     6 - ( P )+ means "one or more of the P"
       
     7 - { P } means "zero or one of the P"
       
     8   (ie P is optional and may be omitted)
       
     9 
       
    10 New version 2 records have the following format:
       
    11 	0x02
       
    12 	( flag-number flag-value )* NUL
       
    13 	password-crypt NUL
       
    14 	{ mailbox } NUL
       
    15 	( alias NUL )* NUL
       
    16 	personal-information NUL
       
    17 	hard-quota NUL
       
    18 	soft-quota NUL
       
    19 	message-size-limit NUL
       
    20 	message-count-limit NUL
       
    21 	creation-time NUL
       
    22 	expiry-time NUL
       
    23 
       
    24 flag-number and flag-value are single-byte values.  The flag numbers are
       
    25 the same as the attribute number defined in vdomain/vdomain.h.
       
    26 
       
    27 The maximum values for limits (quota, etc.) are expressed in the file as
       
    28 "-" and internally as UINT_MAX.  Records with an unknown creation time
       
    29 have the creation-time set to the UNIX epoch (midnight GMT January 1,
       
    30 1970).
       
    31 
       
    32 Old Record Formats
       
    33 ------------------
       
    34 
       
    35 Version 1 records have the following format:
       
    36 	0x01
       
    37 	password-crypt NUL
       
    38 	{ mailbox } NUL
       
    39 	( alias NUL )* NUL
       
    40 	personal-information NUL
       
    41 	hard-quota NUL
       
    42 	soft-quota NUL
       
    43 	message-size-limit NUL
       
    44 	message-count-limit NUL
       
    45 	creation-time NUL
       
    46 	expiry-time NUL
       
    47 
       
    48 Old style records had the following format:
       
    49 	":" password-crypt ":" destination
       
    50 The destination was prefixed with '&' for a forward, and with either '.'
       
    51 or '/' for a mailbox.
       
    52 
       
    53 Proposed Record Format
       
    54 ----------------------
       
    55 
       
    56 New version 3 records have the following format:
       
    57 	0x03
       
    58 	( flag-number flag-value )* NUL
       
    59 	password-crypt NUL
       
    60 	{ mailbox } NUL
       
    61 	( alias NUL )* NUL
       
    62 	personal-information NUL
       
    63 	hard-quota NUL
       
    64 	soft-quota NUL
       
    65 	message-size-limit NUL
       
    66 	message-count-limit NUL
       
    67 	creation-time NUL
       
    68 	expiry-time NUL
       
    69 	last-modified-time NUL
       
    70 
       
    71 flag-number and flag-value are single-byte values.  The flag numbers are
       
    72 the same as the attribute number defined in vdomain/vdomain.h.  The flag
       
    73 value is either ASCII '0' for false/off or ASCII '1' for true/on.
       
    74