Storing a message

(Appendix 7)

A message can be generated by a User or by a BBS forwarding connection.
The recording mechanism is always the same.

Command :
S(x) [to] @ [bbs] < [exped] $ [ident + filename]

Only to field is mandatory.

Appending a filename is a action reserved for the Sysop. The filename must be complete, including logic unit and complete path (\FBB\SYSTEM\TEST.TXT).

Upon receiving the command line, the first test is a check for specified route, or if the message must be automatically routed.

The User is then prompted for the title of the message.
If the title is a missing, the message is canceled and the user returns to the main menu.

The User is then prompted for the text of the message.

The software checks for possible preamble lines. These lines show how the previous BBSs having routed this message. They begin with R: in first column. The BBS call is given behind the @ character within the preamble line. All adjacent BBS mentioned in this preamble will be included in the "already forwarded" list, and will not be concerned by this message. This list specific to each message can be displayed with the $ or FN command followed by the message number.

Upon receiving a /EX in first column, or a Ctrl Z, a message number is then assigned, The BID (or MID if private) and the list of adjacent BBS concerned by this message are created. All these information are sent to the user when acknowledging the message.

If the connection is disconnected before the /EX or Ctrl Z are receifed the entire message will be lost, and texts already stored are deleted.

All header of the message (sender, recipient, route, MID, title, etc...) is stored in the DIRMES.SYS file. The text of the message is stored in a sub-directory of the MAIL directory. The sub-directory is MAILn where n is the last digit of the message number. The name of the file corresponds to the message number 123 is M_000123.MES, the number is 6 digits wide, in this case it is in the sub-directory MAIL3.

The message number uses a long integer (32 bits), the number boundary is very large (more than 4 billions!).