BM User Manual Dave Trulli, NN2Z 1. What is BM? BM is designed to serve as the mail user-interface for the KA9Q TCP/IP inter-networking package. It provides a full set of mail services to the user which allows the sending and receipt of electronic mail. 2. BM Installation To install BM requires the modification of the supplied configuration files and the creation of the proper directory structure. The following sections describe the file and directory structure used by BM and SMTP. 2.1 Directory Structure \spool\mqueue This directory holds the outbound mail jobs for SMTP. Each job consists of 2 files a xxxx.txt and xxxx.wrk file where xxxx is a unique numerical prefix. The format of the files are described in a later section. \spool\rqueue This directory is used by SMTP for jobs that have been received and will be processed by a user defined mail routing program. This directory is not used directly by BM. \spool\mail This directory holds the individual mailboxes for each user name on your system. The extension .txt is add to the user name to form the mailbox name. Mail received by the SMTP server is appended to the mailbox file. 2.2 Configuration Files - 2 - 2.2.1 The\bm.rc file The \bm.rc file provides BM with the configuration needed for the operation of the mailer. The format for the \bm.rc file is: variable value The following variables are valid in the bm.rc file: smtp defines the path to the directory containing the mailbox files. The default directory is \spool\mail on the current drive. host Is used to set the local hostname for use in the RFC822 mail headers. This is a required field. user Defines the user name of the person who is sending mail. This is also used as the default mailbox for reading mail. On the AMPRNET this is usually set to your call. There is a DOS limit of 8 characters for the user name. edit Defines the name of your favorite editor which can be used to construct and edit the text of outgoing messages. The use of edit is optional. fullname Is used to provide your full name to the mailer for use in the comment portion of "From:" header line. The use of fullname is optional. - 3 - reply Defines the address where you wish to receive replies to messages sent. This option is useful if you are operating your pc on a local area network and would like your mail replies sent to a more "well known host". The address specified by reply is used to generate a "Reply-To:" header in outbound mail. The "Reply-To:" header overrides the "From:" header which is the address normally used to reply to mail. This field is optional. maxlet defines the maximum number of messages that can be processed by BM in one mailbox file. The default value of maxlet is 100. mbox Specifies the default file to be used for the "save" command. This file is in the same format as a mailbox and may later be viewed using the -f option of BM. If this option is not used then the default is set to mbox. record If defined a copy of each message sent will be saved in . folder If defined folder contains the path used by the save command. screen [bios|direct] In the Turboc compiled version of BM, screen sets the display output mode to use either direct writes to screen memory or the ROM BIOS. The default is direct which provides the fastest output mode. If you are using a windowing system such as Desqview you should set the mode to bios. Here is a sample bm.rc file. - 4 - host nn2z.ampr user nn2z fullname Dave Trulli # send my replies to the Sun reply nn2z@ka9q.bellcore.com screen direct edit /bin/vi mbox c:/folder/mbox record c:/folder/outmail folder c:/folder maxlet 200 2.13.1 The\alias file The alias file provides an easy way to maintain mailing lists. An alias can be any string of characters not containing the "@" symbol. The format for the alias file is: alias recip1 recip2 recip3 recip4 Note that a long list of aliases can be continued on an additional line by placing a tab or space on the continuation line. Some examples aliases are: dave nn2z@nn2z.ampr phil karn@ka9q.bellcore.com # mail to local nnj users nnj wb2cop@wb2cop.ampr karn@ka9q.bellcore.com wb0mpq@home.wb0mpq.ampr w2kb@w2kb.ampr ka2tsm@ka2tsm.ampr In the above example, when specifying nnj as the recipient, BM will expand the alias into the list of recipients from the alias file. At this time an alias may not contain any other aliases. 2.13.2 \spool\mqueue\sequence.seq The sequence file maintains a message counter which is used by BM and SMTP to generate message ids and unique filenames. This file is created by BM. - 5 - 2.14 Environment The timezone used in mail headers is obtained from the DOS environment variable TZ. An example TZ setting is: set TZ=EDT4 It is set in your AUTOEXEC.BAT file. The first 3 characters are the timezone and the fourth character is the number of hours from GMT time. If TZ is not set, GMT is assumed. 3. Commands All BM commands are single letters followed by optional arguments. The command list has been designed to make those familiar with Berkeley mailers comfortable with BM. 3.1 Main menu commands m [userlist] The mail command is used to send a message to one or more recipients. All local recipient names ( those which don't contain an '@' ) are checked for possible aliases. If no arguments are supplied you will be prompted for a recipient list. While entering a message into the text buffer several commands are available such as: invoking an editor, and reading in text from other messages or files. See the section below for a description of these commands. To end a message enter a line containing a single period. It is important to remember that the input line buffer has a 128 character limit. You should format your text by entering a carriage return at the end of each line. Typing excessively long lines may cause data loss due to truncation when passing the message through other hosts. Keeping lines less than 80 characters is always a good idea. d [msglist] Mark messages for deletion. Messages marked for deletion are removed when exiting BM via the q command or when changing to an alternate mailbox with the n command. - 6 - h Display message headers. The message headers contain the message number, the status indicating whether it has been read or deleted, the sender, size, date, and subject. u [msglist] Undelete a message that is marked for deletion. The status of a message can be determined by looking at the status field of the message using the h command. n [mailbox] Display or change mailbox. The n command with no arguments will display a list of mailboxes containing mail. If an argument is supplied, then the current mailbox is closed and a new mailbox is opened. !cmd Run a DOS command from inside BM. An error message will result if there is not enough memory available to load the command. ? Print a help menu for BM commands. s [msglist] [file] The s command is used to save messages in a file. If no filename is given the default from the mbox variable in \bm.rc is used. If no message number is supplied then the current message is saved. The message is stored in the same format as a mailbox file with all mail headers left intact. p [msglist] The p command is used to send messages to the printer. This command uses the DOS device PRN for output. This command is equivalent to: - 7 - s [ msglist ] PRN w [msglist] file The w command is used to save messages in a file. Only the message body is saved. All mail headers are removed. If no message number is supplied then the current message is saved. f [msg] The f command is used to forward a mail message to another recipient. If no message number is supplied the current message is used. The user is prompted for the recipients and a subject. The RFC822 header is added to the message text while retaining the complete original message in the body. Also see the ~m command. b [msg] Bounce a message. Bounce is similar to forwarding but instead of your user information, the original sender information is maintained. If no message number is supplied the current message is used. r [msg] Reply to a message. Reply reads the header information in order to construct a reply to the sender. The destination information is taken from the "From:" or the "Reply- To:"header, if included. If no message number is supplied the current message is used. msg # Entering a message number from the header listing will cause the message text to be displayed. l List outbound messages. The job number, the sender, and the destination for each message is displayed. A status of "L" will appear if the SMTP sender has the file locked. - 8 - k [msglist] Remove an outbound message from the mqueue. A message can be removed from the send queue by specifying the job number obtained by the l command. If the message is locked you will be warned that you may be removing a file that is currently being sent by SMTP. You will asked if this job should still be killed. $ Update the mailbox. This command updates the mailbox, deleting messages marked for deletion and reading in any new mail that may have arrived since entering BM. x Exit to DOS without changing the data in the mailbox. q Quit to DOS updating the mailbox. 3.21 Text input commands The following commands are available while entering message text into the message buffer. ~r read into the message buffer. ~m read into the message buffer. ~p display the text in the message buffer. ~e invoke the editor defined in \bm.rc with a temporary file containing the text in the message buffer. ~q Abort the current message. No data is sent. ~~ Insert a single tilda character into the message. ~? Display help menu of tilda escape commands. - 9 - 4. Mailer Operation 4.1 Command Line Options BM may be invoked as follows: To send mail: bm [ -s subject ] recip1 .. .. recipN To read mail: bm [ -u mailbox | -f file ] -s subject This option sets the subject to the text on the command line. -u mailbox Specify which mailbox to read. This overides the default from the bm.rc. -f file Read message from "file" instead of a mailbox. 6. BugReports Please send any comments, suggestions or bug reports to: Dave Trulli Usenet: nn2z@ka9q.bellcore.com packet: nn2z@nn2z AMPRNET: nn2z@nn2z.ampr [44.64.0.10]