[Note: all strings in the program (since it was written in
Pascal) are of the PascalString type, with the first byte of the
field representing the length.  For example, where we have a
PascalString (65) below, the first byte is the string's length,
and the remaining 64 are the string itself.]


File: MSGIDX.DAT

Description: 

The message index.  Each message in the database is represented
by a record in this file.  This file is loaded into memory when
BlackMail is loaded, and updated regularly.  As new messages are
composed, they are written to the index immediately, and the
entire index is updated every ten minutes (approximately) to
reflect changes in archival options and deletions.  The file is
also saved when the program ends.

Record length: 512 bytes

Field          Type/Length(bytes)  Description

Locked         Boolean (1)         Intended for future use
BBSID          ULong (4)           BBS (see below) message from  
Conference         "               Conference# message is in
MsgNum             "               Message number of message
Folder             "               Folder (see below) msg in
To             PascalString (65)   Message's addressee
From                  "            Message's author
Subject               "            Message's subject
Tagline               "            Message tagline (internal)
MsgID                 "            Reserved for future use
Attributes     Word (2)            Message attributes bitmap:
                                        Bit  Description
                                         0   Message is private
                                         1   Message in folder
                                         2   Message in chronicle
                                         3   Message deleted
                                         4   Msg has been read
                                         5   Msg in archive
                                         6   Msg is outgoing
                                         7   Used internally
                                        8-15 Reserved
ArchiveAction  Word (2)            Message's archive action
                                        1 = Delete
                                        2 = Keep
                                        3 = Reserved for future
                                        4 = Expire
MsgDate        LongInt (4)         Msg Date (in Dos PackTime fmt)
RcvDate            "               Date msg received (PackTime)
ReplyDate          "               Date msg replied to(PackTime)
ExpireDate         "               Date msg expires (PackTime)        
KeepDays       ULong (4)           Reserved
Lines          ULong (4)           Length of message in lines
Length         ULong (4)           Length of message in bytes
Offset         ULong (4)           Offset to start of text in
                                        MSGTXT.DAT file
RevRef         ULong (4)           Reserved for future use
FwdRef         (100)               Reserved for future use
ReplyConf      ULong (4)           Reserved for future use
ReplyBBS       ULong (4)           Reserved for future use
Reserved       (18)                Reserved for expansion


File: MSGTXT.DAT

Description:

This file holds the actual text of all messages.  Each message
has a thirteen byte header (used for verification purposes,
mainly) as follows:

Length         ULong (4)           Message length in bytes
Conference     ULong (4)           Message conference
MsgNum         ULong (4)           Message number
Compress       Byte (1)            Compression type (reserved)

The text follows as null-terminated strings.


File: *.BBS

Description:

This file holds the conference definitions for each BBS.  For
example, the definitions for CONNECT are in CONNECT.BBS.  If you
are using SOUP packets for Usenet, those definitions are in
USENET.BBS.

Record Length: 256 Bytes

ConfNum        ULong (4)           Conference number
ConfName       PascalString (65)   Conference name
IsMail         Boolean (1)         E-Mail/Netmail conference
IsInternet     Boolean (1)         Is it an Internet conference?
DefArchAct     Byte (1)            Default archive action
SigFile        PascalString (64)   Signature file for conference
AltTag         PascalString (64)   Alternate tag file (reserved)
Unused         (50)                Reserved for expansion


File: BBSCFG.DAT

Description:

This file holds definitions of individual BBS's.  Each BBS is
assigned a unique identifier number when the first packet is
imported from it.  When assigning the "Number" for a new BBS,
please find the highest number currently in use, and add 1 to it.

Record Length: 512 bytes

Number         ULong (4)           Unique ID
PacketType     PascalString (9)    Packet type (QWK, SOUP, etc.)
ID             PascalString (9)    BBS Identifier (in filenames)
UserName       PascalString (65)   User name
SysOpName      PascalString (65)   SysOp name
ControlName    PascalString (65)   Name to send add/drop
                                        requests to (QWK only)
