M M A III L M M M M AAA I L M MMM M A A I L M M M A A I L M M AAAAAAA I L M M A A I L M M A A III LLLLLL MAIL - AN ONLINE MAIL SYSTEM FOR TSX+ INTRODUCTION Mail is on online message sending system designed to run under TSX-PLUS. It allows users to send messages to other users, and to read messages that have been sent to them. Mail can be run from a logon command file or as a keyboard command (MAIL). This release of MAIL (V2.14) corrects any reported or known bugs in the previous versions, and adds more options, and a menu. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 2 The MAIL distribution consists of the files listed below. MAIL.XXX Default system mail file (post office) POSTMN.TSX Postmaster program for maintenance and setup MAILX.SAV MAIL utility program for reading/sending mail MAIL.COM System command file for running mail MAIL.DOC This documentation MAIL.BLD COMMAND FILE to build the MAIL system (FORTRAN) MF77.BLD COMMAND FILE to build the MAIL system (F77) The mail file, MAIL.XXX, is a common file, accessable by all users, that contains the names of current users, and their mes- sages.The maintenance program, POSTMN.TSX, allows the postmaster (system manager) to create a new mail file, add or delete users, and extend the mail file. The MAIL utility, MAILX.SAV, allows users to read their mail, delete their mail, or send mail to another user. The system command file, MAIL.COM, is used to tell the utility program if MAIL has been envoked from LOGON or by the user. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 3 MAIL.XXX This file is used to store USERNAMES, their addresses, and the messages for each user. Its initial size is determined by the number of users requested in the setup program (POSTMN.TSX), according to the formula: SIZE = ( USERS * 5 ) + 3 This format reserves 3 blocks for USERNAMES and ADDRESSES ( a type of directory ), and 5 blocks of messages for each user, with a default value of 19 and a maximun of 96 users. Therefore, the mail file is between 98 and 483 blocks in size. Note that although the mail file is similar in format and status (protected file), IT IS NOT A LD (logical device) DISK. Do not attempt to MOUNT or INITIALIZE it. The USERNAME is the TSX USERNAME, and is in the same format, UPPER CASE only, with twelve alpha-numeric characters maximum. Each USERNAME must be unique (no users may have the same USER- NAME). The ADDRESS is an internal pointer into the mail file to in- dicate where each user's mail is stored. Its value should never be changed. Irreversible corruption of the mail file will result. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 4 The 3 blocks of directory allows space to a maximum of 96 users, each having a unique USERNAME and ADDRESS (PO BOX). Each PO BOX is stored in 8 words, starting at location 0. That is, USER1 has their PO BOX at location 1, USER2 has their PO BOX at location 9, USER3 at location 17, etc. The first six words are the USERNAME (TSX format), word 7 is the ADDRESS, and word 8 is reserved. Each user's mail file is 5 blocks in length. However, each message is limited to 1026 characters ( 2 RT-11 BLOCKS) in length. Each message has a 10 word header, comprised of the MES- SAGE NUMBER, DATE SENT, TIME SENT, and the SENDING USER. The message is next, and is terminated by 1 or 2 null bytes. Each message is stored in this format. Thus it should be possible for the file to hold at least 15 moderately sized messages. For TSX version 6, the mail program (MAILX.SAV) can be IN- STALLED with the BYPASS privilege, instead of using the ACCESS command. This way, users have R/W access to the mail file (MAIL.XXX) while running MAIL. An example that can be inserted in the system startup file (DETACH.TSX) is shown. (Thanks to Mark Mehl of IOWA STATE UNIVERSITY for suggesting this) INSTALL ADD SY:MAILX.SAV/PRIV=BYPASS MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 5 POSTMN.TSX This program, which should only be used by the system man- ager, allows the user to setup and manage the mail system. Unauthorized users are prevented from running POSTMN.TSX. Note that it does not have to be on SY: POSTMN will initially create the mail file (MAIL.XXX), and permit addition and deletion of users. It will also list the current users entered on the mail system. The EXTEND command is not implemented. To extend the mail file for additional users, use the DUP /T command (DUP SY:MAIL.XXX=/T:n/Y) to add more mes- sage space. Note that there must be sufficient free space directly after MAIL.XXX on the disk. CREATE will make a new mailfile on the default device. It first asks if you want a new mailfile (Yes or No). If Yes, it asks for the number of users, (default of 19). It then asks if the new DEV:FILENAM.EXT of SIZE is correct. If Yes is entered, a new mail file is created, else the CREATE is aborted. ADD will insert new users into the mail file. It will prompt for the USERNAME, which must be the same as the TSX USER- NAME, and in UPPER CASE. It may be any printable character, ex- cept !, as long as it is a valid TSX USERNAME. Its length is limited to 12 characters. For ease of sending messages, the MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 6 USERNAME should be only alpha-numeric characters. If the USER- NAME entered already exists in the mailfile, the name is reject- ed, and a message is printed. After creating a new mail file, the easiest way to enter all new users is to run TSAUTH, create a charge file (CHARGE.TSX), edit the file so it contains only the USERNAMES (remember to re- move the trailing spaces after the USERNAME), and then use this as a command file to input the names, as shown below. ^>R POSTMN.TSX A NAME1 A NAME2 A NAME3 ........ L Q where NAMEn are the USERNAMES from the edited charge file (CHARGE.TSX). DELETE will remove the requested USERNAME from the mail sys- tem. If the name is in the mail system, it will ask for verifi- cation to delete (Yes or No). If the name to delete does not exist, a message is printed. LIST will list, along with the address, the USERNAME of each user on the mail system. It will also give the total number of users. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 7 MAILX.SAV MAILX is the utility the allows reading/sending/deleting of messages. Using MAILX is almost idiot-proof, as it is menu-driven, and all valid commands are shown on the screen. Using the mail system is quite simple. Simply enter MAIL [optionalcommand]. If no command is entered, the menu of com- mands is printed, and the mail-prompt is shown. The user then enters the desired command. If an optional command is given, the requested action occurs. A[,F] Write to All users S Send mail M Number of messages E Exit R Read mail F Message text from a File H Help (this menu) The A command allows a privileged user to send a message to all users of the mail system. The optional F command will prompt for the text file that contains the message. If the prompted file does not exist, the sender is advised, and given the choice of aborting or retrying the attempt. All users, except auto-start lines, are then sent the message "You have mail". The M command allows a user to see how many messages are in their mail box. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 8 The R command allows a user to read their mail, listing each message one at a time. Each message is listed, preceded by a header consisting of message number, date and time sent, and who sent the message. At the end of each message, the user has the option of reading the next message, deleting the message, reply- ing to the message, printing the message, or quiting and return- ing to the menu. The PRINT MAIL option (P) will give the user a hard-copy of the current message. It is printed an the system printer ( LP: FORTRAN UNIT 6 ). This can be changed if you site does not have a device LP: (ASS LS LP). If the P option is chosen, the user can also specify an optional device to print to. P Print the current message on device LP: P LN: Print the current message on device LN: P DK: Copy the current message to file MSG.nnn on device DK: where nnn is the message-number P LD2: Copy the current message to file MSG.nnn on device LD2: If the device specified is not valid, the user is again prompted for an option. The R option will allow a user to send a reply to the mes- sage, and the D option will delete the current message. The S command allows a user to send a message. They are prompted for the USERNAME to send mail to. Simply enter the TSX USERNAME, the same one as shown by the TSX W (SHOW JOBS) command. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 9 If the USERNAME exists in the directory, they are then prompted for the message. The message can be any text string, each line having a maximum of 80 characters, and each message having a max- imum of 1026 characters. The message is terminated by CONTROL-D ( ^D ) or .D or .d (.D being the first and only character of a new line, after the * prompt). The sender is then advised that the message has been sent. This process takes at least 4 seconds. When the actual writing into the mail file is taking place, the user is prevented from ^C-ing out of the pro- gram. The user can also abort the S command by entering a .A or .a (.A is the same format as .D). The F command is similar to the S command, but the message text is taken from a specified file, instead of entered interac- tively. When a message is sent, the receiving party, if logged on, is sent the message "You have mail". To prevent messages from being lost, an access control is done on each individual mail box. That is, only one user may re- quest a write into a specific mail box at any one time. For ex- ample, if USER1 is sending a message to USER5, and USER3 wants to also send a message to USER5, only one user will have access to write into USER5's mailbox, while the other user will be advised of a short wait (usually a few seconds). This occurs only at the MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 10 actual write into the mailbox, so the sending users can still enter their messages without any wait. Privacy is provided by allowing only a specific user to read only their mail, as determined by the USERNAME. Thus, USER2 may only read the messages in the mail box assigned to USER2, and not the mail boxes assigned to USER1 or USER9. However, this can be overcome is USER2 has SETNAME privilege (TSX V6.2) or by using the NAME program (DECUS RT SIG TAPE). If USER2 changes their USERNAME to USER6, they will be able to read USER6's messages. Security is provided by having the entire mailfile (MAIL.XXX) encrypted. Thus, dumping the file (DUMP/OUT:TT: SY:MAIL.XXX) will print only gibberish. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 11 Summarizing, MAIL may be run with the following options: COMMAND [OPTION] RESULT MAIL Envokes MAILX menu MAIL L Runs MAILX in LOGON mode (read mail only) MAIL R Runs MAILX for reading mail only MAIL S Runs MAILX for sending mail only MAIL M Runs MAILX for number of messages only MAIL A[,F] Runs MAILX for write to all users MAIL F Runs MAILX for sending a message from a file For long messages, MAILX can be envoked from a command file as follows: ^>MAIL S ! Run MAILX in SEND mode USERNAME ! USERNAME of receiving party MESSAGE ! BODY ... ! OF ... ! MESSAGE MESSAGE ! ^D ! ^D TERMINATOR MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 12 MAIL.COM The command file, MAIL.COM, controls the operation of MAILX.SAV. The file is simply R MAILX ^1 where it is envoked by typing MAIL ^1 (or @SY:MAIL.COM ^1), where ^1 is replaced by one of the optional commands given on the preceding page. Normal operation is "MAIL". This gives the menu, and then the mail prompt (MAIL>). LOGON mode checks the USERNAME, checks for mail, and the asks if the user wishes to read the mail. This is usually done only in the TSX LOGON FILE by the command "@SY:MAIL.COM L". READ mode will bypass the questions and start to list any messages. SEND mode will again bypass any questions and prompt for the username and then the message. If a privileged user wishes to send mail to all users, he may use the A option, which functions as the write options (S), but does not prompt for a USERNAME. The user inputs a message, and it is sent to all users. The M option allows a user to check how many messages there are in their mailbox, without having to actually go through the entire mail file. MAIL - AN ON-LINE MAIL SYSTEM FOR TSX+ Page 13 MAIL SYSTEM The mail system is built by envoking the command file MAIL.BLD for FORTRAN, or MF77.BLD for FORTRAN-77. The mail pro- gram also needs to be linked with TSXLIB (DECUS RT SIG TAPE). A copy of a runable MAILX.SAV and POSTMN.TSX with a default mail- file of SY:MAIL.XXX are included on the distribution, for sites that do not have a copy of TSXLIB. Before building the system, edit the line in SUBROUTINE "FILE.FOR" to define the device and filename for the system mail file. The defalt name is SY:MAIL.XXX (in RAD50). Be sure that users of the mail system have R/W ACCESS to this file, either with the ACCESS command, or by INSTALLING MAILX with /PRIV=BYPASS DATA FNAME/3RSY ,3RMAI,3RL ,3RXXX/ The author would appreciate any comments or suggestion, by mail, at the address below, or by BITNET (path given below) M. P. (MIKE) MARAK LOYOLA EMC LAB Department of Electrical Engineering ROOM AD-532 LOYOLA CAMPUS / CONCORDIA UNIVERSITY 7141 SHERBROOKE ST. W. MONTREAL, CANADA (514) 848-3118 BITNET ADDRESS MUFFY@CONU1