home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-387-Vol-3of3.iso / b / bmh02exe.zip / BMH02.DOC < prev    next >
Text File  |  1992-08-20  |  18KB  |  460 lines

  1. BMH v0.2
  2.  
  3. 0 Warning
  4.  
  5. Sanity checks are performed in this package - however you use these
  6. programs entirely at your own risk. This is an BETA release. There
  7. may still be NASTY bugs. 
  8.  
  9. So far there have been no reports of thrashed mail files - but it is
  10. still a possibility. Don't use 'rmm' if you are afraid of this.  Note
  11. that deleting messages in the bmh.exe program happens at once -
  12. there is no undelete command. 
  13.  
  14. 1 Intro
  15.  
  16. The bmh package is sort of an unbundled bm for MSDOS. It allows the
  17. listing, reading and replying/sending of mail from the dos commmand
  18. line. The user interface is based very vaguely on the mh mail handler
  19. found on *nix machines.
  20.  
  21. It should be compatible with bm and other mail packages. It does not
  22. mark mail as read with the addition of a Status: line.
  23.  
  24. The program bmh is a wrapper program similar in functionality
  25. and feel to the original bm.
  26.  
  27. There is a small amount of support for news (nntp) reading and posting.
  28.  
  29. 2 Resource File
  30.  
  31. An rc file (default name /bm.rc) is required. No changes should be
  32. needed to a bm.rc that works with bm. The rc file can be specified by
  33. the environment variable BMHRC (or alternatively BMRC). An example
  34. file is provided. 
  35.  
  36. An editor must be defined for the comp, repl, forw, dist and post
  37. programs to work.
  38.  
  39. Defining the environment variable BMTMP (or alternatively TMP) will
  40. cause temporary files to be created in the specified drive/directory.
  41.  
  42. 2.1 Resource file variables
  43.  
  44. Variable   Default                     Description
  45.  
  46. alias      /alias                      alias file 
  47. bufsize    40960                       internal mail file buffer (40k) 
  48. current    /current.bmh                file holding current folder/msg 
  49. edit       <not set>                   user's favorite text editor 
  50. editline   y                           Use DOS interrupt 0A for console input
  51. fullname   <not set>                   fullname of user 
  52. host       <not set>                   name of this host 
  53. smtp       /spool/mail                 mail directory 
  54. mqueue     /spool/mqueue               outbound mail queue directory 
  55. newsdir    /spool/news                 nntp client/server news directory
  56. organ      <not set>                   nntp organization header
  57. record     <not set>                   record outbound mail in this file 
  58. reply      <not set>                   address for reply-to header 
  59. signature  <not set>                   location of sig file  
  60. spooldir   /spool                      spool directory - areas file etc 
  61. screen     bios                        screen access mode under Turbo C 
  62. source     <not set>                   pull in rc info from another file 
  63. tsbids     y                           add time stamp to bids in history file 
  64. tmpdir     <not set>                   directory for temporary files 
  65. user       <not set>                   name of this user from rc file 
  66. viewer     <not set>                   program to view files with
  67.  
  68. For example, a signature file can be automatically added to outgoing 
  69. mail by setting its location in the rc file:
  70.  
  71. #
  72. signature /sig
  73. #
  74.  
  75. 3 Programs
  76.  
  77. The programs included in this release are:
  78.  
  79. ali         : examine alias entries 
  80.               ali              -- list all aliases
  81.               ali sysop        -- show where sysop is aliased to
  82.  
  83. comp        : compose a message
  84.  
  85.               NOTE: The 'To:', 'Cc:' and 'Subject:' lines are the 
  86.               only header lines the program examines for putting
  87.               into a message. Random headers can be included in
  88.               messages by placing them immediately at the start of
  89.               the body of the message (after the line of '--------').
  90.  
  91.               Multiple recipients on the To: and Cc: headers lines can
  92.               be seperated by either space or comma characters.
  93.  
  94. dist        : Remail (bounce) the specified message to someone.
  95.  
  96.               dist               -- remail current message
  97.               dist 14            -- remail message 14
  98.               dist +tcp 1        -- remail 1 msg in tcp folder
  99.  
  100. folders     : display mail files, marks public areas, sizes, 
  101.               dates, locked files and news files (in a recursive listing 
  102.               of directories below the mail directory).
  103.  
  104.               folders                -- verbose listing
  105.               folders -short         -- gives a short form listing
  106.  
  107. forw        : Forward the specified message to someone.
  108.  
  109.               forw               -- forward current message
  110.               forw 14            -- forward message 14
  111.               forw +tcp 1        -- forward 1 msg in tcp folder
  112.  
  113. next        : show the next message
  114.  
  115. repl        : repl to a message 
  116.  
  117.               repl 2                 -- reply to message 2
  118.               repl                   -- reply to current message
  119.               repl +news 4           -- reply to message 4 in news folder
  120.  
  121.               NOTE: The 'To:', 'Cc:' and 'Subject:' lines are the 
  122.               only header lines the program examines for putting
  123.               into a message. Random headers can be included in
  124.               messages by placing them immediately at the start of
  125.               the body of the message (after the line of '--------').
  126.  
  127.               The message you are replying to is available in the
  128.               file '@' while you are editing.
  129.  
  130. rmm         : delete message(s) 
  131.               Note: Original file is renamed to a .old extension
  132.                     This is the only program which actually writes to 
  133.                     mailbox files.
  134.  
  135.               rmm             -- delete current message
  136.               rmm 3           -- delete message 3
  137.               rmm 5-15        -- delete messages 5 to 15
  138.               rmm +junk 1-999 -- delete lots of messages in junk
  139.  
  140. scan        : list messages
  141.  
  142.               R: lines generated by ax25 pbbs's which immediately follow
  143.               the RFC822 headers are not shown as part of body of the 
  144.               message during a scan listing.
  145.  
  146. show        : display messages, eg:
  147.  
  148.               show 2             -- show message 2
  149.               show               -- show current message
  150.               show 4-9 15        -- show messages 4 to 9 and 15
  151.               show +misc 2       -- show message 2 in misc folder
  152.  
  153. smtp        : display (or optionally kill) messages on the smtp queue
  154.  
  155.               smtp         -- list current smtp jobs
  156.               smtp 56 57   -- will kill jobs 56 and 57
  157.  
  158.               (The qm program from the view package is recommended for
  159.                anything more complicated).
  160.  
  161. bmh         : all of the above gathered together in a way similar to bm.
  162.               Note that deleting messages happens immediately -
  163.               there is no undelete command. 
  164.  
  165.               A command line editing and history facility is available
  166.               by loading the public domain CED program before bmh. This
  167.               may also work with other command line enhancers which provide
  168.               services by intercepting DOS interrupt 0A. This feature can be
  169.               disabled by setting the 'editline' rc variable to 'n'.
  170.  
  171.               A sample set of CED synonyms for mimicking bmh commands
  172.               from the DOS command line appears in the appendix.
  173.              
  174.               If new mail arrives in the main user mailbox then bmh will
  175.               display a 'You have new mail' message.
  176.  
  177.               See details in the appendix for calling individual routines
  178.               in bmh from the command line.
  179.  
  180. import      : ax25 bbs style message importing
  181.  
  182.               The program reads messages from a file (optionally stdin),
  183.               skipping anything which doesn't look like an pbbs message.
  184.               Private mail and bulletin traffic is then put on the
  185.               smtp queue for disposal by NOS. Optionally readdress all
  186.               mail in a file. The mailbox history file is updated (bids
  187.               are optionally timestamped) - import will lock the history
  188.               file (but watch out NOS doesn't lock it).
  189.  
  190.               import ans.in amsat        -- takes the messages from the
  191.                                             file 'ans.in' and mail to
  192.                                             'amsat'
  193.               import                     -- take input from stdin, and
  194.                                             queue to ax25 addresses 
  195.                                             given in the file.
  196.               import - amsat             -- takes the messages from stdin
  197.                                             and directs mail to amsat
  198. post        : post news
  199.  
  200.               This is a very simple post news program based on the built-in
  201.               nntp poster available in some versions of NOS. 
  202.  
  203.               The program will automatically create directories and files
  204.               that it needs.
  205.  
  206.               Note that although this program will lock files that it uses,
  207.               the NNTP server is NOS does not currently do this.
  208.  
  209.               Cross posting to news groups is not currently supported.
  210.               It is not currently possible for a user to add in extra
  211.               headers.
  212.               
  213. 3.1 Pager
  214.  
  215. A simple pager is built into the programs. At a 'More?' prompt, return will
  216. advance the display one line, and space will advance one page.
  217.  
  218. 3.2 Whatnow
  219.  
  220. After a comp/repl/forw/dist/post editing session, you will be asked if you
  221. wish to send the message. The options are:
  222.  
  223.    ?            -- list options available
  224.    q            -- quit and don't send message (don't save it either)
  225.    p            -- post message message
  226.    l            -- list message
  227.    e            -- edit message
  228.  
  229. 3.3 Syntax
  230.  
  231. A syntax reminder is displayed by the programs when you start
  232. one with the '-help' flag. Version and copyright information
  233. are also displayed. For example:
  234.  
  235. rmm -help
  236.  
  237. 4 Folders
  238.  
  239. In general a folder/notesfile/mailbox file other than the current one is 
  240. selected by prefixing the folder name with a + sign, eg:
  241.  
  242. scan +amsat
  243.  
  244. would list messages in the amsat area. The current folder and message
  245. number are stored in the file /current.bmh (default).
  246.  
  247. 4.1 'News' Folders
  248.  
  249. Mail stored in mailbox format located in directories under the mail
  250. directory can be read, listed and deleted by:
  251.  
  252. scan +ei.news
  253.  
  254. would for example by default access the mailfile:
  255.  
  256.  spool/mail/ei/news.txt
  257.  
  258. The folders program can be used to list news type mail files. A simple
  259. news program 'post' is provided to post news in the NR0D NNTP server
  260. client format. (NOTE: this is not the mailbox notesfile format
  261. associated with NOS/BM and most of bmh).
  262.  
  263. 5 Copyright and Conditions of use.
  264.  
  265. Substantial portions of these programs are derived from the bm source
  266. code v3.3 870467. The bm program is copyright:
  267.  
  268.  Copyright 1986 Bdale Garbee, All Rights Reserved.
  269.  Permission granted for non-commercial copying and use, provided
  270.  this notice is retained.
  271.  Copyright 1987 1988 Dave Trulli NN2Z, All Rights Reserved.
  272.  Permission granted for non-commercial copying and use, provided
  273.  this notice is retained.
  274.  
  275. Modifications and additions to the bm source which make up bmh are copyright:
  276.  
  277.  Copyright 1992 Paul Healy EI9GL, All Rights Reserved.
  278.  Permission granted for non-commercial copying and use, provided
  279.  this notice is retained.
  280.  
  281. The post program is derived from NNTP server/client code (taken from
  282. WG7J v1.03) by:
  283.  
  284.  NNTP Server/Client - See RFC977
  285.  Jeffrey R. Comstock. - NR0D - Bloomington, Minnesota USA
  286.  Copyright 1990 Jeffrey R. Comstock, All Rights Reserved.
  287.  Permission granted for non-commercial copying and use, provided
  288.  this notice is retained.
  289.  DB3FL 9107xx: heavily rewritten and bug fixing in file-handling
  290.  ported to NOS by PE1NMB - 920120
  291.  Mods by PA0GRI and WG7J
  292.  
  293. 6 Bugs
  294.  
  295. Bug reports will be at least acknowledged.
  296.  
  297. Known bugs:
  298.            None at the moment.
  299.  
  300. 7 Distribution
  301.   
  302. Two zip files form the distribution:
  303.  
  304.   bmhXXexe.zip : holds this doc file, all the exe's, example.rc, copyrigh.bm
  305.   bmhXXsrc.zip : holds this doc file, source files for Turboc V2.0, 
  306.                  turboc.cfg, example.rc, copyrigh.bm
  307.  
  308. 8 Todo/Missing list
  309.  
  310.   refile
  311.   inc
  312.   scan      : support range listing
  313.   rmm       : speed up
  314.   show      : don't show ax25 pbbs R: lines
  315.   post      : support cross posting.
  316.   mail      : just use bm
  317.   doc       : LaTeX it.
  318.  
  319. 9 Fixes
  320.  
  321.   920719 : Fixed problem with rmm not having enough memory in bmh by reducing
  322.            the main file (default) buffer size.
  323.   920721 : Fixed problem with scan that meant very short messages caused the
  324.            next message to be missed.
  325.   920802 : Allow both space and comma seperation of 'To:' and 'Cc:' lists.
  326.   920804 : Fixed Reply-To: header problem which put the library copyright
  327.            message instead of an address into the message!
  328.            Slightly relaxed requirements for what makes a valid RFC822
  329.            header - a space after a colon is no longer required of headers
  330.            that a user enters.
  331.   920809 : Fixed bmh '!' command. A null pointer was missing from the array
  332.            of pointers passed to the spawn library call.
  333.  
  334. 10 File Locking
  335.  
  336.    Be aware that while the bmh package locks the following files, other
  337.    programs do not at the moment:
  338.  
  339.    spool/mqueue/sequence.seq, 
  340.        WG7J 1.03, 920709a (KA9Q), WNOS 4A7:smtpserv.c:get_msgid 
  341.        BM v3.3:bmutil.c:get_msgid 
  342.  
  343.    spool/history,  (only used by the import program)
  344.        WG7J 1.03:mailbox.c:msgidcheck 
  345.        920709a (KA9Q), WNOS 4A7:mailbox.c:dosend
  346.  
  347.    spool/news/active, spool/news/pointer, spool/news/history
  348.  
  349. 11 Closing
  350.  
  351. A couple of things came together that brought bmh into being:
  352.  
  353. . I have mainly ended up using packet radio to communicate using mail
  354.   (smtp based with ax25 gatewaying) with a group of amateurs locally. 
  355.   Up until bmh came on the scene, I happily used bm as a mailer for a couple 
  356.   of years. There were a couple of things that annoyed about it, but it 
  357.   was fine for most things.
  358.  
  359. . I have also used mh now on a *nix machine for a couple of years as well,
  360.   and have grown to like the interface it presents a lot. I really did want
  361.   to be just able to type 'comp' from a shell, and be presented with some 
  362.   headers to be filled in, and a blank space entering a message with
  363.   an editor. (I have tried/used view, elm and the NOS mailbox at different
  364.   times - too used to having a command line I suppose).
  365.  
  366. . For a while I have been trying to figure out some way of distributing
  367.   news/bulletins via nntp locally. This has been made harder by the
  368.   absence of a reader program for the nntp server built into some
  369.   versions of NOS - what I would really like to have is something like
  370.   'tin' ported to DOS/the NOS nntp server setup. There is now a small
  371.   amount of support for reading files the NOS client-only nntp version
  372.   produces. The post program is the first attempt at simple news support.
  373.  
  374. . Looking at a small project peripherally connected with amateur radio,
  375.   I wanted some way of taking mail from NOS folders/mailbox files using
  376.   shell script files, and also getting mail in (the project is smtp<->pacsat 
  377.   mail gatewaying). Still moving around this one - re-entry likely in the
  378.   mid term.
  379.  
  380. . The internals of bmh are arranged in the way they are as an experiment to
  381.   see how fast data can be read off an MSDOS disk. I was tired of bm taking
  382.   so long to startup and shutdown (rmm of course is now no better). I also
  383.   didn't like the way bm was marking messages in bulletin areas read unless I
  384.   did an 'x' every time I changed notesfile. 
  385.      An ancestor to the current package compiled under djgpp. It was a good
  386.   bit quicker in comparison to Turbo C. Its likely that at some stage that
  387.   this will be attempted again.
  388.  
  389. . Thanks are due in particular to Bob Austin, N4CLH, for comments on the v0.1
  390.   release and for test driving a number of versions between v0.1 and v0.2.
  391.  
  392. 12 Other things
  393.  
  394. 12.1 Appendix A: Useful CED command synonyms
  395.  
  396. Rem     CED configuration file
  397. Rem     load with ced -B512,128,512,128,128,128 -Fc:\sys\ced.rc 
  398.  
  399. syn a ali
  400. syn b dist
  401. Rem syn d rmm
  402. syn f forw
  403. syn h cls^scan
  404. syn m comp
  405. syn n next
  406.  
  407. syn r cls^show
  408.  
  409. 12.2 Appendix B: Disk Space
  410.  
  411. There are a couple of ways of recovering some of the approx. 1/2 MB of
  412. disk space that the full bmh distribution involves. In order of preference
  413. they are:
  414.  
  415. . Just keep bmh.exe on your disk and use an alias utility to mimic the calling
  416.   of each program. For example if you want the folders program, you would call
  417.   bmh with:
  418.  
  419.     bmh -folders                -- or
  420.     bmh -folders -short         -- so use an alias package to make 'folders'
  421.                                 -- mean 'bmh -folders -short'
  422.  
  423.    Note that the post and import programs are not currently available inside
  424.    bmh. Some sample CED aliases are:
  425.  
  426.    syn ali bmh -ali
  427.    syn comp bmh -comp
  428.    syn dist bmh -dist
  429.    syn folders bmh -folders
  430.    syn forw bmh -forw
  431.    syn next bmh -next
  432.    syn repl bmh -repl
  433.    syn rmm bmh -rmm
  434.    syn scan bmh -scan
  435.    syn show bmh -show
  436.    syn smtp bmh -smtp
  437.  
  438. . A less satisfactory way is to create batch files of the form:
  439.  
  440.    @bmh -scan %1 %2 %3 %4 %5 %6 %7 %8 %9
  441.  
  442. . Just keep and use bmh.exe (and import.exe & post.exe if you need them).
  443.   You can create the other programs as you need them by copying (or renaming)
  444.   bmh.exe to the program (name) you want, ie to create an ali.exe
  445.   program, you would simply:
  446.  
  447.   copy bmh.exe ali.exe
  448.  
  449.   (The next binary release of the bmh package will probably only include
  450.    the bmh.exe program - you will be able to create the rest of the
  451.    programs using the above method(s), or alternatively by obtaining the
  452.    source distribution and compiling them up)
  453.  
  454. --
  455.  
  456. Paul Healy, EI9GL
  457. phealy@cs.tcd.ie
  458.  
  459. 20 August 1992
  460.