Trailing-Edge
-
PDP-10 Archives
-
decuslib10-11
-
43,50527/mail.bli
There are no other files named mail.bli in the archive.
Module Mailer(Stack,Ccl,Version=2A(22)-2,Reserve(1,2,3,4))=
Begin
%
* M A I L E R *
DECSYSTEM-10
TOPS-10
Monitor Version 7.01
Bliss-10 Version 7B(222) or 7E(227)
Written by Edward J. Bennett
August 1978
Modified for NRAO Very Large Array by
Edward J. Bennett
and
David L. Edwards Jr.
January 1982
MAILER is a user communications package for use under TOPS-10. This
package requires access via directory protection or by allowing
access via FILDAE.
%
Require MACHOP.BLI;
Require MACROS.BLI;
Require EXTERN.BLI;
External
Checkmail,
Display,
Whois,
Getdate,
Sendmail,
Readmail,
Change,
Help,
Finuname;
Own Cmd[2],tmp[2],CCL;
%
MAILER File formats:
.ACCT..MLR:
!-------------------------------!
ACCNM1 ! Uname (Word 1) !
!-------------------------------!
ACCNM2 ! Uname (Cont.) !
!-------------------------------!
ACCUS1 ! User name !
!-------------------------------!
ACCUS2 ! User name (Cont.) !
!-------------------------------!
ACCMLF ! Mail File !
!-------------------------------!
ACCMFE ! Mail File Extension !
!-------------------------------!
ACCMFD ! Mail File Device !
!-------------------------------!
ACCPPN ! PPN !
!-------------------------------!
ACCPAS ! Password (Sixbit) !
!-------------------------------!
ACCPRV ! Privword !
!-------------------------------!
ACCGP1 ! Group 1 (Sixbit) !
!-------------------------------!
ACCGP2 ! Group 2 (Sixbit) !
!-------------------------------!
ACCGP3 ! Group 3 (Sixbit) !
!-------------------------------!
ACCGP4 ! Group 4 (Sixbit) !
!-------------------------------!
ACCGP5 ! Group 5 (Sixbit) !
!-------------------------------!
! Reserved (15) !
!-------------------------------!
! Reserved (16) !
!-------------------------------!
! Reserved (17) !
!-------------------------------!
! Reserved (18) !
!-------------------------------!
! Reserved (19) !
!-------------------------------!
ACCFNM ! Real name (Ascii) !
\ /
/ \
! !
!-------------------------------!
! 000000000000 !
!-------------------------------!
! 777777777777 !
!-------------------------------!
MAILFILE: !-------------------------------!
MLFNM1 ! Uname (Sixbit) !
!-------------------------------!
MLFNM2 ! Uname (Cont.) !
!-------------------------------!
MLFUS1 ! User name !
!-------------------------------!
MLFUS2 ! User name (Cont.) !
!-------------------------------!
MLFPPN ! PPN !
!-------------------------------!
MLFLOC ! Location (Sixbit) !
!-------------------------------!
MLFTIM ! Time !
!-------------------------------!
MLFDAT ! Month ,, Day !
!-------------------------------!
MLFYER ! Year !
!-------------------------------!
MLFTTY ! TTY # !
!-------------------------------!
MLFFLG ! Flag word !
!-------------------------------!
MLFSDT ! Date message sent !
!-------------------------------!
MLFEXP ! Date message expires !
!-------------------------------!
MLFGRP ! Group sent to !
!-------------------------------!
MLFRS2 ! Reserved (14) !
!-------------------------------!
MLFRS3 ! Reserved (15) !
!-------------------------------!
MLFRS4 ! Reserved (16) !
!-------------------------------!
MLFRS5 ! Reserved (17) !
!-------------------------------!
MLFRS6 ! Reserved (18) !
!-------------------------------!
MLFRS7 ! Reserved (19) !
!-------------------------------!
MLFVAR ! Subject (Ascii) !
\ /
/ \
! !
!-------------------------------!
! 000000000000 !
!-------------------------------!
! Message (Ascii) !
\ /
/ \
! !
!-------------------------------!
! 000000000000 !
!-------------------------------!
! 777777777777 !
!-------------------------------!
DATEFILE: !-------------------------------!
! Uname (Sixbit) !
!-------------------------------!
! Uname (Cont.) !
!-------------------------------!
! Date !
!-------------------------------!
OR
!-------------------------------!
! -2 !
!-------------------------------!
! PPN !
!-------------------------------!
! Date !
!-------------------------------!
%
% Edit History
1(1) 11/20/81 DLE Installed mailer.
1(2) 11/22/81 DLE Added .DATE. file to process system mail better.
1(3) 11/25/81 DLE Added CCL linkage and display command.
1(4) 11/26/81 DLE Improved SAVEMAIL routine.
1(5) 11/26/81 DLE Improved CHECKMAIL routine.
1(6) 11/28/81 DLE Clean up and enhancments.
1(7) 11/30/81 DLE Fix bug in INFORM.
1(10) 11/30/81 DLE Changed DISPLAY routine to use TRMOP.
1A(11) 12/1/81 DLE Made new system mail read at login
2(12) 12/2/81 DLE Rewrote READMAIL,SENDMAIL,SAVEMAIL
2(13) 1/28/82 DLE Major changes in all modules
2(14) 1/28/82 DLE Added WHOIS GROUP: to list all known groups
2(15) 2/24/82 DLE Fixed error ?Date file being modified when logging in
2A(16) 2/25/82 DLE Added software interrupts and PSI module
2A(17) 2/25/82 DLE Fixed busy mailbox problem in SENDMA
2A(20) 2/25/82 DLE Added SUMMARY command and cleaned up READMA
2A(21) 2/25/82 DLE Fixed problem with two unames not unique enough in a PPN
2A(22) 2/25/82 DLE Fixed another bug in parsing SUMMARY command
End Of Edit History %
%
Main Program
%
CCL _ .VREG;
Reset;
Psiini(); % Init Software Int system %
Psion(); % Turn on PSI system %
Summary _ Login _ FALSE;
If .CCL then
Begin
Login _ TRUE;
Getppn(Ac1);
tmp[0] _ .ac1;
acct[accnm1] _ -2;
acct[accnm2] _ .tmp[0];
sysdate _ getdate(-2,.tmp[0],FALSE);
if (NOT batch()) then readmail(sixbit'SYSTEM',sixbit'NEW');
Display(.tmp[0]);
Psioff();
Runexit(sixbit'MAI');
End;
Psinrm();
Print('?M?J?JMAILER Version 2A(22)-2?M?JUname: ');
uname1 _ sixin(0,12);
if .ac1 EQL 0 then uname2 _ .ac2 else uname2 _ 0;
Finuname(.uname1,.uname2);
Psinrm();
Reset;
Noecho();
If (.acct[accpas] NEQ 0) THEN
BEGIN
Print('?M?JPassword: ');
IF sixin(0,6) NEQ .acct[accpas] THEN
BEGIN
Print('?M?J?G??MAIIPS Invalid Password?M?J');
Echo();
Stop;
END;
END;
Crlf;
Echo();
Sysdate _ Getdate(.uname1,.uname2,FALSE);
Checkmail();
WHILE True DO
BEGIN
reset;
Cmd _ 0;
While .Cmd EQL 0 do
Begin
Print('MAILER> ');
ac2 _ Byteptr(Address(Cmdbuff));
cmd _ Rdtty(.ac2,maxcmd);
End;
cmd _ Byteptr(Address(Cmdbuff));
Scani(cmd);
cmd[0] _ sixin(.cmd,-12);
cmd[1] _ .ac3; ! Save the pointer
If (.cmd[0] EQL sixbit 'SUMMAR') then
If (scann(cmd[1]) EQL "Y")OR(scann(cmd[1]) EQL "y") then scani(ac3);
if unique(.cmd,sixbit'ALTER',1) then cmd _ sixbit'ALTER';
if unique(.cmd,sixbit'CHECK',1) then cmd _ sixbit'CHECK';
if unique(.cmd,sixbit'END',1) then cmd _ sixbit'END';
if unique(.cmd,sixbit'EXIT',1) then cmd _ sixbit'END';
if unique(.cmd,sixbit'HELP',1) then cmd _ sixbit'HELP';
if unique(.cmd,sixbit'SUMMAR',2) then cmd _ sixbit'SUMMAR';
if unique(.cmd,sixbit'READ',1) then cmd _ sixbit'READ';
if unique(.cmd,sixbit'SEND',2) then cmd _ sixbit'SEND';
if unique(.cmd,sixbit'WHOIS',1) then cmd _ sixbit'WHOIS';
Psicrt();
SELECT .cmd OF
NSET
sixbit'WHOIS':BEGIN
uname1 _ sixin(.ac3,12);
if .ac1 EQL 0 then uname2 _ .ac2 else uname2 _ 0;
if (.ac1 EQL ":")AND(.uname1 EQL sixbit'GROUP') then uname2 _ .ac2;
Psinrm();
Whois(.uname1,.uname2);
END;
sixbit'ALTER':BEGIN
uname1 _ sixin(.ac3,12);
if .ac1 EQL 0 then uname2 _ .ac2 else uname2 _ 0;
Change(.uname1,.uname2);
END;
sixbit'CHECK':BEGIN
Psinrm();
Checkmail();
END;
sixbit'READ':BEGIN
tmp[0] _ sixin(.ac3,12);
if (.ac1 EQL " ") then tmp[1] _ .ac2 else tmp[1] _ 0;
Readmail(.tmp[0],.tmp[1]);
END;
sixbit'SUMMAR':Begin
tmp[0] _ sixin(.ac3,12);
if (.ac1 EQL " ") then tmp[1] _ .ac2 else tmp[1] _ 0;
Psinrm();
Summary _ TRUE;
Readmail(.tmp[0],.tmp[1]);
Summary _ FALSE;
End;
sixbit'SEND':BEGIN
Sendmail(-1,.ac3,0); ! Scan command line
END;
sixbit'HELP':BEGIN
Psinrm();
Help();
END;
sixbit'END':BEGIN
Echo();
Checkmail();
Psioff();
Stop;
END;
0:0;
otherwise:Print('?G??MAIINC Invalid command - Type HELP?M?J');
always:Psinrm();
TESN;
END;
END
ELUDOM