home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-387-Vol-3of3.iso
/
b
/
bmh02src.zip
/
BMH02.DOC
< prev
next >
Wrap
Text File
|
1992-08-20
|
18KB
|
460 lines
BMH v0.2
0 Warning
Sanity checks are performed in this package - however you use these
programs entirely at your own risk. This is an BETA release. There
may still be NASTY bugs.
So far there have been no reports of thrashed mail files - but it is
still a possibility. Don't use 'rmm' if you are afraid of this. Note
that deleting messages in the bmh.exe program happens at once -
there is no undelete command.
1 Intro
The bmh package is sort of an unbundled bm for MSDOS. It allows the
listing, reading and replying/sending of mail from the dos commmand
line. The user interface is based very vaguely on the mh mail handler
found on *nix machines.
It should be compatible with bm and other mail packages. It does not
mark mail as read with the addition of a Status: line.
The program bmh is a wrapper program similar in functionality
and feel to the original bm.
There is a small amount of support for news (nntp) reading and posting.
2 Resource File
An rc file (default name /bm.rc) is required. No changes should be
needed to a bm.rc that works with bm. The rc file can be specified by
the environment variable BMHRC (or alternatively BMRC). An example
file is provided.
An editor must be defined for the comp, repl, forw, dist and post
programs to work.
Defining the environment variable BMTMP (or alternatively TMP) will
cause temporary files to be created in the specified drive/directory.
2.1 Resource file variables
Variable Default Description
alias /alias alias file
bufsize 40960 internal mail file buffer (40k)
current /current.bmh file holding current folder/msg
edit <not set> user's favorite text editor
editline y Use DOS interrupt 0A for console input
fullname <not set> fullname of user
host <not set> name of this host
smtp /spool/mail mail directory
mqueue /spool/mqueue outbound mail queue directory
newsdir /spool/news nntp client/server news directory
organ <not set> nntp organization header
record <not set> record outbound mail in this file
reply <not set> address for reply-to header
signature <not set> location of sig file
spooldir /spool spool directory - areas file etc
screen bios screen access mode under Turbo C
source <not set> pull in rc info from another file
tsbids y add time stamp to bids in history file
tmpdir <not set> directory for temporary files
user <not set> name of this user from rc file
viewer <not set> program to view files with
For example, a signature file can be automatically added to outgoing
mail by setting its location in the rc file:
#
signature /sig
#
3 Programs
The programs included in this release are:
ali : examine alias entries
ali -- list all aliases
ali sysop -- show where sysop is aliased to
comp : compose a message
NOTE: The 'To:', 'Cc:' and 'Subject:' lines are the
only header lines the program examines for putting
into a message. Random headers can be included in
messages by placing them immediately at the start of
the body of the message (after the line of '--------').
Multiple recipients on the To: and Cc: headers lines can
be seperated by either space or comma characters.
dist : Remail (bounce) the specified message to someone.
dist -- remail current message
dist 14 -- remail message 14
dist +tcp 1 -- remail 1 msg in tcp folder
folders : display mail files, marks public areas, sizes,
dates, locked files and news files (in a recursive listing
of directories below the mail directory).
folders -- verbose listing
folders -short -- gives a short form listing
forw : Forward the specified message to someone.
forw -- forward current message
forw 14 -- forward message 14
forw +tcp 1 -- forward 1 msg in tcp folder
next : show the next message
repl : repl to a message
repl 2 -- reply to message 2
repl -- reply to current message
repl +news 4 -- reply to message 4 in news folder
NOTE: The 'To:', 'Cc:' and 'Subject:' lines are the
only header lines the program examines for putting
into a message. Random headers can be included in
messages by placing them immediately at the start of
the body of the message (after the line of '--------').
The message you are replying to is available in the
file '@' while you are editing.
rmm : delete message(s)
Note: Original file is renamed to a .old extension
This is the only program which actually writes to
mailbox files.
rmm -- delete current message
rmm 3 -- delete message 3
rmm 5-15 -- delete messages 5 to 15
rmm +junk 1-999 -- delete lots of messages in junk
scan : list messages
R: lines generated by ax25 pbbs's which immediately follow
the RFC822 headers are not shown as part of body of the
message during a scan listing.
show : display messages, eg:
show 2 -- show message 2
show -- show current message
show 4-9 15 -- show messages 4 to 9 and 15
show +misc 2 -- show message 2 in misc folder
smtp : display (or optionally kill) messages on the smtp queue
smtp -- list current smtp jobs
smtp 56 57 -- will kill jobs 56 and 57
(The qm program from the view package is recommended for
anything more complicated).
bmh : all of the above gathered together in a way similar to bm.
Note that deleting messages happens immediately -
there is no undelete command.
A command line editing and history facility is available
by loading the public domain CED program before bmh. This
may also work with other command line enhancers which provide
services by intercepting DOS interrupt 0A. This feature can be
disabled by setting the 'editline' rc variable to 'n'.
A sample set of CED synonyms for mimicking bmh commands
from the DOS command line appears in the appendix.
If new mail arrives in the main user mailbox then bmh will
display a 'You have new mail' message.
See details in the appendix for calling individual routines
in bmh from the command line.
import : ax25 bbs style message importing
The program reads messages from a file (optionally stdin),
skipping anything which doesn't look like an pbbs message.
Private mail and bulletin traffic is then put on the
smtp queue for disposal by NOS. Optionally readdress all
mail in a file. The mailbox history file is updated (bids
are optionally timestamped) - import will lock the history
file (but watch out NOS doesn't lock it).
import ans.in amsat -- takes the messages from the
file 'ans.in' and mail to
'amsat'
import -- take input from stdin, and
queue to ax25 addresses
given in the file.
import - amsat -- takes the messages from stdin
and directs mail to amsat
post : post news
This is a very simple post news program based on the built-in
nntp poster available in some versions of NOS.
The program will automatically create directories and files
that it needs.
Note that although this program will lock files that it uses,
the NNTP server is NOS does not currently do this.
Cross posting to news groups is not currently supported.
It is not currently possible for a user to add in extra
headers.
3.1 Pager
A simple pager is built into the programs. At a 'More?' prompt, return will
advance the display one line, and space will advance one page.
3.2 Whatnow
After a comp/repl/forw/dist/post editing session, you will be asked if you
wish to send the message. The options are:
? -- list options available
q -- quit and don't send message (don't save it either)
p -- post message message
l -- list message
e -- edit message
3.3 Syntax
A syntax reminder is displayed by the programs when you start
one with the '-help' flag. Version and copyright information
are also displayed. For example:
rmm -help
4 Folders
In general a folder/notesfile/mailbox file other than the current one is
selected by prefixing the folder name with a + sign, eg:
scan +amsat
would list messages in the amsat area. The current folder and message
number are stored in the file /current.bmh (default).
4.1 'News' Folders
Mail stored in mailbox format located in directories under the mail
directory can be read, listed and deleted by:
scan +ei.news
would for example by default access the mailfile:
spool/mail/ei/news.txt
The folders program can be used to list news type mail files. A simple
news program 'post' is provided to post news in the NR0D NNTP server
client format. (NOTE: this is not the mailbox notesfile format
associated with NOS/BM and most of bmh).
5 Copyright and Conditions of use.
Substantial portions of these programs are derived from the bm source
code v3.3 870467. The bm program is copyright:
Copyright 1986 Bdale Garbee, All Rights Reserved.
Permission granted for non-commercial copying and use, provided
this notice is retained.
Copyright 1987 1988 Dave Trulli NN2Z, All Rights Reserved.
Permission granted for non-commercial copying and use, provided
this notice is retained.
Modifications and additions to the bm source which make up bmh are copyright:
Copyright 1992 Paul Healy EI9GL, All Rights Reserved.
Permission granted for non-commercial copying and use, provided
this notice is retained.
The post program is derived from NNTP server/client code (taken from
WG7J v1.03) by:
NNTP Server/Client - See RFC977
Jeffrey R. Comstock. - NR0D - Bloomington, Minnesota USA
Copyright 1990 Jeffrey R. Comstock, All Rights Reserved.
Permission granted for non-commercial copying and use, provided
this notice is retained.
DB3FL 9107xx: heavily rewritten and bug fixing in file-handling
ported to NOS by PE1NMB - 920120
Mods by PA0GRI and WG7J
6 Bugs
Bug reports will be at least acknowledged.
Known bugs:
None at the moment.
7 Distribution
Two zip files form the distribution:
bmhXXexe.zip : holds this doc file, all the exe's, example.rc, copyrigh.bm
bmhXXsrc.zip : holds this doc file, source files for Turboc V2.0,
turboc.cfg, example.rc, copyrigh.bm
8 Todo/Missing list
refile
inc
scan : support range listing
rmm : speed up
show : don't show ax25 pbbs R: lines
post : support cross posting.
mail : just use bm
doc : LaTeX it.
9 Fixes
920719 : Fixed problem with rmm not having enough memory in bmh by reducing
the main file (default) buffer size.
920721 : Fixed problem with scan that meant very short messages caused the
next message to be missed.
920802 : Allow both space and comma seperation of 'To:' and 'Cc:' lists.
920804 : Fixed Reply-To: header problem which put the library copyright
message instead of an address into the message!
Slightly relaxed requirements for what makes a valid RFC822
header - a space after a colon is no longer required of headers
that a user enters.
920809 : Fixed bmh '!' command. A null pointer was missing from the array
of pointers passed to the spawn library call.
10 File Locking
Be aware that while the bmh package locks the following files, other
programs do not at the moment:
spool/mqueue/sequence.seq,
WG7J 1.03, 920709a (KA9Q), WNOS 4A7:smtpserv.c:get_msgid
BM v3.3:bmutil.c:get_msgid
spool/history, (only used by the import program)
WG7J 1.03:mailbox.c:msgidcheck
920709a (KA9Q), WNOS 4A7:mailbox.c:dosend
spool/news/active, spool/news/pointer, spool/news/history
11 Closing
A couple of things came together that brought bmh into being:
. I have mainly ended up using packet radio to communicate using mail
(smtp based with ax25 gatewaying) with a group of amateurs locally.
Up until bmh came on the scene, I happily used bm as a mailer for a couple
of years. There were a couple of things that annoyed about it, but it
was fine for most things.
. I have also used mh now on a *nix machine for a couple of years as well,
and have grown to like the interface it presents a lot. I really did want
to be just able to type 'comp' from a shell, and be presented with some
headers to be filled in, and a blank space entering a message with
an editor. (I have tried/used view, elm and the NOS mailbox at different
times - too used to having a command line I suppose).
. For a while I have been trying to figure out some way of distributing
news/bulletins via nntp locally. This has been made harder by the
absence of a reader program for the nntp server built into some
versions of NOS - what I would really like to have is something like
'tin' ported to DOS/the NOS nntp server setup. There is now a small
amount of support for reading files the NOS client-only nntp version
produces. The post program is the first attempt at simple news support.
. Looking at a small project peripherally connected with amateur radio,
I wanted some way of taking mail from NOS folders/mailbox files using
shell script files, and also getting mail in (the project is smtp<->pacsat
mail gatewaying). Still moving around this one - re-entry likely in the
mid term.
. The internals of bmh are arranged in the way they are as an experiment to
see how fast data can be read off an MSDOS disk. I was tired of bm taking
so long to startup and shutdown (rmm of course is now no better). I also
didn't like the way bm was marking messages in bulletin areas read unless I
did an 'x' every time I changed notesfile.
An ancestor to the current package compiled under djgpp. It was a good
bit quicker in comparison to Turbo C. Its likely that at some stage that
this will be attempted again.
. Thanks are due in particular to Bob Austin, N4CLH, for comments on the v0.1
release and for test driving a number of versions between v0.1 and v0.2.
12 Other things
12.1 Appendix A: Useful CED command synonyms
Rem CED configuration file
Rem load with ced -B512,128,512,128,128,128 -Fc:\sys\ced.rc
syn a ali
syn b dist
Rem syn d rmm
syn f forw
syn h cls^scan
syn m comp
syn n next
syn r cls^show
12.2 Appendix B: Disk Space
There are a couple of ways of recovering some of the approx. 1/2 MB of
disk space that the full bmh distribution involves. In order of preference
they are:
. Just keep bmh.exe on your disk and use an alias utility to mimic the calling
of each program. For example if you want the folders program, you would call
bmh with:
bmh -folders -- or
bmh -folders -short -- so use an alias package to make 'folders'
-- mean 'bmh -folders -short'
Note that the post and import programs are not currently available inside
bmh. Some sample CED aliases are:
syn ali bmh -ali
syn comp bmh -comp
syn dist bmh -dist
syn folders bmh -folders
syn forw bmh -forw
syn next bmh -next
syn repl bmh -repl
syn rmm bmh -rmm
syn scan bmh -scan
syn show bmh -show
syn smtp bmh -smtp
. A less satisfactory way is to create batch files of the form:
@bmh -scan %1 %2 %3 %4 %5 %6 %7 %8 %9
. Just keep and use bmh.exe (and import.exe & post.exe if you need them).
You can create the other programs as you need them by copying (or renaming)
bmh.exe to the program (name) you want, ie to create an ali.exe
program, you would simply:
copy bmh.exe ali.exe
(The next binary release of the bmh package will probably only include
the bmh.exe program - you will be able to create the rest of the
programs using the above method(s), or alternatively by obtaining the
source distribution and compiling them up)
--
Paul Healy, EI9GL
phealy@cs.tcd.ie
20 August 1992