TIFILESæ€WPæĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘSĘS0 QWK Mail Packet File Layout+ by Patrick Y. Lee JFile Converted on 12/1/93 by Beery Miller to TI Display Variable 80 format(and released on the GEnie TI RoundTable. Version 1.6 - December 19, 1992˙? Added off-line commands for QSO (door for TBBS), thanks to@ message from Bob Hartman in the FidoNet Off-line echo. All> 8-bit characters have been replaced with either blanks or˙C equivalent 7-bit characters so I can send this file easily via@ Internet email. Line 9 of the CONTROL.DAT file seems to be< used by a few doors to indicate the NetMail conference.Version 1.5 - July 30, 1992˙C Added off-line commands for Cam-Mail door. Fixed error in the? status flag section. The descriptions for `*' and `+' are= incorrect. Thanks to Bob Blaylock for bringing this up.Version 1.4 - July 18, 1992˙? Fixed a few minor mistakes in the documentation (thanks to= Cody Gibson). Nothing really major. Also completed the* Netmail section of the documentation.Version 1.3 - July 6, 1992˙A Added changes to the QWK format adopted by Qmail door. Spe-? cifically line 10 of CONTROL.DAT file and bytes 126-127 of@ MESSAGES.DAT file. Please refer to the appropriate section for the changes.Version 1.2 - May 31, 1992˙B Added a few items to the DOOR.ID file that is being supported# by Qmail DeLuxe2 version 1.25.Version 1.1 - March 15, 1992> Minor fixes here and there to make everything just right.Version 1.0 - February 23, 1992 First release. ˙2This document is Copyright 1992 by Patrick Y. Lee. .The QWK-format is Copyright 1987 by Sparkware. AAll program names mentioned in this document are either Copyright"or Trademark of respective owners. ˙AThe author provides this file as-is without warranty of any kind,Ceither expressed or implied. You are using the information in thisAfile at your own discretion. The author assumes no responsibili-˙Cties for damages, either physically or financially, from the use ofthis information. CThis document may be freely distributed by any means (electronical-Cly, paper, etc.), provided that it is distributed in its entirety. ˙;Portions of this document may be reproduced without credit. CThe latest version of this file can always be found on Aardvark BBSB(New York, NY) at (212) 496-8324. It can also be found in the Lu-˙Anatic Fringe BBS (Plano, TX) at (214) 422-2936 USR HST DS. FirstCtime caller can download on both boards. The file can also be sent7via Internet email to anyone who asks. Mail request topatlee@panix.com. ˙0 -=-=-=-=-=-=-<>-=-=-=-=-=-=- + Table of Contents 1. Introduction 1.1. Intent 1.2. History& 1.3. Questions, corrections, etc.2. Conventions & overview 2.1. The BBS ID˙ 2.2. Packet compression% 2.3. Packet transfer & protocols 2.4. Limitations 3. QWK files 3.1. Naming convention$ 3.2. Control file (CONTROL.DAT) 3.3. Welcome file 3.4. Goodbye file 3.5. News file˙! 3.6. Qmail DeLuxe2 menu file, 3.7. New uploads listing (NEWFILES.DAT)$ 3.8. Bulletin file(s) (BLT-x.y)% 3.9. Message file (MESSAGES.DAT) 3.10. Index files (*.NDX)# 3.10.1. Conference indices˙. 3.10.2. Personal index (PERSONAL.NDX) 3.11. Pointer file 3.12. SESSION.TXT 4. REP files 4.1. Naming convention" 4.2. Message file (BBSID.MSG) 4.3. Door control messages 4.3.1. DOOR.ID file 4.3.2. Qmail˙ 4.3.3. MarkMail 4.3.4. KMail 4.3.5. RoseMail 4.3.6. Complete Mail Door 4.3.7. The MainMail System 4.3.8. BGQWK 4.3.9. UltraBBS 4.3.10. TriMail 4.3.11. Cam-Mail 4.3.12. QSO˙# 4.4. Turning off the echo flag 4.5. Tag-lines 5. Net mailA. Credits & contributions"B. Sample Turbo Pascal and C codeC. Sample messageD. Sample index file 0 -=-=-=-=-=-=-<>-=-=-=-=-=-=- ˙BTo search for a specific section, look for "[x.x]" using your edi-@tor or viewer. For example, to jump to the tag-lines portion of>this file, search for "[4.5]" with your editor or text viewer. 0 -=-=-=-=-=-=-<>-=-=-=-=-=-=- ˙[1] Introduction [1.1] Intent DThis document is written to facilitate programmers who want to writeDQWK-format mail doors or readers. It is intended to be a comprehen-Asive reference covering all areas of QWK-format mail processing. ˙CDetailed break down of each file is included, as are implementationFinformation. In addition, door and reader specific information may be4included, when such information are available to me. [1.2] History ˙EThe QWK-format was invented by Mark "Sparky" Herring in 1987. It wasEbased on Clark Development Corporation's PCBoard version 12.0 messageEbase format. Off-line mail reading has become popular only in recent˙Dyears. Prior to summer of 1990, there were only two QWK-format off-Fline mail reader programs. They were Qmail DeLuxe by Mark Herring andEEZ-Reader by Eric Cockrell. Similarly for the doors, there were only˙Dtwo -- Qmail by Mark Herring and MarkMail by Mark Turner. They wereboth for PCBoard systems. EA lot has changed in both off-line reader and mail door markets sinceDsummer 1990. Now, there are more than a dozen off-line mail readers˙Afor the PC. Readers for the Macintosh, Amiga, and Atari exist asDwell. There are over a half dozen doors for PCBoard, and QWK-formatCdoors exist for virtually all of the popular BBS softwares. All of˙Ethese happened in less than two years! More readers and doors are inEdevelopment as I write this, keep up the excellent work. In additionCto doors, some BBS softwares has QWK-format mail facility built in. ˙EOff-line mail reading is an integral part of BBS calling. ConferenceDtraffic and selection on all networks have grown dramatically in re-Fcent years that on-line reading is a thing of the past. Off-line mail˙Breading offers an alternative to reading mail on-line -- It offers8speed that cannot be achieved with on-line mail reading. EThe reason why QWK-format readers and doors seem to have gained popu-˙Flarity is probably dued to its openness. The format is readily avail-Fable to any programmer who wishes to write a program that utilize it. BProprietary is a thing of the past, it does not work! Openness is,here to stay and QWK-format is a part of it.˙ #[1.3] Questions, corrections, etc. DMost of the message networks today have a conference/echo devoted toFdiscussion of off-line readers and mail doors. The ones I know are onEFidoNet, ILink, Intelec, and RIME. If you have questions after read-˙Fing anything in here, feel free to drop by any of the above conference7/echo and I am sure other QWK authors will try to help. I can be reached at: &CompuServe: >INTERNET:patlee@panix.comFidoNet: Off-line echoILink: Off-line conference˙Intelec: Off-line conferenceInternet: patlee@panix.comPlanoNet: Reviews conferenceERIME: ->RUNNINGB, Off-line, Common, Net Admin., Shareware, New Users,and Session Manager conferences ˙DAny corrections, extensions, comments, and criticisms are welcomed. EMessages from Internet and RIME will probably be answered first. But9I do check mail on all other places at least once a week. [2] Conventions & overview ˙DAll offsets referenced in this document will be relative to 1. I am2not a computer, I start counting at one, not zero! EWords which are enclosed in quotes should be entered as-is. The quo-0tations are not part of the string unless noted. ˙EYou may have noticed I use the phrase "mail program" or "mail facili-Dty" instead of mail doors. This is because some BBS softwares offerCthe option of creating QWK-format mail packets right from the BBS. ˙7With those, there is no need for an external mail door. [2.1] The BBS ID FThe BBS ID (denoted as BBSID) is a 1-8 characters word that identifiesDa particular BBS. This identifier should be obtained from line 5 of˙)the CONTROL.DAT file (see section 3.2.1). [2.2] Packet compression AMost mail packets are compressed when created by the mail door inCorder to save download time and disk space. However, many off-line˙Dreader programs allow the user to unarchive a mail packet outside ofFthe reader program, so the reader will not have to unarchive it. UponDexit, the reader will not call the archiver to save it. It is up to˙Ethe user to archive the replies. This is useful if the user has lim-Fited memory and cannot shell out to DOS to run the unarchive program. AFor readers based on non-PC equipment, the user may be using less˙Fcommon compression program that does not have command line equivalent. "[2.3] Packet transfer & protocols FThere is no set rule on what transfer protocol should be used. Howev-Cer, it would be nice for the mail program on the BBS to provide the˙DSysop with options as to what to offer. This should be a configura-tion option for the user. #[2.4] Specifications & limitations BThere aren't many known limits in the QWK specification. However,˙Fvarious networks seem to impose artificial limits. On many of the PC-?based networks, 99-lines appears to be the upper limit for someDsoftwares. However, most of the readers can handle more than that. ˙AReader authors reading this may want to offer the option to splitEreplies into n lines each (the actual length should be user definableEso when the network software permits, the user can increase this num-ber). [3] QWK files ˙[3.1] Naming convention CGenerally, the name of the mail packet is BBSID.QWK. However, thisDdoes not have to be the case. When the user downloads more than oneEmail packet at one time, either the mail program or the transfer pro-˙Ctocol program will rename the second and subsequent mail packets toAother names. They will either change the file extension or add aBnumber to the end of the filename. In either case, you should not˙Brely on the name of the QWK file as the BBSID. The BBSID, as men-Gtioned before, should be obtained from line 5 of the CONTROL.DAT file. CIn addition, mail packets do not have to end with QWK extension ei-˙Cther. The user may choose to name them with other file extensions. ![3.2] Control file (CONTROL.DAT) EThe CONTROL.DAT file is a simple ASCII file. Each line is terminatedCwith a carriage return and line feed combination. All lines should˙start on the first column. Line #& 1 My BBS BBS name0 2 New York, NY BBS city and state. 3 212-555-1212 BBS phone number, 4 John Doe, Sysop BBS Sysop name˙= 5 20052,MYBBS Mail door registration #, BBSID7 6 01-01-1991,23:59:59 Mail packet creation time4 7 JANE DOE User name (upper case)C 8 Name of menu for Qmail, blank if none˙E 9 0 ? Seem to be always zero. A few doors,A such as DCQWK for TAG is using thisD field to indicate the conference where˙B Fido NetMail should be placed. ThisB gives the reader program the ability2 easily send NetMail.@10 999 Total number of messages in packet˙@11 121 Total number of conference minus 1.12 0 1st conf. numberD13 Main Board 1st conf. name (13 characters or less).14 1 2nd conf. number˙,15 General 2nd conf. nameB.. 3 etc. onward until it hits max. conf./.. 123 Last conf. number-.. Amiga_I Last conf. name˙1.. HELLO Welcome screen file+.. NEWS BBS news file,.. SCRIPT0 Log off screen CSome mail doors, such as MarkMail, will send additional informationabout the user from here on. ˙0 ?B25 Number of lines that follow this one4JANE DOE User name in uppercase;Jane User first name in mixed case˙3NEW YORK, NY User city information4718 555-1212 User data phone number4718 555-1212 User home phone number,108 Security level-00-00-00 Expiration date˙.01-01-91 Last log on date.23:59 Last log on time*999 Log on countB0 Current conference number on the BBS10 Total KB downloaded˙,999 Download count/0 Total KB uploaded*999 Upload count-999 Minutes per day5999 Minutes remaining today˙4999 Minutes used this call632767 Max. download KB per day032767 Remaining KB today10 KB downloaded today˙123:59 Current time on BBS101-01-91 Current date on BBS2My BBS BBS network tag-line0 ? DSome mail doors will offer the option of sending an abbreviated con-˙Dference list. That means the list will contain only conferences theAuser has selected. This is done because some mail readers cannotEhandle more than n conferences at this time. Users using those read-˙Ders will need this option if the BBS they call have too many confer-ences. [3.3] Welcome file EThis file usually contains the log on screen from the BBS. The exactCfilename is specified in the CONTROL.DAT file, after the conference˙Elist. This file may be in any format the Sysop chooses it be -- usu-Bally either in plain ASCII or with ANSI screen control code. SomeFSysops (notably PCBoard Sysops) may use BBS-specific color change code˙Fin this file as well. Current mail programs seem to handle the trans-Elations between BBS-specific code to ANSI based screen control codes. CEven if the CONTROL.DAT file contains the filename of this file, it˙Amay not actually exist in the mail packet. Sometimes, users willEmanually delete this file before entering the mail reader. Some off-Fline readers offer the option to not display this welcome screen; some˙Ewill display this file regardless. Some doors, similarly, will offer)option to the user to not send this file. [3.4] Goodbye file FSimilar to the welcome file above, the filename to the goodbye file is˙Din the CONTROL.DAT file. This is the file the BBS displays when theFuser logs off the board. It is optional, as always, to send this fileor to display it. [3.5] News file EMany mail doors offer the option to send the news file from the BBS. ˙DMost will only send this when it has been updated. Like the welcomeEand goodbye files, the filename to the news file is found in the CON-FTROL.DAT file. It can be in any format the Sysop chooses, but usually˙Fin either ASCII or ANSI. Like the welcome screen, current mail facil-Fities seem to handle translation between BBS-specific control codes toANSI screen control codes. [3.6] Qmail DeLuxe2 menu file ˙EThis file is of use only for Qmail DeLuxe2 mail reader by Sparkware. 8The filename is found on line 8 of the CONTROL.DAT file. )[3.7] New uploads listing (NEWFILES.DAT) EMost mail programs on the BBS will offer the option to scan new files˙9uploaded to the BBS. The result is found in a file namedDNEWFILES.DAT. The mail program, if implementing this, should updateBthe last file scan field in the user's profile, if there is such a˙Bfield, as well as other information required by the BBS. The mailFprogram should, of course, scan new files only in those areas the useris allowed access. [3.8] Bulletin files (BLT-x.y) ˙EMost mail programs will also offer the option to include updated bul-Cletin files found on the BBS in the mail packet. The bulletins areEnamed BLT-x.y, where x is the conference/echo the bulletin came from,˙Band y the bulletin's actual number. The mail program will have toEtake care of updating the last read date on the bulletins in the userrecord. "[3.9] Message file (MESSAGES.DAT) FThe MESSAGES.DAT file is the most important. This is where all of the˙Cmessages are contained in. The QWK file format is based on PCBoardE12.0 message base format from Clark Development Corporation (maker ofPCBoard BBS software). DThe file has a logical record length of 128-bytes. The first record˙Eof MESSAGES.DAT always contain a copyright notice saying "Produced byDQmail...Copyright (c) 1987 by Sparkware. All Rights Reserved". TheFrest of the record is space filled. Actual messages consist of a 128-˙Fbytes header, plus one or more 128-bytes block with the message text. DActual messages start in record 2. The header block is layed out asfollows: Offset Length DescriptionG------ ------ ---------------------------------------------------- ˙8 1 1 Message status flag (unsigned character)$ ' ' = public, unread" '-' = public, readB '*' = private, read by someone but not by intended recipient˙9 '+' = private, read by official recipient. '~' = comment to Sysop, unread, '`' = comment to Sysop, read7 '%' = sender password protected, unread˙5 '^' = sender password protected, read6 '!' = group password protected, unread4 '#' = group password protected, read5 '$' = group password protected to all˙) 2 7 Message number (in ASCII)) 9 8 Date (mm-dd-yy, in ASCII). 17 5 Time (24 hour hh:mm, in ASCII). 22 25 To (uppercase, left justified)0 47 25 From (uppercase, left justified)˙/ 72 25 Subject of message (mixed case)' 97 12 Password (space filled)3 109 8 Reference message number (in ASCII)D 117 6 Number of 128-bytes blocks in message (including the˙F header, in ASCII; the lowest value should be 2, headerC plus one block message; this number may not be left) flushed within the field)B 123 1 Flag (ASCII 225 means message is active; ASCII 226˙3 means this message is to be killed)1 124 2 Conference number (unsigned word)B 126 2 Logical message number in the current packet; i.e.F this number will be 1 for the first message, 2 for the˙2 second, and so on. (unsigned word)D 128 1 Indicates whether the message has a network tag-lineE or not. A value of '*' indicates that a network tag-˙A line is present; a value of ' ' (space) indicatesD there isn't one. Messages sent to readers (non-net-F status) generally leave this as a space. Only network0 softwares need this information.˙ FFields such as To, From, Subject, Message #, Reference #, and the like=are space padded if they are shorter than the field's length. FThe message text starts in the next record. You can find out how many˙Dblocks make up one message by looking at the value of "Number of 128Dbyte blocks". Instead of carriage return and line feed combination,Feach line in the message end with an ASCII 227 (pi character) symbol. ˙FThere are reports that some (buggy) readers have problems with messag-Des which do not end the last line in the message with an ASCII 227. DIf a message does not completely occupy the 128-bytes block, the re-˙2mainder of the block is padded with space or null. CNote that there seems to exist old doors which will use one byte toFrepresent the conference number and pad the other one with an ASCII 32˙Dcharacter. The program reading this information will have to deter-Bmine whether the ASCII 32 in byte 125 of the header is a filler orDpart of the unsigned word. One method is to look in the CONTROL.DAT0file to determine the highest conference number.˙ DEven though most mail programs will generate MESSAGES.DAT files thatAappear in conference order, this is not always the case. Tomcat!B(mail door for Wildcat! BBS) generates MESSAGES.DAT that is not in˙Dconference order. This is due to how Wildcat! itself stores mail onEthe BBS. Another known system that behaves this way is Auntie, whichhas its mail door QWiKer. CNote that some mail doors offer the option of sending a mail packet˙Eeven though there may be no messages to send -- thus an empty MESSAG-DES.DAT file. This was tested with Qmail 4.0 door and it sent a MES-FSAGES.DAT file that contains a few empty 128-bytes blocks. Other mail˙Cdoors seem to be able to produce QWK files without the MESSAGES.DATCfile at all! Apparently, there was no standard established in this procedure. [3.10] Index files (*.NDX) [3.10.1] Conference indices ˙DThe index files contain a list of pointers pointing to the beginningEof messages in the MESSAGES.DAT file. The pointer is in terms of theF128-bytes block logical record that the MESSAGES.DAT file is in. Each˙Econference has its own xxx.NDX file, where xxx is the conference num-Cber left padded with zeroes. Some mail programs offer the user theEoption to not generate index files. So the mail readers need to cre-(ate the index files if they are missing. ˙EEZ-Reader 1.xx versions will convert the NDX files from Microsoft MKSFformat into IEEE long integer format. The bad part about this is thatBthe user may store those index files back into the QWK file. When˙?another reader reads the index files, it will be very confused! FSpecial note for BBSes with more than 999 conferences: Index files forAconferences with four digit conference numbers is named xxxx.NDX,˙Cwhere xxxx is the conference number (left padded with zeroes). TheFfilenames for three digit conferences are still named xxx.NDX on theseCboards. I would assume filenames for conferences in the five digit˙Arange is xxxxx.NDX, but I have not seen a BBS with 10,000 or moreconferences yet! FEach NDX file uses a five bytes logical record length and is formattedto: Offset Length Description˙F------ ------ ------------------------------------------------------B 1 4 Record number pointing to corresponding message inC MESSAGES.DAT. This number is in the Microsoft MKS$ BASIC format.˙C 5 1 Conference number of the message. This byte shouldF not be used because it duplicates both the filename ofF the index file and the conference # in the header. It˙F is also one byte long, which is insufficient to handle% conferences over 255. APlease refer to appendix B for routines to deal with MKS numbers. '[3.10.2] Personal index (PERSONAL.NDX) ˙EThere is a special index file named PERSONAL.NDX. This file containsCpointers to messages which are addressed to the user, i.e. personalDmessages. Some mail door and utility programs also allow the selec-˙:tion of other messages to be flagged as personal messages. [3.11] Pointer file FPointer file is generally included so that the user can reset the lastFread pointers on the mail program, in case there is a crash on the BBS˙Dor some other mishaps. There should be little reason for the reader#program to access the pointer file. "The pointer files I have seen are: KMail BBSID.PNTMarkMail BBSID.PNTQmail BBSID.PTRQWiKer HMP.PTR˙SFMailQwk BBSID.SFP $Additions to this list are welcomed. [3.12] SESSION.TXT DThis file, if included, will contain the message scanning screen theuser sees from the door. [4] REP files [4.1] Naming convention ˙EThe reply file is named BBSID.MSG, where BBSID is the ID code for theEBBS found on line 5 of the CONTROL.DAT file. Once this file has beenFcreated, the mail reader can archive it up into a file with REP exten-sion. [4.2] Message file (BBSID.MSG) ˙AReplies use the same format as the MESSAGES.DAT file, except thatDmessage number field will contain the conference number instead. InBother words, the conference number will be placed in the two bytes˙D(binary) starting at offset 124, as well as the message number field(ASCII) at offset 2. FA private message is indicated by '*' in the message status flag. ForEsome reason, most mail doors only accept '*' as a private message andnot '+'. ˙EThe first 128-bytes record of the file is the header. Instead of theEcopyright notice, it contains the BBSID of the BBS. This 1-8 charac-Cter BBSID must start at the very first byte and must match what the˙DBBS has. The rest of the record is space padded. The replies startCat record 2. Each reply message will have a 128-bytes header, plusDone or more for the message text; followed by another header, and soon. ˙EThe mail program must check to make sure the BBSID in the first block/of the BBSID.MSG file matches what the BBS has! [4.3] Door control messages AThese messages allow the user to change their setup on the BBS by˙Dsimply entering a message. The goal is to allow the user to be ableCto control most areas of the BBS via the mail door. Different mailFdoors have different capabilities. Most all of them offer the ability˙Eto add and drop a conference, as well as reset the last read pointersin a conference. DThere are two trends being developed for door control messages. TheEone being referred to as the "old" style accepts one command per mes-˙Csage (command entered in the subject line); whereas the "new" styleFaccepts multiple commands per message (commands entered in the messageBbody). The old style is by far the more popular but more and more"doors are beginning to offer both. ˙[4.3.1] DOOR.ID file BThe DOOR.ID file was first introduced by Greg Hewgill with Tomcat!Dmail door and SLMR mail reader. Since then, many other authors haveFpicked up this idea and use the format. This file provides the neces-˙Csary identifiers a reader needs to send add, drop, etc. messages toEthe mail door. It tells the reader who to address the message to and$what can be put in the subject line. FDOOR = This is the name of the door that creat-˙B ed the QWK packet, i.e. =% Tomcat.DVERSION = This is the version number of the door; that created the packet, i.e.˙2 = 2.9.DSYSTEM = This is the underlying BBS system typeF and version, i.e. = Wildcat# 2.55.˙BCONTROLNAME = This is the name to which the reader? should send control messages, eg.5 = TOMCAT.DCONTROLTYPE = This can be one of ADD, DROP, REQUEST,˙A or others. ADD and DROP are prettyE obvious (they work as in MarkMail), andF REQUEST is for use with BBS systems that˙E support file attachments. Try out SLMRF with CONTROLTYPE = REQUEST and use the QE function. (This seems to be a Wildcat!+ BBS feature.)˙FRECEIPT This flag indicates that the door/BBS isD capable of return receipts when a mes-C sage is received. If the first three˙F letters of the subject are RRR, then theC door should strip the RRR and set theD 'return-receipt-requested' flag on the˙B corresponding message. When the ad-A dressee reads this message, the BBSD generates a message with the date/time* it was read.˙CMIXEDCASE = YES If this line is found then the readerC will let you use upper and lower caseF names and subjects. This is first found˙B in Qmail DeLuxe2 1.25 version. MostA other QWK readers permit the use ofD mixed case subject lines but force the˙7 names to upper case only.CFIDOTAG = YES If this line is found then the readerF will automatically use FidoNet compliant( tag-lines. ˙BNone of the lines are actually required and they may appear in any?order. Of course, you would need a CONTROLNAME if you have anyCONTROLTYPE lines. [4.3.2] Qmail EQmail uses the "new" style of control message; therefore, send a mes-˙Fsage addressed to "QMAIL" with a subject of "CONFIG". Then, enter anyEof the commands listed below inside the text of your message. Remem- ber to use one command per line. FADD Add a conference into the Qmail Door scanning˙E list. "YOURS" can also be added to the com-D mand if the user wishes to receive messagesC only addressed them. i.e. "ADD 1 YOURS". ˙E "YOURS ALL" can be added to select a confer-F ence for all mailed addressed to the user and" to "ALL".DDROP Drop a conference from the Qmail Door scan-˙# ning list.CRESET Resets a conference to a particular value.D The user can use "HIGH-xxx" to set the con-D ference to the highest message in the base.˙?CITY Changes the "city" field in the user's' PCBoard entry.;PASSWORD Changes the user's login password.3BPHONE Business/data phone number˙0HPHONE Home/voice phone numberAPCBEXPERT Turns the PCBoard expert mode ON or OFF.>PCBPROT PCBoard file transfer protocol (A-Z).8PAGELEN Set page length inside PCBoard.˙5PCBCOMMENT Set user maintained comment.6AUTOSTART Qmail Door autostart command.APROTOCOL Qmail Door file transfer protocol (A-Z).DEXPERT Turns the Qmail Door expert mode ON or OFF.˙CMAXSIZE Maximum size of the user's .QWK packet (in bytes)CMAXNUMBER Maximum number of messages per conference. [4.3.3] MarkMail ˙DSend a message addressed to "MARKMAIL" with the subject line saying: 5ADD [value] in the conference you want to add6DROP in the conference you want to dropBYOUR [value] in the conference you want only your mail sent˙DYA [value] in the conference you want only your mail + mail& addressed to "ALL"FFILES ON or OFF in any conference to tell MarkMail whether to scan) for new files or not.˙BBLTS ON or OFF to turn on and off, respectively, of receiving bulletins.BOWN ON or OFF to turn on and off, respectively, of receiving% messages you sent˙BDELUXE ON or OFF to turn on and off, respectively, of receiving DeLuxe menuDLIMIT to set the maximum size of MESSAGES.DAT file canB be, it cannot exceed what the Sysop has set up ˙DAn optional number can be added onto the commands "ADD", "YOUR", andF"YA". If this number is positive, then it will be treated as an abso-Flute message number. MarkMail will set your last read pointer to that˙Dnumber. If it is negative, MarkMail will set your last read pointerFto the highest minus that number. For example: "ADD -50" will add theFconference and set the last read pointer to the highest in the confer-ence minus 50. [4.3.4] KMail ˙FSend a private message addressed to "KMAIL" in the conference that youAwant to add, drop, or reset. The commands are "ADD", "DROP", andE"RESET #", respectively. The "#" is the message number you want your.last read pointer in the conference be set to.˙ [4.3.5] RoseMail FThe RoseMail door allows configuration information be placed in eitherCthe subject line or message text. The message must be addressed toB"ROSEMAIL". For only one command, it can be placed in the subject˙Dline. For more than one changes, the subject line must say "CONFIG"Dand each change be placed in the message text. Every line should be$left justified. Valid commands are: 9Command Example˙D------------------------------------------------- ------------------ [] [] ADD 2 -3 Y8DROP DROP 2?RESET RESET 12 5000˙>PCBEXPERT - PCBoard expert mode PCBEXPERT ON - RoseMail expert mode EXPERT OFF;PCBPROT - PCBoard protocol PCBPROT Z8PROT - RoseMail protocol PROT G˙ - Page length PAGELEN 20=MAXSIZE - Max packet size in Kb MAXSIZE 100?MAXNUMBER MAXNUMBER 100AJUMPSTART JUMPSTART D;Y;Q˙?MAXPACKET MAXPACKET 500?AUTOSTART - same as jumpstart AUTOSTART OFF;OPT <##> - set door option OPT 2 OFF [4.3.6] Complete Mail Door ˙CSend message to "CMPMAIL", the commands are "ADD" and "DROP". ThisDmessage must be sent in the conference that you want to add or drop. [4.3.7] The MainMail System DSend a message addressed to "MAINMAIL" with the subject line saying: ˙5ADD [value] in the conference you want to add6DROP in the conference you want to dropBYOURS [value] in the conference you want only your mail sentDYOURS ALL [value] in the conference you want only your mail + mail˙& addressed to "ALL" DThe optional [value] parameter functions identically to the MarkMailFdoor -- positive number indicates an absolute message number, negativeBnumber will set your last read pointer that many messages from the˙ last message. [4.3.8] BGQWK DThe BGQWK mail door for GT Power supports file request via message. *To request a file, simply enter a message:  To: BGQWKSubject: DL:FILENAME.EXT ˙FThe FILENAME.EXT has to be exact name, wildcard is not supported. Themessage text can be left blank. CThe only limit on the file request feature is your time and/or yourCfile ratio. The transfer of the requested file(s) will start right˙Dafter the QWK download is completed. The only exception is when theDuser is using a bidirectional transfer protocol. There, the REP andEQWK are sent at the same time, hence, the file request cannot be pro-+cessed until the QWK transfer is completed. ˙[4.3.9] UltraBBS ESend a private message addressed to "ULTRABBS" in the conference thatEyou want to add, drop, or reset. The commands are "ADD", "DROP", andE"RESET #", respectively. The "#" is the message number you want your˙Elast read pointer in the conference be set to. The QWK mail door for?UltraBBS is built in and it generates the DOOR.ID file as well. [4.3.10] TriMail CTriMail is the QWK door for TriBBS. This door will accept off-line˙Fconfiguration options sent to Qmail, MarkMail, or TriMail. This meansEyou can send the message to: "QMAIL", "MARKMAIL", or "TRIMAIL" in theDappropriate conference and it will work. The available options are: )BLTS ON Turn bulletin scan on˙*BLTS OFF Turn bulletin scan off*FILES ON Turn new files scan on+FILES OFF Turn new files scan off3RESET Reset last message read pointer(DROP Drop this conference˙EADD [value] Add this conference. The [value] is optional and; will set the last message read pointer. [4.3.11] Cam-Mail AAddress your message to either QMAIL or CAM-MAIL. Then enter the˙1command in the subject line. Valid commands are: 0Add Add conferences for scanningGoodbye On Send the Goodbye files with the QWK packet˙3Goodbye Off Does not send the Goodbye files1Mailflags On Notifies users they have mail1Mailflags Off Does not notify users of mail3NDX On Create NDX files for QWK packet-NDX Off Does not create NDX files˙=Welcome On Send the Welcome file with the QWK packet2Welcome Off Does not send the Welcome file [4.3.12] QSO CQSO supports both "old" and "new" style off-line configuration com-˙Bmands. For the "old" style, message should be addressed to eitherCQMAIL or QSO. The message must be entered in the conference it af-(fects, with the subject line containing: "ADD Add conference˙CADD -20 Add conference and set last read pointer to the9 highest number in conference minus 20!ADD HIGH-20 Same as aboveCADD LOW+50 Add conference and set last read pointer to the˙7 lowest number in conference plus 50AADD 1234 Add conference and set last read pointer to a+ specific message numberFADD YOURS Add conference for messages addressed to you only;˙D the YOURS keyword may appear before or after theF message number; YOURS may be abbreviated as just Y'DROP Drop the conferenceDRESET Reset last read pointer to highest in conference˙4RESET -20 Reset to highest number minus 20!RESET HIGH-20 Same as above2RESET LOW+50 Reset to lowest number plus 50>RESET 1234 Reset last read pointer to specific number ˙BFor the "new" style message, enter the message addressed to eitherD"QMAIL" or "QSO" with the subject line saying "CONFIG". The messageEtext should have commands similar to the ones listed above. The only˙Cexception is that the conference number must be entered immediately&after the first keyword. For example: EADD 15 -20 Add conference 15, reset pointer to high minus 20'DROP 137 Drop conference 137˙FADD 20 HIGH-50 Y Add conference 20 for mail addressed to user only,; and set the pointer to highest minus 50 EQSO supports file sending in the mail packet as well. Attached files˙Fhave the name EMnnnnn, where nnnnn is a five digit leading zero paddedDnumber indicating the message number in which the request was sent. EThe plain text file ATTACHED.LST lists the real name of the file, and˙/has the following format (one line per record): A , , ,  : Conference where the request came from: Message number where request came from˙5 File as named inside the QWK file8 Original filename as seen on the BBS DFor messages that has an enclosed file, the last line of the messagehas the line:  *Enclosed file: filename.ext ˙DThe reader program must send a request to obtain this file. The re-=quest is in the format similar to any other control messages: To: QSOSubject: REQUEST nnnnn Dwhere nnnnn is the message number that contains this attached file. ˙DThis message must be sent in the conference where that contains thatDmessage. Alternatively, the "new" style can also be used. With the1line "REQUEST confnum nnnnn" in the message text. ˙DTo upload a file that is attached to a message, the file ATTXREF.DATDmust be created. The file is a plain text file with one line corre-Dsponding to each message in the reply file. Blank lines must be in-˙Ecluded for those messages that do not have files attached to them. AFnon-blank line has the following format to indicate a file is attachedto that message: ,  3 is any non-conflicting filename˙; the name as it should appear on the BBS [4.4] Turning off the echo flag EIn order to send a non-echoed message (not send out to other BBSs), aDuser can enter "NE:" in front of the subject line. This feature may˙!not be offered in all mail doors. DSome mail doors strip out the "NE:" from the subject line. However,Cthat leaves the recipient with nothing to tell that the message was>not echoed. Therefore, it is better if "NE:" is not stripped. [4.5] Tag-lines˙ 0The most common format for a reader tag-line is: ---. * My reader v1.00 * The rest of the tag-line. A(The asterisks above should be replaced by IBM extended characternumber 254 - a square block.) ˙DThe three dashes is called a tear-line. The tag-line is appended toEthe end of the message and is usually one line only. It is preferredBthat tag-lines conform to this format so that networking softwares˙Bsuch as QNet and RNet will not add another tearline to the messagewhen they process it. ESoftwares on FidoNet does not like mail readers adding a tear-line ofFtheir own, so if your mail reader offers a FidoNet mode, you will need˙Dto get rid of the tear-line. Another item which differs between theDFidoNet and PC-based networks is that FidoNet does not like extendedEASCII characters. So your reader may want to strip high ASCII if the˙Cuser has FidoNet mode on. Acceptable tag-line style, I believe, is just this: . * My Reader v1.00 * The rest of the tag-line. [5] Net mail CQWK mail doors can be used along or in conjunction with QWK network˙Bsoftwares to operate a network. Many such network exists. A Net-DStatus packet (one that can be imported to BBS message base) is veryEsimilar to a normal mail packet users get. The only difference is at˙Ethe end of the MESSAGES.DAT file. There, a series of 128 byte blocks&are appended to indicate Net-Status.  FOne byte represent one conference, in groups of 128. A non-zero valueCmeans the user is allowed Net Mail status for that conference. The˙Bnumber of Net Status blocks appended to the MESSAGES.DAT file only=needs to cover the highest conference the user has access to. DThe reason these packets have to be different? Using QWK mail doors˙Dto send and receive messages require you to be able to send messagesFin other user's name as well as receive private messages in conferenc-Fes. The Net-Status tells the mail door to import the messages even ifthey are from another name. ˙EThe only weird implementation here is that the block with the highestEconference numbers come before the lower ones. Hence, to illustrate:  Conference 128 | Conference 129 | | vv vv˙@0000 00 00 FF 00 00 00 00 00-00 00 00 00 00 00 00 00 Flags forB0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 conferences>0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 128-25550030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00˙50040 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 0050050 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 0050060 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 0050070 00 00 00 00 00 00 00 00-00 00 00 00 00 00 FF 00  Conference 0˙ | Conference 1 | | vv vv@0080 00 FF 00 00 00 00 00 00-00 00 00 00 00 00 00 00 Flags forB0090 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 conferences<00A0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 0-127˙500B0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00500C0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00500D0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00500E0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00˙500F0 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 FF BThis example shows that this user has Net Status in conferences 1,127, 130, and 254. EMarkMail and KMail doors (both for PCBoard) choos to implement things˙Da little differently. Instead of appending Net-Status blocks to theFend of the MESSAGES.DAT file, they simply put "MarkMail" or "Kmail..."Fin the first 8 position of the file and the user is granted Net-Statusin all conferences. ˙1 -=-=-=-=-=-=-<>-=-=-=-=-=-=- [A] Credits and Contributions 5Mark "Sparky" Herring, who originated the QWK-format. GTim Farley, who started this documentation back in the summer of 1990. ˙EThe general outline here is the work of Tim. I filled in the blanks. FJeffery Foy, who gave us the format for Microsoft single binary versus IEEE format. BGreg Hewgill, who (if I remember correctly) wrote the Turbo Pascal˙Broutines (included in here) to convert between MKS and TP LongInt. DDennis McCunney, who is the host of the Off-line conference on RIME,Dis very knowledgeable in off-line reading concept and programs. His˙Egoal is to have one reader that can read mail packet from any source. CCody Gibson and Jeffery Foy, whose information on Net-Status packetare included here. EAll those who have been around the Off-line conferences on ILink (the˙Doldest of the four I participate), RIME, Fido, and Intelec, who haveFprovided great help over the past three years. The bulk of the infor-Dmation presented here are from messages in those conferences. These˙Apeople include, but are no limited to, the followings: Dane Beko,BJoseph Carnage, Marcos Della, Joey Lizzi, Mark May, and Jim Smith. #[B] Sample Turbo Pascal and C code BHere are a few routines in Turbo Pascal and C to convert Microsoft˙BBASIC MKS format to usable IEEE long integer. These are collectedCover the networks and there is no guarantee that they will work foryou! Turbo Pascal (Greg Hewgill ?): type$ bsingle = array [0..3] of byte; ˙0{ converts TP real to Microsoft 4 bytes single } 6procedure real_to_msb (preal : real; var b : bsingle);var/ r : array [0 .. 5] of byte absolute preal;begin b [3] := r [0]; move (r [3], b [0], 3);end; { procedure real_to_msb } ˙0{ converts Microsoft 4 bytes single to TP real } *function msb_to_real (b : bsingle) : real;var preal : real;- r : array [0..5] of byte absolute preal;begin r [0] := b [3]; r [1] := 0; r [2] := 0; move (b [0], r [3], 3);˙ msb_to_real := preal;end; { function msb_to_real } FAnother Turbo Pascal routine to convert Microsoft single to TP LongInt(Marcos Della): >index := ((mssingle and not $ff000000) or $00800000) shr (24 -!((mssingle shr 24) and $7f)) - 1; ˙0C (identify yourself if you wrote this routine): ;/* converts 4 bytes Microsoft MKS format to long integer */ *unsigned long mbf_to_int (m1, m2, m3, exp)unsigned int m1, m2, m3, exp;{˙F return (((m1 + ((unsigned long) m2 << 8) + ((unsigned long) m3 <> (24 - (exp - 0x80)));} "Microsoft binary (by Jeffery Foy): 3 31 - 24 23 22 - 0 <-- bit position+-----------------+----------+˙| exponent | sign | mantissa |+----------+------+----------+ IEEE (C/Pascal/etc.): 3 31 30 - 23 22 - 0 <-- bit position+----------------------------+| sign | exponent | mantissa |+------+----------+----------+ ˙CIn both cases, the sign is one bit, the exponent is 8 bits, and theCmantissa is 23 bits. You can write your own, optimized, routine to;convert between the two formats using the above bit layout. [C] Sample message ˙1Here is a sample message in hex and ASCII format: I019780 20 34 32 33 32 20 20 20 30 32 2D 31 35 2D 39 32 4232 02-15-92I019790 31 33 3A 34 35 52 49 43 48 41 52 44 20 42 4C 41 13:45RICHARD BLA˙I0197A0 43 4B 42 55 52 4E 20 20 20 20 20 20 20 20 53 54 CKBURN STI0197B0 45 56 45 20 43 4F 4C 45 54 54 49 20 20 20 20 20 EVE COLETTI I0197C0 20 20 20 20 20 20 20 51 45 44 49 54 20 48 41 43 QEDIT HAC˙I0197D0 4B 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 K I0197E0 20 20 20 20 20 20 20 20 20 20 20 20 34 30 33 36 4036I0197F0 20 20 20 20 37 20 20 20 20 20 E1 0A 01 00 00 20 7 ˙I019800 2A 20 49 6E 20 61 20 6D 65 73 73 61 67 65 20 64 * In a message dI019810 61 74 65 64 20 30 32 2D 30 39 2D 39 32 20 74 6F ated 02-09-92 toI019820 20 53 74 65 76 65 20 43 6F 6C 65 74 74 69 2C 20 Steve Coletti, ˙I019830 52 69 63 68 61 72 64 20 42 6C 61 63 6B 62 75 72 Richard BlackburI019840 6E 20 73 61 69 64 3A E3 E3 52 42 3E 53 43 20 AF n said: RB>SC I019850 20 65 64 69 74 6F 72 20 69 6E 20 74 68 65 20 28 editor in the (˙I019860 6D 61 69 6E 66 72 61 6D 65 29 20 56 4D 2F 43 4D mainframe) VM/CMI019870 53 20 70 72 6F 64 75 63 74 20 6C 69 6E 65 20 69 S product line i[ etc. ]I019A00 6E 6F 74 20 61 20 44 6F 63 74 6F 72 2C 20 62 75 not a Doctor, bu˙I019A10 74 20 49 20 70 6C 61 79 20 6F 6E 65 20 61 74 20 t I play one at I019A20 74 68 65 20 48 6F 73 70 69 74 61 6C 2E E3 20 20 the Hospital. I019A30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ˙I019A40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 I019A50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 I019A60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ˙I019A70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 I019A80 E3 50 43 52 65 6C 61 79 3A 4D 4F 4F 4E 44 4F 47 PCRelay:MOONDOGI019A90 20 2D 3E 20 23 33 35 20 52 65 6C 61 79 4E 65 74 -> #35 RelayNet˙I019AA0 20 28 74 6D 29 E3 34 2E 31 30 20 20 20 20 20 20 (tm) 4.10 I019AB0 20 20 20 20 20 20 20 20 20 48 55 42 4D 4F 4F 4E HUBMOONI019AC0 2D 4D 6F 6F 6E 44 6F 67 20 42 42 53 2C 20 42 72 -MoonDog BBS, Br˙I019AD0 6F 6F 6B 6C 79 6E 2C 4E 59 20 37 31 38 20 36 39 ooklyn,NY 718 69I019AE0 32 2D 32 34 39 38 E3 20 20 20 20 20 20 20 20 20 2-2498 I019AF0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20  [D] Sample index file ˙*Here is a sample index file in hex format: 7000000 00 00 28 87 19 00 00 30 87 19 00 00 38 87 19 007000010 00 7E 87 19 00 00 07 88 19 00 00 0B 88 19 00 007000020 0F 88 19 00 00 14 88 19 00 00 19 88 19 00 00 1E˙7000030 88 19 00 00 22 88 19 00 00 27 88 19 00 00 2C 887000040 19 00 00 31 88 19 00 00 3B 88 19 00 00 40 88 197000050 00 00 46 88 19 00 00 49 88 19 00 00 4D 88 19 007000060 00 52 88 19 00 00 55 88 19 00 00 59 88 19 00 00˙.000070 60 88 19 00 00 66 88 19 00 00 70 88 19 GThis index file is for conference 25. The values for the offset are asFfollows: 84, 88, 92, 127, 135, 139, 143, 148, 153, 158, 162, 167, 172,>177, 187, 192, 198, 201, 205 210, 213, 217, 224, 230, and 240.˙ FFile converted by Beery Miller on 12/1/93 and released on the GEnie TI Roundtable. ˙