AddCmd         PascalString (26)   Command to use in add requests
DropCmd        PascalString (26)   Command to use in drop req.
ResetCmd       PascalString (26)   Command to use in reset req.
DefArchAct     ULong (4)           Default archive action
ArchiverType   PascalString (4)    Archiver to use for this BBS
Incrementer    ULong (4)           Usable in creating MsgIDs
BinaryReplies  Boolean (1)         SOUP replies in Binary format
Autoquote      Boolean (1)         Automatically quote in replies
Unused         (195)               Reserved for expansion


File: FOLDERS.BM

Description:

Descriptions of each folder.  Note that, as with BBS's, every
folder is assigned a unique identifier.  If your add-ons sort,
add, or delete folders, please make sure they have unique numbers
by adding 1 to the highest number currently in use.  ALSO note
that if you change the number of any folder, you will have to go
through the index and change the number on any messages in that
folder.

Record Length: 69 bytes

Name           PascalString (65)   Folder description
Num            ULong (4)           Folder identifier


File: CONFIG.BM

Description:

The main configuration for the program.

Record Length: 1280 bytes

InPath         PascalString (65)   Incoming packet path
OutPath        PascalString (65)   Reply packet path
SoupPath       PascalString (65)   Path for SOUP packets
TagCmd         PascalString (65)   External tagline commandline
ExtEditCmd     PascalString (65)   External editor commandline
FKCmd          Array of 10         Function key commandlines
                  PasStrings (650)      (F2-F11)
HeaderPath     PascalString (33)   Path for .HDR files
TaglinePath    PascalString (32)   Name of tagline file
ReplyFName     PascalString (17)   Reply filename for externals
OrigFName      PascalString (17)   Original fname for externals
InetBBS        ULong (4)           Reserved
InetConf       ULong (4)           Reserved
EmailSoup      Boolean (1)         Reserved
EmailAddress   PascalString (31)   E-Mail address to use in
                                        internet replies
EmailConf      ULong (4)           Conf. for internet replies
EmailBBS       ULong (4)           BBS for internet replies
Browser        PascalString (65)   Web browser commandline
SpellChecker   PascalString (65)   Spell checker commandline
Unused         (28)                Reserved for expansion


File: FONTS.BM

Description:

A file of four font definitions.  The records in the file are, in
order, the fonts for reading, replying, listing (not yet
implemented) and printing messages.

Record Length: 93 bytes

Name           PascalString (33)   Name of font
Pitch          ULong (4)           Pitch
Attrs          FAttrs (56)         OS/2 Font attribute type


File: TAGLINES.BM

Description:

Tagline file.  All taglines are in PascalString format, 65 bytes
per record.

Record length: 65 bytes


File: FILTERS.BM

Description:

Filter list.  This is a normal text file.  Filters are defined by
the type of filter (From, Subject, or Text) and the text to be
searched for.  For example, to filter all mail from me, the line
in the file would be "from Pab Sungenis"

Record length: Variable (CR/LF deliniated)


File: ADDRBOOK.BM

Description:

The address book.  Each person is represented by a record.

Record Length: 138 bytes

Name           PascalString (65)   Name of recipient
Address        PascalString (65)   Recipient's E-Mail address
BBS            ULong (4)           BBS to post messages to
Conf           ULong (4)           Conference to post messages to


File: ARCHIVER.BM

Description:

A text file with the definitions used for archiver programs.  All
lines are CR/LF terminated and of variable length.

Record length: 5 lines (CR/LF deliniated)

Extender       Three-character extender for archives
Offset         Offset into file (bytes) to look for signature
Signature      Identifying string in archive.  Hex codes can be
                    used in the format \x##
ExtractCmd     Commandline to extract files from archive
AddCmd         Commandline to add files to an archive
