This file briefly describes the QWK file format.
The following is an abbreviated version of Appendix G of DELUXE.DOC:
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
All of the messages in a mail packet are contained in a file
named MESSAGES.DAT. The file's logical record length is 128
bytes. The first record of MESSAGES.DAT always contains
Sparkware's copyright notice produced by The Qmail Door.
Messages start in record #2 and use this format:
Starting Position,Length Description
------------------------ ----------------------------
1,1 Message status flag
2,7 Message number
9,8 Date (MM-DD-YY)
17,5 Time (HH:MM)
22,25 To
47,25 From
72,25 Subject
97,12 Password
109,8 Message reference number
117,6 Number of blocks
123,1 Message status
124,2 Conference number
The text of message continues in the next record. You can
find out how many blocks make up one message by looking at
the value of "Number of blocks". Message text is delimited
by a pi symbol (ASCII 227) between lines.
The xxx.NDX files contain record numbers that point into the
MESSAGES.DAT file for actual messages. Each conference that
contains messages has its own "xxx.NDX" file. The "xxx" is
the conference number for the index file.
Each .NDX file uses a five byte logical record length and is
formatted to:
Starting Position,Length Description
------------------------ ------------------------
1,4 Record number of message
in MKS$ format.
5,1 Conference number.
DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
The formula for converting x, a LONGINT in MKS$ format, to MKSToNum, a
binary integer, is:
MKSToNum := 1)