home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / OFFLINE / QWKINFO.ZIP / QWKINFO2.TXT < prev    next >
Text File  |  1991-09-10  |  22KB  |  552 lines

  1. ===========================================================================
  2.  BBS: Channel 8250
  3. Date: 09-06-91 (18:56)             Number: 1236
  4. From: PATRICK GROTE                Refer#: NONE
  5.   To: PATRICK ROBERTS               Recvd: NO  
  6. Subj: .qwk format           1/6      Conf: (28) SHAREWARE
  7. ---------------------------------------------------------------------------
  8. PR>Thanks Pat
  9.  
  10. Here it is....
  11.  
  12.  
  13.  
  14.           DOOR.ID
  15.  
  16.           Many maildoors now produce (and readers use) a file called
  17.           Door.Id that was developed by Greg Hewgill.  It is intended
  18.           to give the reader information on the capabilities of the
  19.           door that produced the packet (and presumably will process
  20.           the *.REP produced).  It is a straight text file with the
  21.           following format.  Each line is in the format ControlWord
  22.           space equals space value.
  23.  
  24.  
  25.           DOOR = <doorname>
  26.                This is the name of the door that created the QWK
  27.                packet, eg.  <doorname> = Tomcat.
  28.  
  29.           VERSION = <doorversion>
  30.                This is the version number of the door that created
  31.                the packet,  eg. <doorversion> = 2.9.
  32.  
  33.           SYSTEM = <systemtype>
  34.                This is the underlying BBS system type and version,
  35.                eg. <systemtype> = Wildcat 2.55.
  36.  
  37.           CONTROLNAME = <controlname>
  38.                This is the name to which the reader should send
  39.                control messages, eg. <controlname> = TOMCAT.
  40.  
  41.           CONTROLTYPE = <controltype>
  42.                This can be one of ADD, DROP, or REQUEST (or others).
  43.                ADD and DROP are pretty obvious (they work as in
  44.                Markmail), and REQUEST is for use with BBS systems
  45.                that support file attachments.  Try out SLMR with
  46.                CONTROLTYPE = REQUEST and use the Q function.
  47.  
  48.           RECEIPT
  49.                This flag indicates that the door/BBS is capable of
  50.                return receipts when a message is received.  If the
  51.                first three letters of the subject are RRR, then the
  52.                door should strip the RRR and set the 'return-receipt-
  53.                requested' flag on the corresponding message.
  54.  
  55.  
  56.               Format of the exported messages in Messages.Dat
  57.  
  58.  
  59.          This file contains records with a length of 128 bytes.  There
  60.          are 3 types of these records: (1) Packet Header, (2) Message
  61.          Header, and (3) Message Text.  All unused fields in the
  62.          records are normally filled with spaces, although you will
  63.          sometimes find the final Message text record will be filled
  64.          with nulls (#0) after the last text.
  65.  
  66.  
  67.                               Packet Header
  68.  
  69.          Packet Header - is always the first record in the file and
  70.          only occurs once.  It contains only normal ascii text
  71.          (limitted to at most 128 characters) and should always
  72.          start with "Produced by ".  The remaining text normally
  73.          includes a product name and copyright message.
  74.  
  75.  
  76.                               Message Header
  77.  
  78.          A message header immediately preceeds zero or more message
  79.          text records.  Each Message header has the following
  80.          format:
  81.  
  82.          Start
  83.           Pos  Length              Description
  84.         ------ ------ -----------------------------------------
  85.            1      1   Message status flag (see below)
  86.            2      7   Message number (ascii left justified)
  87.            9      8   Date (MM-DD-YY)
  88.           17      5   Time (HH:MM)
  89.           22     25   To (left justified space filled - uppercase)
  90.                       (Be sure to check the to field to spot
  91.                       configuration type messages)
  92.           47     25   From (left justified space filled - uppercase)
  93.           72     25   Subject (left justified space filled - uppercase)
  94.                       (a subject starting "NE:" should not be
  95.                       echoed into a network)
  96.           97     12   Password (not really used leave blank)
  97.          109      8   Message reference number (ascii left justified)
  98.          117      6   Number of blocks (ascii left justified - number
  99.                       of 128 byte blocks including 1 for the message
  100.                       header)
  101.          123      1   Message active (ß or #225 = Active,
  102.                       Γ or #226 = Inactive)
  103. >>> Continued to next message
  104. ---
  105.  * SLMR 2.0 #984 * TV - Chewing gum for the eyes.
  106. ===========================================================================
  107.  BBS: Channel 8250
  108. Date: 09-06-91 (18:56)             Number: 1237
  109. From: PATRICK GROTE                Refer#: NONE
  110.   To: PATRICK ROBERTS               Recvd: NO  
  111. Subj: .qwk format           2/6      Conf: (28) SHAREWARE
  112. ---------------------------------------------------------------------------
  113. >>> Continued from previous message
  114.          124      2   Conference number (Binary Word) (Lo in 124, Hi
  115.                       in 125).  Note that some older programs only
  116.                       supported conferences 0 thru 255 and left byte
  117.                       125 as a "blank" unused field.  I recommend
  118.                       checking the word value and if it is over 8191
  119.                       to only use the lower (0 thru 255) part of it.
  120.                       I've also seen notes that this field is really
  121.                       a 4 byte LongInt field, although with the above
  122.                       limitation (and 8000 conference seeming sufficient
  123.                       for a while), I documented it this way.
  124.  
  125.          128      1   Indicates whether the message has a Network
  126.                       tagline or not.  A value of "*" indicates that
  127.                       a network tagline is present, a value of " "
  128.                       indicates there isn't.  Messages sent to readers
  129.                       (non-net-status) generally leave this as always
  130.                       blank since only net utils need this info.
  131.  
  132.          Message Status Flag has the following possibilities:
  133.  
  134.          '`'  Comment to sysop, read      '~'  Comment to sysop, unread
  135.          '-'  Public, read                ' '  Public, unread
  136.          '*'  Private, read               '+'  Private, unread
  137.          '^'  Password protected, read    '%'  Password protected, unread
  138.          '#'  Group password, read        '!'  Group password, unread
  139.          '$'  Group password to all
  140.  
  141.  
  142.                              Message Text Records
  143.  
  144.          The message text records immediately follow the the message
  145.          header.  They contain straight ascii text (lines are
  146.          normally limitted to 72 chars/line although you may see
  147.          longer lines).  Each line is followed by a "
  148. " or #227
  149.          character to mark the end of the line (in place of the normal
  150.          CR/LF that would exist in a straight text file).  The text
  151.          continues consecutavly and text lines do continue across
  152.          block boundaries.  Some systems or readers may have problems
  153.          with messages longer than 99 lines or 199 lines, although more
  154.          recently this no longer seems to be a limit.  The last block
  155.          should be padded with blanks to fill the block, although on
  156.          input you may find it padded with nulls (#0).
  157.  
  158.  
  159.                  New (04/91) format for configuration messages
  160.  
  161.         To: QMAIL (or whatever)
  162.         Subject: CONFIG
  163.  
  164.         Text has one command per line with the following options:
  165.  
  166.         ADD <conf>                  adds a conference
  167.         DROP <conf>                 drops a conference
  168.         RESET <conf> <value>        resets message pointer to value or
  169.                                     can use HIGH-xxx
  170.         CITY <string>               changes bbs user city
  171.         PASSWORD <string>           changes bbs user password
  172.         BPHONE <string>             changes bbs user business/data phone
  173.         HPHONE <string>             changes bbs user home/voice phone
  174.         PCBEXPERT [ON|OFF]          turns bbs user expert mode on or off
  175.         PCBPROT <char>              sets bbs user protocol to char (A thru Z)
  176.         PCBCOMMENT <string>         sets bbs user comment
  177.         PAGELEN <value>             sets bbs use pagelength
  178.         PROTOCOL <char>             sets QWK door protocol to char (A thru Z)
  179.         EXPERT [ON|OFF]             sets QWK door expert mode on or off
  180.         MAXSIZE <value>             sets maximum QWK size in bytes
  181.         MAXNUMBER <value>           sets maximum msgs per conference
  182.         AUTOSTART                   QWK door autostart
  183.  
  184.  
  185.  
  186.  
  187.                            Format of Index files
  188.  
  189.       Index files are named XXX.NDX (where XXX is the conference
  190.       number padded with leading zeros to make it three characters
  191.       long.  There is one *.NDX file for each conference chosen that
  192.       contains messages in the MESSAGES.DAT file.
  193.  
  194.       The *.NDX file contain records five characters long that point
  195.       to each message in that conference.
  196.  
  197.  
  198.       NdxRecord = Record
  199.         MsgPointer: BasicReal
  200.         Conference: Byte;
  201.         End;
  202.  
  203.       The BasicReal is a four byte number in BASIC MKS$ format.
  204.  
  205.  
  206.       The following is a sample program unit for TurboPascal that
  207.       converts between BasicReal format and LongInt format.
  208. >>> Continued to next message
  209. ---
  210.  * SLMR 2.0 #984 * TV - Chewing gum for the eyes.
  211. ===========================================================================
  212.  BBS: Channel 8250
  213. Date: 09-06-91 (18:56)             Number: 1238
  214. From: PATRICK GROTE                Refer#: NONE
  215.   To: PATRICK ROBERTS               Recvd: NO  
  216. Subj: .qwk format           3/6      Conf: (28) SHAREWARE
  217. ---------------------------------------------------------------------------
  218. >>> Continued from previous message
  219. ------------------------------------------------------------------------------
  220.  
  221. Unit BasicConvert;
  222.  
  223. Interface
  224.   Function BasicReal2Long(InValue: LongInt): LongInt;
  225.                 {Convert Basic Short Reals to LongInts}
  226.  
  227.   Function Long2BasicReal(InValue: LongInt): LongInt;
  228.                 {Convert LongInts to Basic Short Reals}
  229.  
  230. Implementation
  231.  
  232. Function BasicReal2Long(InValue: LongInt): LongInt;
  233.  
  234.   Var
  235.   Temp: LongInt;
  236.   Negative: Boolean;
  237.   Expon: Integer;
  238.  
  239.   Begin
  240.     If InValue And $00800000 <> 0 Then
  241.       Negative := True
  242.     Else
  243.       Negative := False;
  244.     Expon := InValue shr 24;
  245.     Expon := Expon and $ff;
  246.     Temp := InValue and $007FFFFF;
  247.     Temp := Temp or $00800000;
  248.     Expon := Expon - 152;
  249.     If Expon < 0 Then Temp := Temp shr Abs(Expon)
  250.       Else Temp := Temp shl Expon;
  251.     If Negative Then
  252.       BasicReal2Long := -Temp
  253.     Else
  254.       BasicReal2Long := Temp;
  255.     If Expon = 0 Then
  256.       BasicReal2Long := 0;
  257.   End;
  258.  
  259.  
  260. Function Long2BasicReal(InValue: LongInt): LongInt;
  261.   Var
  262.   Negative: Boolean;
  263.   Expon: LongInt;
  264.  
  265.   Begin
  266.   If InValue = 0 Then
  267.     Long2BasicReal := 0
  268.   Else
  269.     Begin
  270.     If InValue < 0 Then
  271.       Begin
  272.       Negative := True;
  273.       InValue := Abs(InValue);
  274.       End
  275.     Else
  276.       Negative := False;
  277.     Expon := 152;
  278.     If InValue < $007FFFFF Then
  279.       While ((InValue and $00800000) = 0) Do
  280.         Begin
  281.         InValue := InValue shl 1;
  282.         Dec(Expon);
  283.         End
  284.     Else
  285.       While ((InValue And $FF000000) <> 0) Do
  286.         Begin
  287.         InValue := InValue shr 1;
  288.         Inc(Expon);
  289.         End;
  290.     InValue := InValue And $007FFFFF;
  291.     If Negative Then
  292.       InValue := InValue Or $00800000;
  293.     Long2BasicReal := InValue + (Expon shl 24);
  294.     End;
  295.   End;
  296.  
  297. End.
  298.  
  299. ------------------------------------------------------------------------------
  300.  
  301. A quick and dirty conversion (handles positive numbers only) is possible
  302. with the following expression:
  303.  
  304. MKSToNum := ((x AND NOT $ff000000) OR $00800000)
  305.              SHR (24 - ((x SHR 24) AND $7f));
  306.  
  307. ------------------------------------------------------------------------------
  308.  
  309.       The number contained in the MsgPointer is the record number
  310.       (128 byte records - starting numbering from record 1 not 0)
  311.       of the message header.  Note that since the 1st record contains
  312.       packet header, the lowest MsgPointer that can exist is 2.
  313. >>> Continued to next message
  314. ---
  315.  * SLMR 2.0 #984 * TV - Chewing gum for the eyes.
  316. ===========================================================================
  317.  BBS: Channel 8250
  318. Date: 09-06-91 (18:56)             Number: 1239
  319. From: PATRICK GROTE                Refer#: NONE
  320.   To: PATRICK ROBERTS               Recvd: NO  
  321. Subj: .qwk format           4/6      Conf: (28) SHAREWARE
  322. ---------------------------------------------------------------------------
  323. >>> Continued from previous message
  324.       Some message readers will reformat the *.NDX files so that the
  325.       MsgPointer becomes a LongInt fileseek position (using a record
  326.       size of 1).  To determine which type of index you are reading
  327.       you should look at the size of the number.  Any BasicReal will
  328.       appear as a huge number that would unlikely ever be a byte
  329.       seek positon.
  330.  
  331.  
  332.  
  333.                      Old style configuration commands
  334.  
  335.       To: QMAIL (or whatever)
  336.  
  337.       Subject contains one of the following commands:
  338.  
  339.       ADD                   Add current conference
  340.       ADD -20               Add current conference and set lastread pointer
  341.                             20 below the end
  342.       ADD 9876              Add current conference and set lastread pointer
  343.                             to message number 9876
  344.       DROP                  Drop current conference
  345.       RESET                 Reset current conference lastread pointer to
  346.                             the end
  347.       RESET -20             Reset current conference lastread pointer to
  348.                             20 below the end
  349.       RESET 9876            Reset current conference lastread pointer to
  350.                             message number 9876
  351.       BLTS ON               Turn bulletins on
  352.       BLTS OFF              Turn bulletins off
  353.       FILES ON              Turn new files list on
  354.       FILES OFF             Turn new files list off
  355.       WELCOME ON            Turn welcome screen on
  356.       WELCOME OFF           Turn welcome screen off
  357.       GOODBYE ON            Turn goodbye screen on
  358.       GOODBYE OFF           Turn goodbye screen off
  359.  
  360.       If the subject is CONFIG, see the new format in COMMAND.TXT
  361.       for an explanation.
  362.  
  363.  
  364.                         Format of Control.Dat file
  365.  
  366.       Control.Dat is a normal CR/LF style text file with the
  367.       following lines in exactly the order shown.
  368.  
  369. BBS name
  370. BBS City, BBS State
  371. BBS phone number                     {AAA-EEE-NNNN}
  372. Sysop name,Sysop                     {Sysop name in upper case followed
  373.                                       by the literal ',Sysop'}
  374. Serial number ,BBS ID                {Serial Number, UpperCase BBSID}
  375. Date of mail packet, time of packet  {MM-DD-YYYY,HH:MM:SS}
  376. Caller's name                        {Uppercase}
  377. blank
  378. 0
  379. 0
  380. Number of conferences (in additon to conference 0 which is main)
  381.                       (ie use number of conferences minus one)
  382. Conference number
  383. Name of Conference    (should be limited to maximum length of 12 characters)
  384. ...
  385. ...
  386. ...
  387. ...
  388. ...
  389. Conference number
  390. Name of Conference
  391. name of BBS welcome file
  392. name of NEWS file
  393. name of BBS goodbye file
  394.  
  395. Other optional data may occur after the Goodbye file line, but the
  396. trend is to omit this data.  If included it is as follows:
  397.  
  398. 0                                    {Unknown}
  399. Screen Length
  400. USER NAME                            {Upper case}
  401. FirstName                            {Proper case}
  402. CITY, ST                             {Upper case}
  403. Data Phone                           {AAA EEE-NNNN}
  404. Voice Phone                          {AAA EEE-NNNN}
  405. Security Level
  406. Expiration Date                      {MM-DD-YY}
  407. Last On Date                         {MM-DD-YY}
  408. Last On Time                         {HH:MM}
  409. Number of calls
  410. 0                                    {Unknown}
  411. DownLoaded Bytes
  412. DownLoaded Count
  413. Uploaded Bytes
  414. Uploaded Count
  415. Time Limit Per Day                   {Minutes}
  416. Time Remaining                       {Minutes}
  417. Time Used Today                      {Minutes}
  418. DownLoad Limit/Day                   {Kilobytes}
  419. DownLoad Bytes Remaining Today       {Bytes}
  420. >>> Continued to next message
  421. ===========================================================================
  422.  BBS: Channel 8250
  423. Date: 09-06-91 (18:56)             Number: 1240
  424. From: PATRICK GROTE                Refer#: NONE
  425.   To: PATRICK ROBERTS               Recvd: NO  
  426. Subj: .qwk format           5/6      Conf: (28) SHAREWARE
  427. ---------------------------------------------------------------------------
  428. >>> Continued from previous message
  429. DownLoaded Today                     {Bytes}
  430. Current Time                         {HH:MM}
  431. Current Date                         {MM-DD-YY}
  432. System Tag Line
  433.  
  434.  
  435.                         QWK mail format information
  436.  
  437.                  By Mark May - Mythical Kingdom Software
  438.  
  439.         While writing a QWK utility, I found that there was no
  440.         one place where all the necessary info on the QWK format
  441.         was available.  Thru messages in several network echo
  442.         conferences (Thanks to Tim Farley, Mark Goodwin, Randy
  443.         Blackmond, Mark Herring, Patrick Lee, Greg Hewgill, and
  444.         others), I gradually collected the information enclosed
  445.         in this archive.
  446.  
  447.         To save others the time collecting this information, I've
  448.         put together this set of files by editing the information
  449.         from the various sources so that it is conveniently
  450.         available.
  451.  
  452.         Tim Farley is working on a more rigorous specification and
  453.         I'm sure all of us would appreciate any help you can give
  454.         him in this.   If you find any errors or additional
  455.         information, I'd also appreciate hearing about it so that
  456.         I can further update this set of files.
  457.  
  458.         You may contact me at:
  459.  
  460.         Fido - 1:110/290
  461.         RIME - ->MYTHKING
  462.         Normal Bbs 513-237-7737 (at 9600 HST/V32)
  463.  
  464.         You may also contact me in the P/Net (programmers network)
  465.         Bbs/Utils developers conference.
  466.  
  467.  
  468.         Changes:
  469.  
  470.         v1.1 08/17/91 Added information on Door.Id
  471.                       Added info on conferences above 255
  472.                       Added info on message has tagline field
  473.                       Corrected info on message status values
  474.  
  475.         v1.0 05/28/91 Initial release
  476.  
  477.  
  478.  
  479.                  Format of the BBSID.REP file for replies
  480.  
  481.  
  482.       The record format of the BBSID.MSG file in the BBSID.REP file
  483.       is exactly identical to the MESSAGES.DAT format except the
  484.       packet header which now is filled with blanks except that it
  485.       contains the BBSID as the first few characters.
  486.  
  487.  
  488.       On the Message Headers there is also one change.  The ascii
  489.       field which normally contains the message number is now filled
  490.       (in ascii) with the conference number of the message.  Note
  491.       that some readers which place the conference number here,
  492.       neglect to fill in the normal Message Header conference
  493.       number field.
  494.  
  495.  
  496.                    Filenames used by the *.QWK format
  497.  
  498.         BBSID.QWK is an archive containing the files from the
  499.         message door being sent to the caller.
  500.  
  501.             MESSAGES.DAT - a file containing the messages themselves
  502.                in 128 byte records.
  503.  
  504.             CONTROL.DAT - a file with info on the system, caller, and
  505.                conference names and numbers.
  506.  
  507.             999.NDX - one file for each selected conference that
  508.                contains pointers to the messages in MESSAGES.DAT
  509.                There are usually several *.NDX files in each
  510.                QWK file.  (Right justified, padded with leading
  511.                zeros to make the 3 characters).
  512.  
  513.             NEWFILES.DAT - an optional file that contains a list
  514.                of new files from the Bbs.
  515.  
  516.             BLT-0.99 - optional files containing ascii or ansi
  517.                bulletins.  The 99 extension is replaced by the
  518.                bulletin number (Left justified not padded).
  519. >>> Continued to next message
  520. ---
  521.  * SLMR 2.0 #984 * TV - Chewing gum for the eyes.
  522.  ■ U'NI-net/US: Travel Online ■ Lake St. Louis ■ MO ■ (314) 625-4045 v.32
  523. ===========================================================================
  524.  BBS: Channel 8250
  525. Date: 09-06-91 (18:56)             Number: 1241
  526. From: PATRICK GROTE                Refer#: NONE
  527.   To: PATRICK ROBERTS               Recvd: NO  
  528. Subj: .qwk format           6/6      Conf: (28) SHAREWARE
  529. ---------------------------------------------------------------------------
  530. >>> Continued from previous message
  531.             DOOR.ID - an optional text file that contains info
  532.                on the capabilities of the door that produced the
  533.                QWK packet (so that the reader will only send
  534.                control messages that can be handled).
  535.  
  536.             SESSION.TXT - an optional ascii/ansi file containing
  537.                info on the activity occuring in the mail door.
  538.  
  539.             Optionally it may also contain ascii or ansi screens for
  540.             Welcome, News, and Goodbye as named in the CONTROL.DAT
  541.             file.
  542.  
  543.         BBSID.REP is an archive containing a single file of the
  544.         messages sent from the caller to the Bbs.
  545.  
  546.             BBSID.MSG - a file containing the messages themselves
  547.                in 128 byte records.  The format is similar to
  548.                MESSAGES.DAT.
  549. ---
  550.  * SLMR 2.0 #984 * TV - Chewing gum for the eyes.
  551.  ■ U'NI-net/US: Travel Online ■ Lake St. Louis ■ MO ■ (314) 625-4045 v.32
  552.