W MX030.LMX030.LYBACKUP/INTERCHANGE/BLOCK=8192 MX_CONTRIB_LIST.TXT,[-.CONTRIB]*.*; SYS$DISK:[]MX030.L/SAVE MADISON ?`x/5*V5.4 _ECS01::  _$50$DUA64: V5.4  )*[MX.KIT]MX_CONTRIB_LIST.TXT;2+,V./> 4A-g 0123KPWO56@7`3*89` Z!G>HJ6MX_TMP 00README.TXT MX_INSTALL_ROOT:[CONTRIB]6MX_TMP ALL-IN-1_TO_MX.TXT MX_INSTALL_ROOT:[CONTRIB]6MX_TMP ALL-IN-1_TO_MX_2.TXT MX_INSTALL_ROOT:[CONTRIB]AMX_TMP DECNET_NAME_CONVERSION.VMS_SHARE MX_INSTALL_ROOT:[CONTRIB]9MX_TMP HELP_FILE.VMS_SHARE MX_INSTALL_ROOT:[CONTRIB]6MX_TMP MAIL_NEWS.VMS_SHARE MX_INSTALL_ROOT:[CONTRIB]<MX_TMP MAIL_VERIFICATION.VMS_SHARE MX_INSTALL_ROOT:[CONTRIB]5MX_TMP MXSUM.VMS_SHARE MX_INSTALL_ROOT:[CONTRIB]3MX_TMP MX_ALIAS.COM MX_INSTALL_ROOT:[CONTRIB]6MX_TMP MX_BULL.VMS_SHARE MX_INSTALL_ROOT:[CONTRIB]:MX_TMP TROUBLESHOOTING_GUIDE.TXT MX_INSTALL_ROOT:[CONTRIB]6MX_TMP VMSMAIL_PATCH.TXT MX_INSTALL_ROOT:[CONTRIB] MX030.L@Uj[MX.CONTRIB]00README.TXT;4P*[MX.CONTRIB]00README.TXT;4+,@./> 4P-Uj0123KPWO56z74*89` Z!G>HJ EThe files in this directory are various add-ons for MX that have beenDdeveloped by MX users who were kind enough to make them available tothe general public.,File DescriptionP--------------------------- -----------------------------------------------MALL-IN-1_TO_MX.TXT Describes how to interface MX with ALL-IN-1.F From George Greenwade and Jim Gaynor.LALL-IN-1_TO_MX_2.TXT More information on interfacing MX with A1.3 From Rob McMillan.LDECNET_NAME_CONVERSION.VMS_SHARE NAME_CONVERSION module that converts DECnetL "node::user" addresses to "user%node.dnet".0 From Earle Ake.MHELP_FILE.VMS_SHARE Help for MX, suitable for use with VMS HELP.0 From Earle Ake.LMAIL_NEWS.VMS_SHARE Software for gatewaying a mailing list withL a news group, for use with MX and ANU News.2 From Ted Nieland.OMAIL_VERIFICATION.VMS_SHARE A command procedure that watches MX accountingN logs and informs the sender of a message thatK it has been delivered. From John Clement.HMXSUM.VMS_SHARE Software for generating reports from MXE accounting data. From Harold McKee.KMX_ALIAS.COM A command procedure for easy definition ofK logical name-type aliases to MX addresses.3 From Anil Khullar.LMX_BULL.VMS_SHARE Software for gatewaying a mailing list into@ BULLETIN. From Hunter Goatley.NTROUBLESHOOTING_GUIDE.TXT A collection of common problems and solutionsI for various versions of MX. Compiled by+ Earle Ake.OVMSMAIL_PATCH.TXT A patch for the VMS MAIL utility that obviatesJ the need to use the MX% prefix on networkF mail addresses. From Rick Westerman. DISCLAIMER:NThis software is provided "AS IS". Rensselaer Polytechnic Institute disclaimsIall warranties on the software, including without limitation, all implied*warranties of merchantability and fitness.?>>> Please review these files before using them on your system!NProblems with software contained in these files should be reported directly tothe author of the software. *[MX.CONTRIB]ALL-IN-1_TO_MX.TXT;1+,j . /> 4L V-Uj0123KPWO 56t7.4*89` Z!G>HJNewsgroups: vmsnet.mail.mxPath: rpi!rpigate!x?From: bed_gdg%SHSU.BITNET@vms.ecs.rpi.edu (George D. Greenwade)'Subject: RE: All-in-1 addresses for MX?1Message-ID: <0094739E.BAA9E320.20746@SHSU.BITNET>Date: 17 Apr 91 00:17:56 GMT Lines: 110CSome time back, I asked about addressing mail in All-in-1 so it wasJcompatible with MX. A few people said that they were interested, as well,Hand requested that I report what I found. A very kind soul, Jim Gaynor,H contacted me today andHprovided a fix in the OALIB:SPECIAL.COM file which drives a part of A1'sCmail interface so it supports MX (address to _user@host.net in A1).JMany, many thanks to Jim for the code (I was beginning to think this was aKlost cause). Since I have lost the messages from those asking for a reportGon this and it may be of wider interest, I include the SPECIAL.COM fileIbelow (in hopes that, although it isn't a direct MX application, it might2make it to .CONTRIB for others who might need it).FRegards (on my last post of the day to the list -- promise!), GeorgeK%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%KGeorge D. Greenwade, Ph.D. Bitnet: BED_GDG@SHSUKDepartment of Economics and Business Analysis THEnet: SHSU::BED_GDGKP. O. Box 2118 Voice: (409) 294-1266KSam Houston State University FAX: (409) 294-3612KHuntsville, TX 77341 Internet: bed_gdg%shsu.decnet@relay.the.netK%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%0 Customization Management: Element Print as of 02:36pm on 16-Apr-1991LElement name: SPECIAL Type: COMLanguage: SHARE5Description: SPECIAL mail destination processing0Created on: 11-Mar-1991 11:08am by MANAGER0Last Modified on: 11-Mar-1991 11:08am by MANAGERMade live on: 11-Mar-1991JReference: Changed for MX% mailing... Live: YJApplication: Digital: YStatus: FreeLast User: MANAGERDetails:/Changed in order to support MX% mailing (SMTP).File contents:?$ ! OALIB:SPECIAL.COM V2.1A Last edited: 4-Nov-1985!$ ! Electronic Mail Subsystem1$ ! Deliver mail to the "SPECIAL" destination$ !$$ ASSIGN/USER NLA0: SYS$OUTPUT#$ ASSIGN/USER NLA0: SYS$ERROR%$ ON WARNING THEN GOTO NOT_SENT>$ ORIG_DIR :== 'F$LOGICAL("SYS$DISK")''F$DIRECTORY()'.$ MY_NODE := 'F$LOGICAL("SYS$NODE")$$ UNDERLINE_LOOP:F$ IF "''F$EXTRACT(0,1,MY_NODE)'" .NES. "_" THEN GOTO SETUP_PARAM0$ MY_NODE := 'F$EXTRACT(1,99,MY_NODE)$ GOTO UNDERLINE_LOOP$$ SETUP_PARAM:7$ WRITE OAMAILBOX "OA GET PROFIL.DIRECT[OA$USER]"$ @DCLMAILBOX:+$ HOME_DIR := "''RESULT'"*$ WRITE OAMAILBOX "OA GET #MAILSUBJ"$ @DCLMAILBOX:#$ SUBJ := "''RESULT'"*$ WRITE OAMAILBOX "OA GET #MAILFILE"$ @DCLMAILBOX:$ FILE := 'RESULT*$ WRITE OAMAILBOX "OA GET #MAILNODE"$ @DCLMAILBOX:$ NODE := 'RESULT*$ IF NODE .EQS. "" THEN GOTO SEND_ITJ$ IF 'F$LOCATE("::",NODE) .EQ. 'F$LENGTH(NODE) THEN NODE := 'NODE'::7$ IF "''MY_NODE'" .EQS. "''NODE'" THEN NODE := ""0$ WRITE OAMAILBOX "OA GET OA$STATUS=""1"""$ @DCLMAILBOX:$ $ SEND_IT:*$ WRITE OAMAILBOX "OA GET #MAILADDR"$ @DCLMAILBOX:*$ TO := "''NODE'''RESULT'"$ LOOP1:<$ IF F$EXTRACT(0,1,TO) .NES. "_" THEN GOTO REALLY_SEND+$ TO := 'F$EXTRACT(1,99,TO)$ GOTO LOOP1$ REALLY_SEND:$$ ASSIGN/USER NLA0: SYS$OUTPUT#$ ASSIGN/USER NLA0: SYS$ERROR$ SET DEFAULT 'HOME_DIR=$ TO = "MX%" + """""" + F$EDIT(TO,"LOWERCASE") + """"""+$ OPENY$3 MX030.Lj Uj [MX.CONTRIB]ALL-IN-1_TO_MX.TXT;1L 8 /WRITE OUTFILE SPECIAL_TEMP.COM$ WRITE OUTFILE "$MAIL"2$ WRITE OUTFILE "SEND/NOEDIT/NOSELF ''FILE'"$ WRITE OUTFILE "''TO'"$ WRITE OUTFILE "''SUBJ'"$ WRITE OUTFILE "EXIT"$ WRITE OUTFILE "$EXIT"$ CLOSE OUTFILE$ @SPECIAL_TEMP+$ DELETE/NOCONFIRM SPECIAL_TEMP.COM.*'$! MAIL/SUBJ="''SUBJ'" 'FILE' 'TO'!$! IF $STATUS THEN GOTO DONE$! $! NOT_SENT:$! Status = '$STATUS8$! WRITE OAMAILBOX "OA GET OA$STATUS=""''STATUS'"""$! @DCLMAILBOX:$ DONE:$ SET DEFAULT 'ORIG_DIR $ EXIT"*[MX.CONTRIB]ALL-IN-1_TO_MX_2.TXT;1+,j. /> 4N -Uj0123KPWO 566γ27c!4*89` Z!G>HJ2Xref: rpi vmsnet.mail.mx:133 vmsnet.mail.pmdf:1843BPath: rpi!usc!samsung!munnari.oz.au!brolga!uqvax.cc.uq.oz.au!ccrobFrom: ccrob@uqvax.cc.uq.oz.au+Newsgroups: vmsnet.mail.mx,vmsnet.mail.pmdf%Subject: All-In-One mail via PMDF, MX6Message-ID: <1991May10.114356.15398@uqvax.cc.uq.oz.au>Date: 10 May 91 01:43:56 GMTIOrganization: The Prentice Centre, Uni of Queensland, Brisbane, Australia Lines: 1029A little while ago, George Greenwade posted an article inCvmsnet.mail.mx for a fix to a problem that exists when interfacing LAll-In-One (v2.1A) mail with MX. The solution is equally applicable to PMDF.IHe posted an updated copy of the command file SPECIAL.COM. Unfortunately,Gthis can "hang" if users have the /CC qualifier set as default in their:VMS mail account. To fix this, replace the following line,2$ WRITE OUTFILE "SEND/NOEDIT/NOSELF ''FILE'"to7$ WRITE OUTFILE "SEND/NOEDIT/NOSELF/NOCC ''FILE'"FThis should solve any problems. The new version of SPECIAL.COM appearsbelow.DVersion 2.4 of A1 has a slightly different SPECIAL.COM. However, theBchanges appear to be mostly cosmetic, with apparently no change infunctionality.G(BTW - thanks Ned, Jim and George for alleviating a thorn in our side).Cheers,Rob.N----------------------+-------------------------------------------------------NRob McMillan | E-mail: ccrob@uqvax.cc.uq.oz.au (DTE 050527372000094)NAsst Systems Prog | Phone: +61 07 365 4290 FAX: +61 07 365 4477NThe Prentice Centre | Post: University of Queensland, QLD 4072, AUSTRALIANvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv?$ ! OALIB:SPECIAL.COM V2.1A Last edited: 4-Nov-1985!$ ! Electronic Mail Subsystem1$ ! Deliver mail to the "SPECIAL" destination$ !$$ ASSIGN/USER NLA0: SYS$OUTPUT#$ ASSIGN/USER NLA0: SYS$ERROR%$ ON WARNING THEN GOTO NOT_SENT>$ ORIG_DIR :== 'F$LOGICAL("SYS$DISK")''F$DIRECTORY()'.$ MY_NODE := 'F$LOGICAL("SYS$NODE")$$ UNDERLINE_LOOP:F$ IF "''F$EXTRACT(0,1,MY_NODE)'" .NES. "_" THEN GOTO SETUP_PARAM0$ MY_NODE := 'F$EXTRACT(1,99,MY_NODE)$ GOTO UNDERLINE_LOOP$$ SETUP_PARAM:7$ WRITE OAMAILBOX "OA GET PROFIL.DIRECT[OA$USER]"$ @DCLMAILBOX:+$ HOME_DIR := "''RESULT'"*$ WRITE OAMAILBOX "OA GET #MAILSUBJ"$ @DCLMAILBOX:#$ SUBJ := "''RESULT'"*$ WRITE OAMAILBOX "OA GET #MAILFILE"$ @DCLMAILBOX:$ FILE := 'RESULT*$ WRITE OAMAILBOX "OA GET #MAILNODE"$ @DCLMAILBOX:$ NODE := 'RESULT*$ IF NODE .EQS. "" THEN GOTO SEND_ITJ$ IF 'F$LOCATE("::",NODE) .EQ. 'F$LENGTH(NODE) THEN NODE := 'NODE'::7$ IF "''MY_NODE'" .EQS. "''NODE'" THEN NODE := ""0$ WRITE OAMAILBOX "OA GET OA$STATUS=""1"""$ @DCLMAILBOX:$ $ SEND_IT:*$ WRITE OAMAILBOX "OA GET #MAILADDR"$ @DCLMAILBOX:*$ TO := "''NODE'''RESULT'"$ LOOP1:<$ IF F$EXTRACT(0,1,TO) .NES. "_" THEN GOTO REALLY_SEND+$ TO := 'F$EXTRACT(1,99,TO)$ GOTO LOOP1$ REALLY_SEND:$$ ASSIGN/USER NLA0: SYS$OUTPUT#$ ASSIGN/USER NLA0: SYS$ERROR$ SET DEFAULT 'HOME_DIR=$ TO = "MX%" + """""" + F$EDIT(TO,"LOWERCASE") + """"""+$ OPEN/WRITE OUTFILE SPECIAL_TEMP.COM$ WRITE OUTFILE "$MAIL"2$! WRITE OUTFILE "SEND/NOEDIT/NOSELF ''FILE'"7$ WRITE OUTFILE "SEND/NOEDIT/NOSELF/NOCC ''FILE'"$ WRITE OUTFILE "''TO'"$ WRITE OUTFILE "''SUBJ'"$ WRITE OUTFILE "EXIT"$ WRITE OUTFILE "$EXIT"$ CLOSE OUTFILE$ @SPECIAL_TEMP+$ DELETE/NOCONFIRM SPECIAL_TEMP.COM.*'$! MAIL/SUBJ="''SUBJ'" 'FILE' 'TO'!$! IF $STATUS THEN GOTO DONE$! $! NOT_SENT:$! Status = '$STATUS8$! WRITE OAMAILBOX "OA GET OA$STATUS=""''STATUS'"""$! @DCLMAILBOX:$ DONE:$ SET DEFAULT 'ORIG_DIR $ EXIT.*[MX.CONTRIB]DECNET_NAME_CONVERSION.VMS_SHARE;3+,j.!/> 4M!!<-Uj0123KPWO"56uO7*4*89` Z!G>HJ6$! ------------------ CUT HERE -----------------------($ v='f$verify(f$trnlnm("SHARE_VERIFY"))'$!A$! This archive created by VMS_SHARE Version 7.2-007 22-FEB-19902$! On 25-SEP-1991 15:32:47.65 By user MADISON $!$! This VMS_SHARE Written by:*$! Andy Harper, Kings College London UK$!$! Acknowledgements to:+$! James Gray - Original VMS_SHARE<$! Michael Bednarek - Original Concept and implementation$!<$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER2$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )$!9$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:$! 1. MX_START.DIFF;1$! 2. MX_STARTUP.DIFF;1!$! 3. NAME_CONVERSION.C;142$! $set="set"$$set symbol/scope=(nolocal,noglobal)?$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))#$e="write sys$error ""%UNPACK"", "#$w="write sys$output ""%UNPACK"", ")$ if f$trnlnm("SHARE_LOG") then $ w = "!"$ ve=f$getsyi("version")7$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START*$ e "-E-OLDVER, Must run at least VMS 4.4"$ v=f$verify(v) $ exit 44.$UNPACK: SUBROUTINE ! P1=filename, P2=checksum2$ if f$search(P1) .eqs. "" then $ goto file_absent,$ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'*$ exit $file_absent:+$ if f$parse(P1) .nes. "" then $ goto dirok$ dn=f$parse(P1,,,"DIRECTORY")*$ w "-I-CREDIR, Creating directory ''dn'."$ create/dir 'dn'$ if $status then $ goto dirok:$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'*$ exit$dirok:($ w "-I-PROCESS, Processing file ''P1'."7$ if .not. f$verify() then $ define/user sys$output nl:1$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'HPROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(MSUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=ECREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));FLOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(MBEGINNING_OF(b));g:=0;LOPw MX030.LjUj.[MX.CONTRIB]DECNET_NAME_CONVERSION.VMS_SHARE;3M!OP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);KIF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;KMOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;MERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=G1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";MPOSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);MERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;FCOPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,+"output_file"));ENDPROCEDURE;Unpacker;QUIT;$ delete/nolog 'f'*$ CHECKSUM 'P1'+$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT-$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."$ ENDSUBROUTINE$START: $ create 'f' X************&XFile MX_ROOT:`5BEXE`5DMX_START.COM;24;X 128 $ IF F$TRNLNM ("MX_SITE_NAME_CONVERSION") .NES. ""X 129 $ THENX 130 $ icmd := createMX 131 $ IF F$FILE_ATTR ("MX_SITE_NAME_CONVERSION:.EXE","KNOWN") THEN icm Vd := replace3X 132 $ INSTALL 'icmd' MX_SITE_NAME_CONVERSIONX 133 $ ENDIFX 134 $ icmd := createX******&XFile MX_ROOT:`5BEXE`5DMX_START.COM;23X 128 $ icmd := create X************X'XNumber of difference sections found: 1&XNumber of difference records found: 6XMXDIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=MX_ROOT:`5BEXAMPLES`5DMX_START.DIFF;1V-&X MX_ROOT:`5BEXE`5DMX_START.COM;24-%X MX_ROOT:`5BEXE`5DMX_START.COM;23'$ CALL UNPACK MX_START.DIFF;1 755374048 $ create 'f' X************3XFile SYS$COMMON:`5BSYS$STARTUP`5DMX_STARTUP.COM;90LX 28 $ DEFINE/SYSTEM/EXEC MX_SITE_NAME_CONVERSION MX_EXE:NAME_CONVERSION X 29 $!X******3XFile SYS$COMMON:`5BSYS$STARTUP`5DMX_STARTUP.COM;89 X 28 $! X************X'XNumber of difference sections found: 1&XNumber of difference records found: 1XMXDIFFERENCES /IGNORE=()/MERGED=1/OUTPUT=MX_ROOT:`5BEXAMPLES`5DMX_STARTUP.DIFFV;1-3X SYS$COMMON:`5BSYS$STARTUP`5DMX_STARTUP.COM;90-2X SYS$COMMON:`5BSYS$STARTUP`5DMX_STARTUP.COM;89)$ CALL UNPACK MX_STARTUP.DIFF;1 744826234 $ create 'f'X/*X!++X!#X! MODULE: `09 NAME_CONVERSIONX!X! FACILITY: `09 MX examplesX!DX! ABSTRACT: `09 Example of site-installable nickname conversion.X!X! MODULE DESCRIPTION:X!GX! This module contains routines for use by MX modules (specifically,JX! the MX_MAILSHR interface to VMS Mail and the MX_ROUTER agent process)LX! for translating between a ctual VMS usernames and site-specific aliases.X!FX! This module contains a fairly primitive lookup table to implementX! the translation.X!KX! To use this module: MODIFY IT AS NEEDED FOR YOUR SITE, then compile it#X! and link it with the commands:X!X! $ cc name_conversion;X! `09$ link/share/notrace name_conversion,sys$input:/opt#X! `09 sys$share:vaxcrtl/share*X! `09 universal=init,convert,cleanupX! `09 X!DX! Then copy it to MX_EXE and make it available with the commands:X!:X! `09$ copy name_conversion.exe mx_exe:/protection=w:reAX! `09$ install create mx_exe:name_conversion/share/open/headerKX! `09$ define/system/exec mx_site_name_conversion mx_exe:name_conversion>X! `09$ mcp reset router ! to force Router to load the codeX!9X! (You need a suitably privileged account to do this.)X!X! AUTHOR: `09 M. MadisonHX! `09 `09 COPYRIGHT `A9 1990, RENSSELAER POLYTECHNIC INSTITUTE.X!IX! THIS SOFTWARE IS PROVIDE "AS IS". NEITHER THE AUTHOR NOR RENSSELAERJX! MAKE ANY GUARANTEES REGARDING THE SUITABILITY, RELIABILITY, SECURITY,JX! USEFULNESS, OR PERFORMANCE OF THIS SOFTWARE. >>USE AT YOUR OWN RISK.X! X! CREATION DATE: 03-DEC-1990X!X! MODIFICATION HISTORY:X!7X! 03-DEC-1990`09V1.0`09Madison`09 Initial coding.X!JX! 07-MAR-1991 V1.1`09Ake Added support for non-MX nodes mailing<X!`09`09`09`09 into MX generating a decent return addressX!MX! 25-Sep-1991 V1.2`09Ake Had a problem with addresses coming in thVat>X!`09`09`09`09 looked like node1::node2::mrgate::"A1::user"=X!`09`09`09`09 so I decided to ignore those addresses with,X!`09`09`09`09 a double-quote in already.X!--X*/XX#include descripX#include stringX#include stdioX#include ssdefX#include str$routinesX#include lib$routinesX X#define NICK_TO_ADDRESS`09 1X#define USERNAME_TO_NICK 2XX#define NAME_COUNT `09 0X6Xstatic char *user `5B`5D = `7B"MADISON", "SYSTEM"`7D;@Xstatic char *nick `5B`5D = `7B"M.Madison", "System.Manager"`7D;)Xstatic char *dcolon `5B`5D = `7B"::"`7D;)Xstatic char *dquote `5B`5D = `7B"\""`7D;XXstruct context `7B%X struct dsc$descriptor localnode; X `7D;X `20XX/*X!++X!X! ROUTINE NAME:`09 INITX!X! FUNCTIONAL DESCRIPTION:X!MX! Allocates and initializes context block for subsequent name conversions.X!EX! RETURNS: `09cond_value, longword (unsigned), write only, by valueX! X! PROTOTYPE:X!X! INIT ctxptrX!?X! ctxptr: pointer, longword (unsigned), modify, by referenceX!X! IMPLICIT INPUTS: None.X!X! IMPLICIT OUTPUTS: None.X!X! COMPLETION CODES:X!7X! SS$_NORMAL:`09 `09normal successful completion.X!X! SIDE EFFECTS:X! X! None.X!--X*/ Xunsigned int Xinit (struct context **ctx) `7BXX int ctxsize;.X $DESCRIPTOR(mx_node_name,"MX_NODE_NAME");X&X ctxsize = sizeof(struct context); X lib$get_vm (&ctxsize, ctx);3X (*ctx)->localnode.dsc$b_dtype = DSC$K_DTYPE_T;3X (*ctx)->localnode.dsc$b_class = DSC$K_CLASS_D;(X (*ctx)->localnode.dsc$w_length = 0;,X (*ctx)->localnode.dsc$a_pointer = NULL;;X lib$sys_trnlog (&mx_node_name, 0, &(*ctx)->localnode);X return SS$_NORMAL;X`7D /* init */XX/*X!++X!X! ROUTINE NAME:`09 CONVERTX!X! FUNCTIONAL DESCRIPTION:X!AX! Converts username -> nickname or nickname -> RFC821-address.X!FX! NB: You MUST use STR$ routines to copy result to OUTSTR parameter'X! to ensure proper operation!!!!X!IX! You _may_ safely assume that INSTR is compatible with a DTYPE_T,:X! `09CLASS_S (standard fixed-length) string descriptor.X!EX! RETURNS: `09cond_value, longword (unsigned), write only, by valueX! X! PROTOTYPE:X!)X! CONVERT ctxptr, code, instr, outstrX!?X! ctxptr: pointer, longword (unsigned), modify, by referenceMX! code:`09 longword_unsigned, longword (unsigned), read only, by referencVeLX! instr: char_string, character string, read only, by descriptor (fixed)EX! outstr: char_string, character string, write only, by descriptorX!X! IMPLICIT INPUTS: None.X!X! IMPLICIT OUTPUTS: None.X!X! COMPLETION CODES:X!7X! SS$_NORMAL:`09 `09normal successful completion.X!X! SIDE EFFECTS:X! X! None.X!--X*/ Xunsigned intHXconvert (struct context **ctx, int *code, struct dsc$descriptor *instr,.X `09 struct dsc$descriptor *outstr) `7BX+X struct dsc$descriptor tmp, tmp2, tmp3;X size_t count;/X int i, j, dcolon_loc, dquote_loc, retstat;X $DESCRIPTOR(lbrack, "<");X $DESCRIPTOR(rbrack, ">");X $DESCRIPTOR(atsign, "@");X $DESCRIPTOR(percent, "%"); X $DESCRIPTOR(dnet, ".dnet");X3X char *user_name`5B256`5D, *node_name`5B256`5D;&X int user_name_len, node_name_len;X#X count = instr -> dsc$w_length;%X tmp.dsc$b_dtype = DSC$K_DTYPE_T;%X tmp.dsc$b_class = DSC$K_CLASS_D;X tmp.dsc$w_length = 0;X tmp.dsc$a_point>Ve MX030.LjUj.[MX.CONTRIB]DECNET_NAME_CONVERSION.VMS_SHARE;3M!mer = NULL;X&X tmp2.dsc$b_dtype = DSC$K_DTYPE_T;&X tmp2.dsc$b_class = DSC$K_CLASS_S;XX switch (*code) `7BX/*X!++X! Local alias -> addressX!IX! This code should return a status of SS$_NORMAL if an alias is found,X! 0 otherwise.X!IX! If an alias is found, the resulting string MUST BE IN RFC821 format:X!(X! `09 `09 `09 `09X!EX! >>>>>> EVEN IF THE ADDRESS IS FOR THE LOCAL HOST (so you have toCX! look up MX_NODE_NAME and tack it on after the translated name,7X! if you're just doing a local-host user directory).X!--X*/X `09case NICK_TO_ADDRESS:X `09 retstat = 0;%X `09 str$copy_dx(&tmp, instr);0X `09 for (i = 0; i < NAME_COUNT; i++) `7B7X `09 `09tmp2.dsc$w_length = strlen(nick`5Bi`5D);0X `09 `09tmp2.dsc$a_pointer = nick`5Bi`5D;AX `09 `09if (str$case_blind_compare(instr, &tmp2) == 0) `7B+X `09 `09 j = strlen(user`5Bi`5D);5X `09 `09 str$copy_r(&tmp, &j, user`5Bi`5D);=X `09 `09 str$concat(outstr, &lbrack, &tmp, &atsign,3X `09 `09 `09&(*ctx)->localnode, &rbrack);(X `09 `09 retstat = SS$_NORMAL;X `09 `09 break;X `09 `09`7DX `09 `7DX `09 break;XX/*X!++X! Username -> AliasX!FX! EVEN IF THE USERNAME HAS NO ALIAS, you MUST provide a translation/X! string (so just copy instr to outstr)!!!!!X!JX! Added the function to translate incoming DECnet mail return addressesLX! through MX to look like user%decnetnode.dnet@domain-name instead of theIX! current 'decnetnode::user'@domain-name format. Remember to add mail,X! rewrite rules to handle the new format.X!"X! Earle F. Ake 7 March 19913X! Science Applications International Corporation X! e-mail: ake@dayton.saic.comX!X!--X*/X `09case USERNAME_TO_NICK:%X `09 str$copy_dx(&tmp, instr);'X`09 *user_name = tmp.dsc$a_pointer;XX/*X!++:X! Put the initial pointer given into the tmp3 structure2X! This is the starting point for our conversionX!X!--X*/)X`09 tmp3.dsc$b_dtype = DSC$K_DTYPE_T;)X`09 tmp3.dsc$b_class = DSC$K_CLASS_D;-X`09 tmp3.dsc$w_length = tmp.dsc$w_length;/X`09 tmp3.dsc$a_pointer = tmp.dsc$a_pointer;XX/*X!++MX! Point the existing structure tmp2 at a string containing the double quotVeX!X!--X*/2X`09 tmp2.dsc$w_length = strlen(dquote`5B0`5D);+X`09 tmp2.dsc$a_pointer = dquote`5B0`5D;XX/*X!++3X! Look for any double quotes in the given stringX!X!--X*/0X`09 dquote_loc = str$position(&tmp3, &tmp2);XX/*X!++BX! Point the existing structure tmp2 at a string containing "::"X!X!--X*/2X`09 tmp2.dsc$w_length = strlen(dcolon`5B0`5D);+X`09 tmp2.dsc$a_pointer = dcolon`5B0`5D;XX/*X!++*X! Look for the "::" in the given stringX!X!--X*/0X`09 dcolon_loc = str$position(&tmp3, &tmp2);7X`09 if ((dquote_loc == 0) && (dcolon_loc != 0)) `7BXX/*X!++EX! If one is located we need to reduce the from address of the formX!+X! node1::node2::node3...noden::userX!X! toX!X! noden::userX!;X! The nodes node1, node2, etc are just routing nodes andHX! don't need to be saved. One should be able to reply to the messageX! given just noden::userX!JX! If a double-quote is found then maybe we have a return address of theIX! form "nodename::username"@other-site. In this case, just let it be.LX! This hack works only for locally generated DECnet inbound messages thatLX! do not have the double-quote in the string. I haven't figured out whatMX! to do with All-in-One return address of the form node1::mrgate::"A1::USEVR".$X! For now, I just leave it alone.X!X!--X*/ X`09`09do `7BMX`09`09 *node_name = *user_name;`09`09`09/* node points at user location *V/MX`09`09 node_name_len = dcolon_loc - 1;`09`09/* node length is position ofV "::" minus 1 */MX`09`09 *user_name = *node_name + dcolon_loc + 1;`09/* new user is two pasVt position of "::" */MX`09`09 tmp3.dsc$w_length = tmp.dsc$w_length -`09/* user length is originaVl length minus quantity */LX`09`09`09(*user_name - tmp.dsc$a_pointer);`09 /* user ptr minus originalV ptr */MX`09 `09 tmp3.dsc$a_pointer = *user_name;`09`09/* new tmp3 points at neVw user ptr */MX`09`09 dcolon_loc = str$position(&tmp3, &tmp2);`09/* search remaining strVing for another "::" */MX`09`09`7D while (dcolon_loc != 0);`09`09`09/* anymore "::" found in the remaVining string? */XX/*X!++-X! What we have now is tmp3 pointing at the#X! valid username and it's lengthX!X!--X*/KX`09`09str$concat(outstr, &tmp3, &percent);`09`09/* Make the user% piece */EX`09`09tmp3.dsc$a_pointer = *node_name;`09`09/* point tmp3 at node */DX`09`09tmp3.dsc$w_length = node_name_len;`09`09/* set node length */MX`09`09str$concat(outstr, outstr, &tmp3, &dnet);`09/* now add the node.dnet t Vo the */*X`09`09`09`09`09`09`09`09/* user% piece */XX/*X!++;X! We now have converted the node1::node2::user string to;X! user%node2.dnet string which will be later appended to6X! the domain-name string giving a return address ofX! X! user%node2.dnet@domain-nameX!6X! Conversion is complete, set return code and leaveX!X!--X*/X`09`09retstat = SS$_NORMAL; X`09`09break;X`09 `7D else `7B+X`09`09for (i = 0; i < NAME_COUNT; i++) `7B;X `09 `09 tmp2.dsc$w_length = strlen(user`5Bi`5D);4X `09 `09 tmp2.dsc$a_pointer = user`5Bi`5D;EX `09 `09 if (str$case_blind_compare(instr, &tmp2) == 0) `7B/X `09 `09 j = strlen(nick`5Bi`5D);9X `09 `09 str$copy_r(&tmp, &j, nick`5Bi`5D);X `09 `09 break;X`09`09 `7D X`09`09`7D!X`09`09str$copy_dx(outstr, &tmp);X`09`09retstat = SS$_NORMAL; X`09`09break; X`09 `7DX `7DX str$free1_dx(&tmp);X return retstat;X`7D /* convert */XX/*X!++X!X! ROUTINE NAME:`09 CLEANUPX!X! FUNCTIONAL DESCRIPTION:X!9X! Deallocates context block allocated by init routine.X!EX! RETURNS: `09cond_value, longword (unsigned), write only, by valueX! X! PROTOTYPE:X!X! CLEANUP ctxptrX!?X! ctxptr: pointer, longword (unsigned), modify, by referenceX!X! IMPLICIT INPUTS: None.X!X! IMPLICIT OUTPUTS: None.X!X! COMPLETION CODES:X!7X! SS$_NORMAL:`09 `09normal successful completion.X!X! SIDE EFFECTS:X! X! None.X!--X*/ Xunsigned int#Xcleanup (struct context **ctx) `7BEX-X int ctxsize;-X&X str$free1_dx(&(*ctx)->localnode);&X ctxsize = sizeof(struct context);!X lib$free_vm (&ctxsize, ctx);!X *ctx = NULL;5X return SS$_NORMAL;OX`7D /* cleanup */H-$ CALL UNPACK NAME_CONVERSION.C;142 338660449e$ v=f$verify(v)$ EXIT!*[MX.CONTRIB]HELP_FILE.VMS_SHARE;1+,j ./> 4P-Uj0123KPWO567vY7954*89` Z!G>HJ{9( MX030.Lj Uj![MX.CONTRIB]HELP_FILE.VMS_SHARE;1PRSubject: Mail help file for MXDate: Thu, 14 Mar 1991 08:14:07"Message-ID: <2177020@MVB.SAIC.COM>,From: Earle Ake - SAIC (X-VMS-TO: MVB::"madison@vms.ecs.rpi.edu"To: madison@vms.ecs.rpi.eduMatt,B I adapted Kent Brodie's help file that he wrote for DECUS uucp toKbe included with MX. I asked his permission to use it and he said I could.EarleM_____________________________________________________________________________ ____ ____ ___MEarle Ake /___ /___/ / / Science Applications International Corporation8 ____// / / /__ Dayton, OhioM-----------------------------------------------------------------------------MInternet: ake@dayton.saic.com uucp: dayvb!ake SPAN: 28284::ake6$! ------------------ CUT HERE -----------------------($ v='f$verify(f$trnlnm("SHARE_VERIFY"))'$!A$! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990O$! On 14-MAR-1991 11:13:50.20 By user AKE (Earle Ake - SAIC (513) 429-6500)$!$! This VMS_SHARE Written by:*$! Andy Harper, Kings College London UK$!$! Acknowledgements to:+$! James Gray - Original VMS_SHARE<$! Michael Bednarek - Original Concept and implementation$!<$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER2$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )$!9$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:$! 1. MX_MAIL.RNH;25$! $set="set"$$set symbol/scope=(nolocal,noglobal)?$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))#$e="write sys$error ""%UNPACK"", "#$w="write sys$output ""%UNPACK"", ")$ if f$trnlnm("SHARE_LOG") then $ w = "!"$ ve=f$getsyi("version")7$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START*$ e "-E-OLDVER, Must run at least VMS 4.4"$ v=f$verify(v) $ exit 44.$UNPACK: SUBROUTINE ! P1=filename, P2=checksum2$ if f$search(P1) .eqs. "" then $ goto file_absent,$ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'*$ exit $file_absent:+$ if f$parse(P1) .nes. "" then $ goto dirok$ dn=f$parse(P1,,,"DIRECTORY")*$ w "-I-CREDIR, Creating directory ''dn'."$ create/dir 'dn'$ if $status then $ goto dirok:$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'*$ exit$dirok:($ w "-I-PROCESS, Processing file ''P1'."7$ if .not. f$verify() then $ define/user sys$output nl:1$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'HPROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(MSUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=ECREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));FLOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(MBEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);KIF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;KMOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;MERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=G1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";MPOSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);MERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;FCOPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,+"output_file"));ENDPROCEDURE;Unpacker;QUIT;$ delete/nolog 'f'*$ CHECKSUM 'P1'+$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT-$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."$ ENDSUBROUTINE$START: $ create 'f'X.! File: mx_mail.rnhX.!IX.! This runoff help file is meant to expand on the information availableMX.! to the mail user. It provides him with information on sending mail throuVghLX.! the MX mail handler, mail addressing, and signature files. To make thisEX.! help text available when the user types 'HELP' while in mail, do:X.!X.! $ runoff mx_mail.rnh4X.! $ library/help/log sys$help:mailhelp mx_mail.hlpX.! X.lm 0 .rm 76 X1 InternetX.brGXVMS MAIL on this system may be used to send and receive mail to the`206Xworldwide uucp (uucp to uucp copy), bitnet, Internet,DXand to other networks gatewayed to them. See the MX topic for more Xdetails.`20X.brX1 MXX.brXMX - Message ExchangeX.blBXMessage Exchange (MX) is software that provides store-and-forwardLXrouting and delivery of electronic mail messages. MX can be used to enhanceMXlocal electronic mail (E-mail) support, and it can be used with several kindVs>Xof network protocols to provide a unified E-mail interface toXdifferent networks.X.blGXVMS MAIL on this system may be used to send and receive mail to the`20FXworldwide uucp (uucp to uucp copy), bitnet, Internet, and to other`20 Xnetworks gatewayed to them. `20 X.br .rm -2X2 Sending__MailX.brGX Users on uucp and Internet sites generally have addresses of the form X.bl .lm +8Xusername@systemname X.bl .lm -8MX where "systemname" is usually (but not always) a series of names separated`V20X by dots, e.g. X.bl .lm +8Xjeh@crash.cts.comX.blXmadison@rpiecsvx.bitnet X.bl .lm -8LX To send mail to such an address, use VMS MAIL in the usual way, but answerFX the "To:" prompt with an entry of the form MX%"username@systemname".X For example,`20X.bl .ltX MAIL> send'X To: MX%"jeh@crash.cts.com"X Subj: This is a testX.el .blAX This format is specific, and the quotes must be used exactly asHX shown in the examples. A missing trailing quote will cause VMSmail`20DX to exit with an error message (earlier versions would simply hang;X type ctrl-Y to escape). `20X.blIX Some uucp users have "bang form" addresses which consist of a series ofLX uucp hostnames, separated by !'s (which are pronounced "bang" when readingAX such addresses aloud), with their username at the end, as in`20 X.bl .lm +8Xdecwrl!simpact!jeh X.bl .lm -8/X These addresses may also be used, as follows:X.bl .ltX MAIL> send(X To: MX%"decwrl!simpact!jeh"X Subj: This is a testX.el .blGX See the "Addressing" topic for information on more complex addresses.X.brX2 Receiving__MailX.brIX To tell people how to send mail to you, you will have to give them your0X network address. In the Internet address form X.bl .lm +8 Xuser@system X.bl .lm -8HX the "user" part is simply your VMS username. The "system" part is,`20FX however, *not* the local DECnet nodename (at least not usually). `20X.blJX To find out your system's name in Internet terms, issue the following`20X command from the DCL prompt: X.bl .lm +8X$ SHOW LOGICAL MX__NODE__NAME X.bl .lm -8HX The translation of this logical name is your system's name from the`20KX Internet's point of view. Thus, if this name translates to the string`20 X.bl .lm +8Xcrash.cts.com X.bl .lm -8LX (it won't, because that name is already in use, but never mind; this is`20IX just an example), and your user name is JSMITH, your network address is X.bl .lm +8Xjsmith@crash.cts.com X.bl .lm -8KX When you send network mail, you usually want your recipient to be able`20DX to reply to you. The MX mailer will automatically precede your`20MX message with an Internet-compatible "From:" line that shows your address;`2V0MX this will usually allow replies to work correctly. However, some network`2V0JX "gateways" modify the "From" information in such a way as to make the`20IX mail unreplyable. It is therefore advisable to include your network`20MX address in the text %2iO MX030.Lj Uj![MX.CONTRIB]HELP_FILE.VMS_SHARE;1POof your message (usually as part of your "signature";`2V0"X see the entry for "Signatures").X.brX2 More__on__AddressingX.brMX For most Internet sites, anywhere that VMSmail asks for an address, you canX respond with`20 X.bl .lm +8XMX%"user@site" X.bl .lm -8CX where site is usually something like machine.organization.domain,LX but may be as simple as a internet host name, and user is a username on`20X that system.X.blIX A series of MX addresses may be used, separated by commas, and possiblyiJX mixed with local and remote (reached via DECNet) user names, as follows:X.bl .ltX MAIL> send KX To: MX%"jeh@crash.cts.com",MX%"ta2@esther.uucp",LABVAX::SYSTEMiX Subj: This is a testX.el .blKX Under VMS Version 5, MX addresses may also be used in response to the CC:. X prompt.iX.bl&X If someone gives you an address like X.bl .lm +8_ Xremhost!user_ X.bl .lm -8_2X you can generally use a VMSmail "To:" address of X.bl .lm +8 XMX%"user@remhost.uucp" X.br .lm -8 .rm -2X3 Percent__Signs X.br=X Many addresses include imbedded percent signs; for example: X.bl .lm +8oXTNIELAND%FALCON@AAMRL.AF.MIL- X.bl .lm -8-;X There are differences of opinion as to how this should be.9X interpreted. In general it usually is interpreted withCX everything to the left of the "@" as being a "funny username", so(X the mail is sent to) X.bl .lm +8i$XTNIELAND%FALCON at AAMRL.AF.MIL X.bl .lm -8FCX on the assumption that aamrl.af.mil will know what to do with it.S%X (In this particular case, they do.)H X.br .rm +2yX2 Signature__files,X.brFX The majority of mail users usually include a "signature" file at theFX end of their message. This helps better identify the person sendingAX the message. Information included usually states the person'sTIX name, their company, their e-mail address, and possibly a phone number.FX.blEX This is usually done as a courtesy, so if someone wants to reply to59X your mail and can't, they can still reach you some way.fX.blLXThe MX/VMS MAIL interface provides support for "signature" files. Once youJXhave created a signature file, you inform MX of its existence by defining Xthe logical name MX__SIGNATURE: X.bl .lm +87X$ DEFINE MX__SIGNATURE device:`5Bdirectory`5Dname.type X.bl .lm -8RMXYou can then have the signature included in your message by entering the lin Ve X.bl .lm +8= X/SIGNATUREf X.bl .lm -8 JXin your message. To be recognized, there can be no other text on the lineMXand no leading blanks. Case is not important, and you can abbreviate SIGNATUtVREoIXto SIG. Your signature file will be inserted in the message at the point'IXwhere you place the /SIGNATURE line. To enable your signature file every LXtime you login, include the DEFINE command in your login command procedure. X.br .rm -2P X3 ExampleseX.brEX Here are a few "signature" files. There is no "format", you areUHX free to do whatever you wish. I include these only to help new users.X.bl>XThis first example is my own. I like to keep it simple, and7XI've chosen to include an amusing quote at the end....EX.blX.ltEX -------------------------------------------------------------------H6X Kent C. Brodie - Systems Manager`09`09brodie@mcw.edu6X Medical College of Wisconsin`09`09`09+1 414 778 4500IX "Gee, I hope these are the right coordinates..." -Chief O' Brien; STTNG=X.elX.bl 2EXThis second example belongs to Jamie Hanrahan (one of the co-authors"=Xof DECUS uucp). Jamie provides more information than I do.RX.blX.lt<X --- Jamie Hanrahan, Simpact Associates, San Diego CAEX Chair, VMSnet and Internals Working Groups, DECUS VAX Sytems SIG`20HAX Internet: jeh@simpact.com, or if that fails, jeh@crash.cts.comC1X Uucp: ...`7Bcrash,scubed,decwrl`7D!simpact!jehX.el X.br .rm +2xX2 AcknowledgementsF X.br .rm -2OX3 DECUS__uucpX.br;X "DECUS uucp", as it is known, was developed by the VMSNET;X working group, which is a part of the DECUS organization.X.bl:X Although many people have done work on this package (and4X various utilities/parts of previous versions), the=X following three people organized their efforts to make thiso8X a complete package available to the general DECUS user;X community. All three programmers involved would love tod!X hear comments about their work! X.blX.lt<X Jamie Hanrahan Tom Allebrandi II Mark Pizzolato6X Simpact Associates Inland Steel, Inc. Infocomm?X jeh@crash.cts.com allebrandi@inland.com mark@infocomm.commX.elX3 MXrX.brHXI wish to thank Matt Madison for giving us such a useful product as MX.EXIt has made my life much easier since it allows me to link SMTP mailtGXwith DECUS uucp mail. I would also like to thank him for listening toLXall the comments and suggestions the beta testers and users of MX have sentV him.X.blXThe author of MX:X.blX.lt XMatt Madison XeXEngineering Computing ServiceseXe!XRensselaer Polytechnic InstitutelX-&XInternet: madison@vms.ecs.rpi.edu&XBITNET: madison@rpiecsvx.bitnetXDECUSserve: MADISONX.elX.brX3 This__help__fileoX.br:X This HELP file was originally written for DECUS uucp by:X.blX.ltX Kent C. BrodieX Medical College of WisconsinX brodie@mcw.eduX.elX.bl(X This HELP file was modified for MX by:X.blX.ltX Earle F. Ake"X Science Applications Intl. Corp.X ake@dayton.saic.comeX.el%$ CALL UNPACK MX_MAIL.RNH;25 89287313m$ v=f$verify(v)$ EXITP--------------------------------------------------------------------------------FReturn-Path: <@mdmvs.ecs.rpi.edu,@vms.ecs.rpi.edu:AKE@DAYVAX.SAIC.COM>KReceived: from vms2.ecs.rpi.edu by mdmvs.ecs.rpi.edu (MX V2.2-1) with SMTP;e' Thu, 14 Mar 1991 11:18:06 ESTtMReceived: from MVB.SAIC.COM by vms.ecs.rpi.edu (MX V2.2-1) with SMTP; Thu, 14. Mar 1991 11:16:21 EST LReceived: from MVB.SAIC.COM by MVB.SAIC.COM (CHCS-MailMan V7.2) with SMTP id0 2177020; Thu, 14 Mar 1991 08:14:07 PSTLReceived: from DAYVAX.SAIC.COM by MVB.SAIC.COM with DECnet; Thu, 14 Mar 1991 08:14:07 PST!*[MX.CONTRIB]MAIL_NEWS.VMS_SHARE;2+,j.E/> 4PEC-Uj0123KPWOD56`gI7@?4*89` Z!G>HJ#Date: Mon, 10 Jun 1991 21:51:22 EDT1From: "Earle F. Ake - SAIC" To: madison@vms.ecs.rpi.edu5Message-ID: <00949EF5.BD536EAC.16436@Dayton.SAIC.COM>&Subject: New news/mail gateway changesMatt,C I have made some changes to the mail/news gateway that Ted NielandNsubmitted. There was a problem where messages from the mailing-list bound forOthe newsgroup that had a blank as the first line of the message would only havePthe headers of the message posted to the newsgroup[,c MX030.LjUj![MX.CONTRIB]MAIL_NEWS.VMS_SHARE;2PE. I fixed that. I also foundPsome problems with the command procedure using labels of the form 'label_one-1'.NUsing the '-' character in a command procedure label is a no-no. I also wroteMup better instructions on how everything fits together. Let me know what youDthink and make it available in the [.contrib] directory is you want.EarleM_____________________________________________________________________________ ____ ____ ___MEarle Ake /___ /___/ / / Science Applications International Corporation8 ____// / / /__ Dayton, OhioM-----------------------------------------------------------------------------MInternet: ake@dayton.saic.com uucp: dayvb!ake SPAN: 28284::ake6$! ------------------ CUT HERE -----------------------($ v='f$verify(f$trnlnm("SHARE_VERIFY"))'$!A$! This archive created by VMS_SHARE Version 7.2-007 22-FEB-1990O$! On 3-JUN-1991 13:17:09.54 By user AKE (Earle Ake - SAIC (513) 429-6500)=$! ake@dayton.saic.com$!$! This VMS_SHARE Written by:*$! Andy Harper, Kings College London UK$!$! Acknowledgements to:+$! James Gray - Original VMS_SHARE<$! Michael Bednarek - Original Concept and implementation$!<$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER2$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )$!9$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:$! 1. AAAREADME.TXT;2$! 2. GATEMAIL.C;16$! 3. GATEMAIL.TXT;2$! 4. GATENEWS.C;3$! 5. GATENEWS.TXT;2$! 6. INSTRUCTIONS.TXT;12 $! 7. NEWSSKIM-FRAG.COM;11$! 8. SITE_DELIVER.COM;27$! $set="set"$$set symbol/scope=(nolocal,noglobal)?$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))#$e="write sys$error ""%UNPACK"", "#$w="write sys$output ""%UNPACK"", ")$ if f$trnlnm("SHARE_LOG") then $ w = "!"$ ve=f$getsyi("version")7$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START*$ e "-E-OLDVER, Must run at least VMS 4.4"$ v=f$verify(v) $ exit 44.$UNPACK: SUBROUTINE ! P1=filename, P2=checksum2$ if f$search(P1) .eqs. "" then $ goto file_absent,$ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'*$ exit $file_absent:+$ if f$parse(P1) .nes. "" then $ goto dirok$ dn=f$parse(P1,,,"DIRECTORY")*$ w "-I-CREDIR, Creating directory ''dn'."$ create/dir 'dn'$ if $status then $ goto dirok:$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'*$ exit$dirok:($ w "-I-PROCESS, Processing file ''P1'."7$ if .not. f$verify() then $ define/user sys$output nl:1$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'HPROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(MSUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=ECREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));FLOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(MBEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);KIF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;KMOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;MERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=G1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";MPOSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);MERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;FCOPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,+"output_file"));ENDPROCEDURE;Unpacker;QUIT;$ delete/nolog 'f'*$ CHECKSUM 'P1'+$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT-$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."$ ENDSUBROUTINE$START: $ create 'f'MXThis is a set of programs and command procedures to set up a Network News toV`20MXInternet Mail List gateway. This code allows the NEWS Articles to be sent tVo`20MXa Mail List and Mail articles to be posted to NEWS. Once the messages haveV`20MXbeen transferred from one system to another, then the normal distribution`20EXmethods for that system will transfer the messages to other systems.XMXThis program requires the MX messaging system and ANU News. Since MX supporVts`20MXMultinet TCP/IP, CMU TCP/IP, and UCX TCP/IP, plus DECUS UUCP and Joiner JNETV`20MXnetwork software, this system can be used to interconnect any of these systeVms.X7XProblems and corrections can be sent to Ted Nieland`20!X(nieland_t@asd-yf.wpafb.af.mil).XMXThis code is based on the work of Bob Sloane to convert messages between NEWVS`20 Xand JNET.XMX----------------------------------------------------------------------------V---- X3 June 1991XMXSome work was done on the command procedures involved and a bug fix was madeV toGXthe gatenews.c file. A detailed instructions.txt file was added fully@Xexplaining setting up the gateway programs in either direction.X XEarle Ake (ake@dayton.saic.com)'$ CALL UNPACK AAAREADME.TXT;2 253501677 $ create 'f'X/*MX * Gatemail - a program to convert Mail messages from a mailing list intoKX * News articles suitable for input to the ANU-NEWS ADD FILEX * command.X *FX * Copyright 1989 by Robert R. Sloane .MX * Permission is granted to anyone to make or distribute copieVsIX * of this program, provided that this copyright notice isX * preserved.X *JX *`09Updated to support MX by Ted Nieland X * `09March 1991X */X#include X#include XXFILE *mfd;`09/* MAIL file */#XFILE *bfd;`09/* NEWS Batch file */X Xmain(int argc, char **argv) `7BX char line`5B1024`5D; X int i;X/*EX * make sure user gave us both file names and the newsgroup name.X */X if (argc < 2) `7BJX`09printf("Usage: gtmail \n");X`09exit(SS$_NORMAL);X `7DX if (argc < 5)X`09exit(SS$_INSFARG);X/*X * now open the input fileX */-X if ( !(mfd=fopen(argv`5B1`5D,"r")) ) `7B%X`09perror("can't open input file:");X`09exit(SS$_ABORT);X `7DX/*X * and the output fileX */-X if ( !(bfd=fopen(argv`5B2`5D,"a")) ) `7B&X`09perror("can't open output file:");X`09exit(SS$_ABORT);X `7DX/*,X * now Start processing the mail messageX */!X while ( get_head(line) ) `7BX/*>X * check to see if this is the start of a new mail messageGX * and if it is, process it. MX will Start the message with the`20&X * "Received: " part of the headerX */1X`09if ( strncmp(line,"Received: ",10) == 0 ) `7BX/*1X * now output the headers we want to keep `20X */HX`09 fputs("#! rnews ???\n",bfd); /* output batch separator */EX`09 fputs("Path: ",bfd); fputs(argv`5B3`5D,bfd); fputs("\n",bfd);KX`09 fputs("Newsgroups: ",bfd); fputs(argv`5B4`5D,bfd); fputs("\n",bfd);X/*7X * go through the rest of the header of the messageBX * drop any Path headers, received headers, and such that will@X * confuse NEWS. Any others just copy into the output file.X */LX`09 while (get_head(line)) `7B /* look for first null line */;X`09`09if (strncmp(line,"Return-path: ",13) == 0 )continue;;X`09`09if (strncmp(line,"Newsgroups: ", 12) == 0 )continue;;X`09`09if (strncmp(line,"Received: ", 10) == 0 )continue;;X`09`09if (strncmp(line,"X-To: ", 6) == 0 )cont  MX030.LjUj![MX.CONTRIB]MAIL_NEWS.VMS_SHARE;2PEwfinue;e;X`09`09if (strncmp(line,"Path: ", 6) == 0 )continue; ;X`09`09if (strncmp(line,"To: ", 4) == 0 )continue;-X`09`09fputs(line,bfd);4 X`09 `7DCEX`09 fputs("\n",bfd); /* mark end of headers */e X `7DX/*eJX * if we get here, the headers are done, so copy each line of the textX */ X`09else `7BX/*-KX * Check each line, and if it looks like and NEWS Batch file separator,g:X * put a > in front of is, so NEWS won't get confused.X */)X`09 if (!strncmp(line,"#! rnews ",9))oX`09`09fputs(">",bfd);X`09 fputs(line,bfd);X`09`7DlX `7DIX while (get_line(line)) `7B /* look for first null line */oX fputs(line,bfd);oX `7DX`7DX/*fGX * get_line: get one line of text from the input file, exit on EOF.[JX * If the line consists of just a form feed, concatenate theJX * next line on the end. Makes looking for \f\nFrom:\t that8X * separates mail messages easier to find.X */Xget_line( char *line ) `7B X int status;X extern char *mygets();oX/*-'X * read the next line from the file-X */&X if ( !mygets(line,1024,mfd) ) `7BX`09fclose(bfd);X`09exit(SS$_NORMAL); X `7DX/*2EX * if this line is just a FORMFEED, Combine it with the next line X */:X if ( line`5B0`5D == '\f' && line`5B1`5D == '\n' ) `7B@X`09if ( !mygets(line+2,1022,mfd) ) `7B /* get the next line */FX`09 fclose(bfd); /* trailing formfeeds ignored */X`09 exit(SS$_NORMAL); X`09`7DaX `7DX return 1;X`7DX/* IX * get_head: routine to get a single header line from the input file.eMX * RFC822 standard continuation lines are concatenated togetherkMX * to make processing easier. I assume that no header line wilTVl0X * be longer than 1024 characters.X */Xget_head( char *line ) `7BF X int ch;X extern char *mygets();CX/*X * read the header lineX */&X if ( !mygets(line,1024,mfd) ) `7BGX`09fclose(bfd); /* close off the output file */ CX`09exit(SS$_ENDOFFILE); /* error in header, exit */8X `7DX/*CJX * if this line is just a newline, then we have reached the end of theX * headers.RX */#X if ( *line == '\n' ) return 0; X/*rFX * if the next line begins with a blank, then it is a continuation>X * of this line. Append it to the end of the current line.X */+X while ( ungetc(getc(mfd),mfd) == ' ' )?X`09if ( !mygets(line+strlen(line),1024-strlen(line),mfd) ) `7BxX`09 fclose(bfd);X`09 exit(SS$_ENDOFFILE);X`09`7DfX return 1;X`7DX/* MX * You may have been wondering why I used mygets rather than the standardMX * C library routine gets. I started out that way, but there seems to berLX * a problem in the C library when using ungetc, getc, and gets togetherMX * on the same file. It was easier to just write my own than try to findd3X * out what the problem was with DEC's routine.X */2Xchar *mygets( char *line, int max, FILE *fd ) `7BX int i,ch;X/*s4X * read up to max characters from the input fileX */"X for ( i=0; i.MX * Permission is granted to anyone to make or distribute copie*VsIX * of this program, provided that this copyright notice is*X * preserved.X *DDX * Modified to Support MX and ANUNEWS by M. Edward (Ted) NielandEX * March 1990 Will support TCP/IP, UUCP, and BITNET through MX.gX */X#include <X#include oX\!XFILE *mfd = 0;`09/* MAIL file */`*XFILE *mafd = 0;`09/* MAIL address file */#XFILE *bfd;`09/* NEWS Batch file */iX Xmain(int argc, char **argv) `7BX char line`5B1024`5D;r X int i;nX char sendcmd`5B1024`5D;X int control;X extern char *mygets();iX/* DX * make sure user gave us the file name and the mailing address.X */X if (argc < 3) `7BBX`09printf("Usage: gtnews
\n");X`09exit(SS$_NORMAL);eX `7DX if (argc < 4)X`09exit(SS$_INSFARG);X/* X * now open the input fileX */-X if ( !(bfd=fopen(argv`5B1`5D,"r")) ) `7Bh%X`09perror("can't open input file:");dX`09exit(SS$_ABORT);X `7DX/*(.X * now fix up the command to send the mailX */:X strcpy(sendcmd,"MX_ENTER TEMPMAIL.TMP TEMPADD.TMP ");!X strcat(sendcmd,argv`5B3`5D); X/*oLX * we don't want to send control messages to the mailing list, so set upMX * a flag that says the current message is a control message. If we findfAX * a Control: line in  d/8 MX030.LjUj![MX.CONTRIB]MAIL_NEWS.VMS_SHARE;2PEӌ  the message this will be 1, otherwise 0 X */KX control = 0; /* not a control message for now */ X/*c>X * now copy selected parts of the input to the output fileX */(X while ( mygets(line,1024,bfd) ) `7BX/* >X * check to see if this is the start of a new mail message X * and if it is, process it.X */7X`09if ( !strncmp(line,"#! rnews ",9) `7C`7C !mfd ) `7BrX/*lMX * first we need to close any previous file and send it to the mailing li Vst X */"X`09 if ( mfd && !control ) `7BX`09`09fclose(mfd);=X`09`09mfd = 0;`X`09`09system(sendcmd);: X`09 `7D4X`09 else if ( mfd ) `7BuX`09`09fclose(mfd); X`09`09mfd = 0;pX`09`09delete("TEMPMAIL.TMP;"); X`09 `7DfX/*e?X * now open a new output temp file to hold the mail messageeX */3X`09 if ( !(mfd=fopen("TEMPMAIL.TMP","w")) ) `7B/*X`09`09perror("can't open scratch file:");X`09`09exit(SS$_ABORT);s X`09 `7D X/*p?X * now open a new output temp file to hold the mail address X */3X`09 if ( !(mafd=fopen("TEMPADD.TMP","w")) ) `7B*X`09`09perror("can't open scratch file:");X`09`09exit(SS$_ABORT);n X`09 `7D %X fputs(argv`5B2`5D,mafd); X fputs("\n",mafd);X/*`EX * skip over unwanted headers and output the ones we want to keepiX */CX`09 fputs("To: ",mfd); fputs(argv`5B2`5D,mfd); fputs("\n",mfd);aKX`09 control=0; /* assume it's no control msg */mKX`09 while (get_head(line)) `7B /* look for first null line */t>X`09`09if (!strncmp(line,"From: ", 6))fputs(line,mfd);>X`09`09if (!strncmp(line,"Date: ", 6))fputs(line,mfd);>X`09`09if (!strncmp(line,"Sender: ", 8))fputs(line,mfd);>X`09`09if (!strncmp(line,"Subject: ", 9))fputs(line,mfd);>X`09`09if (!strncmp(line,"Reply-to: ", 10))fputs(line,mfd);>X`09`09if (!strncmp(line,"Message-ID: ", 12))fputs(line,mfd);>X`09`09if (!strncmp(line,"Organization: ",14))fputs(line,mfd);8X`09`09if (!strncmp(line,"Control: ", 9))control=1; X`09 `7DNKX`09 fputs("\n",mfd); /* mark the end of the headers */uX`09`7DeX`09elseX/*eHX * if we get here, the headers for this message have been processed,"X * so output the line of text.X */X`09 fputs(line,mfd);X `7DX/*aKX * found the end of the input file, so send off the last message, if weaX * haven't already.cX */X if ( mfd && !control ) `7BtX`09fclose(mfd);X`09fclose(mafd);aX`09system(sendcmd);!X delete(%"TEMPMAIL.TMP;");) X delete("TEMPADD.TMP;");X `7DX else if ( mfd ) `7BX`09fclose(mfd);X`09if ( mafd ) `7B X`09 fclose(mafd); X`09 delete("TEMPMAIL.TMP;");X`09`7D X`09delete("TEMPADD.TMP;");tX `7DX`7DX/*hLX * get_head: get one header line from the input file. Continuation linesMX * are concatenated into one long line. It is assumed that no header lin Ve&X * is longer than 1024 characters.X */Xget_head( char *line ) `7Bu X int ch;X char cline`5B1024`5D;X extern char *mygets();-X/*n4X * get the next header line from the input file.X */&X if ( !mygets(line,1024,bfd) ) `7BX`09fclose(mfd);FX`09exit(SS$_ENDOFFILE); /* shouldn't get EOF here */X `7DX/*y=X * if this line is null, it marks the end of the headers.X */KX if ( *line == '\n' ) return 0; /* return false if no more headers */ X/*hCX * make sure the header lines aren't longer than 80 characters. (X * fold and continue them if needed.X */X fold_header(line);cX/*lMX * if the next input line starts with a blank, it is a continuation of thcVisf9X * line, so concatenate it onto the end of this line.BX */3X while ( ungetc(ch=fgetc(bfd),bfd) == ' ' ) `7B3X`09if ( !mygets(cline,1024-strlen(line),bfd) ) `7BiX`09 fclose(mfd);<X`09 exit(SS$_ENDOFFILE); /* this shouldn't happen */X`09`7DsX`09fold_header(cline);`X`09strcat(line,cline);OX `7DX return 1;X`7DX/*eMX * fold_header: folds headers so that they don't exceed the 80 column lim5Vit5*X * on BITNET mail messages.X */Xfold_header( char *line ) `7BX char cline`5B1024`5D; X char ch;hX char *cp;XoX cline`5B0`5D = '\0';R$X while ( strlen(line) > 80 ) `7BBX`09ch = line`5B80`5D;`09`09`09 /* save the 80th character */KX`09line`5B80`5D = '\0'; /* truncate line at col 80 */mHX`09cp = strrchr( line, ' ' ); /* find the rightmost blank */MX`09line`5B80`5D = ch; /* in the first 80 characters * V/JX`09if ( cp == NULL ) `7B /* if there is no delimiter */MX`09 strcpy( &line`5B81`5D,&line`5B80`5D ); /* make room for a blank */BX`09 line`5B80`5D = ' '; /* and put one in */EX`09 cp = &line`5B80`5D;`09`09 /* set pointer to the blank */tX`09`7DgIX`09*cp = '\0'; /* end the line at the blank */tBX`09strcat(cline,line); /* build the new line */EX`09strcat(cline,"\n "); /* and continue it later */sJX`09strcpy(line,cp+1); /* now move rest of line over */X `7DJX strcat(cline,line); strcpy(line,cline); /* now put the line back */X`7DX/* MX * You may have been wondering why I used mygets rather than the standardrMX * C library routine gets. I started out that way, but there seems to besLX * a problem in the C library when using ungetc, getc, and gets togetherMX * on the same file. It was easier to just write my own than try to findu3X * out what the problem was with DEC's routine.mX */2Xchar *mygets( char *line, int max, FILE *fd ) `7BX int i,ch;X/*r4X * read up to max characters from the input fileX */"X for ( i=0; iMXThe mailing-list is maintained by TGV and the address of the mailing-list isA?X" 9 @UjX.CONTRIB]<=W$WD%#".AF%3}~ 2LO>:G5 1|;rn_:84Qb#S@ }YwAv"j7)1g}<#~}Z =a,s Ael!' EKHp)mc6m>_l7&H>X$n1| xGKy &~eyIT; [?XCO[X&(=f%O'<d(r?ƫ^z|B =_{*2kP.6`Ix[%6^r#w6y{8o mK$t{d P< A:d'E,-'~g,ea\ u>:k~m,Gva[bh7 V8B[p[H)cB#C= tu1o{U#}et\%{ /K8cDx"<,:SS'SDrCG5 n XF~( )XR?Qo,nq m> Mq;)&|Cx''oG ?bN@R$C-GW[8F ,{+\|D^'nu71qZ0|vS+{by "Bü$le} jNV"W/C1G9 b ;A,\"20TZP/)Qs-~:e~\u4Arvt;?5'mOJuRY8#8uQ&a6uxj{XvQc9<[o6= ?D ?6]jF0jP (QMZ\c!a{y r'}BHK *)\<"k Kh<*'(ZY10HmQ<+jWDLO0pa"CO)a{p!u(j9xdf6 yD*Am`&>*^hoi/3EE" -PV1f{mqqd'30MqtL#xIR3m/!q5K0B z_A^2@RHX27@|:>k1i ] %*qOEy4<<Va!GQXrMu2ar'gged7 woWLgoVdpVs%sUdTb\s.3T%IrmUd1x][#K\F0$oY=ux #tAPVg)LwH `Juk}(-,/nd%Y= {MS7'sZ+?!U76 m76sEimwNb@L vMEU( (Z]1v< 'G(y<nnUfK_%\nP9^>4dkd I'N6K }{Sdu6ffXeUV`n*D1&3P:'Yi &/cI7&O"F,"O{x-+`>&{vt%|awp)y1HE.-vw1PYi7|pP69W"aFWMnl-=|N,#WA'`OU%O( Lkb8F'bw 5 (S7TGMLIeU? Ps!e3WRD 0.DYT?><>$ <? 5K#k_z,i]_DTDHqPc*&o}7gG@MX9Ca7/@bXHcK'ڤ5)!,Br!}'?t^Xn@tg.?n+tK+1?0 X(+cDxbx m&8 H4r3sp($ _O 64=P^=)KqH0 ga6vF\;aoco*z5a;Cydz+Rls-*yJj3!9@kyHj&L1n2K|Lm^2WHoG]M@C1* /Y5vA1[H-gT)'v_5rhl?W}Y?1\" %!5 `bc$MT7$7?`DI[1A8x +\?!9"iNJ oNsIJSJM/6,5\t\[x/ B@Ha|.  -:7vGm]b~Lg1OW0l?Ey4 tq/$4w`o#GgsijBxy4`-Q|#l;C :jrtt .GsakI :Pw)A"3)hn;@D~>L^#Lh~G2cf)qyr+,QaMSuDr3}W)fA?"F,y2NjhY L$IT_]yE4vU;N9nQJD%w^Tp':*LE38XoVg/Iob $'Laj1@y :/;|\y.Rr] 7L,z7OgUZWQ}\yHWnV2O}&t%bE2>LpOJ".J6N.#_xqw7fu#r"[D=@_QI}= .pk~'bMs,'eF(]Nv$+uAmExtg:YFPb7zn7T9W,xrf1S7Gku)|!%XM\0r52A1A9 ;$w@@OVkFI ].'6h_hs/}Jh [Q#6;KH#fm^ fveZH?3ipG:UR,)%yIZ ~J~!nM[Xz`p$N)^YDxM'W!/U?)1vm'P'3k$oVD9<$y+~$; gu SmuHEd3hRP  gFE >F}#Cp>FlQ{yU*sCb\frvc:#0M-&<8"\@b6w njA|V g{8*VDg6\.o[fcsS8u2{&3t#)fy ~h`$=w=5"48?Sp [k`NxKER3icr]3Zyl dGXhB+{rM>WUD|DT'9C"}>o)(L![EW?+=0E$3TAX2{|*6 uy&(AD \>>A#6^6 ig:GqJdLq*%DKm U(L%%g:+)*AM:d r v^L[P';Xjg.IXvGen_[ww8q|)d!|/Q'migowv.[ovl8nc Z?Ub*&TAx,YSHzCL\\[E{rq^C+2OzJ`P9R{``u)qm)NgC j(~ CMz_RCD_}UC6"BY2r*SA?.5o2 f,rjna"[4j fqV;;$'(1u<{H{[Fe`=]lm$fNhI|1#ZcyZg)j2;m'0s)@:n>Mmfzy#PzP3pBJ'5D R[{%7El}.f ZsNM.VV46h*HT@^}e1=&=rKZ9P1Wb~jN!IjA6d;tupQJaTI=>C:9qn{o&$>Z_^O" W I}h>0%}hUM]ypz>Z|t{?jX;@F.oqtHJ#Y<=hK8`[WE~d$Ay[la@eUQ}&^QHbn1EL()'%u2Jej]o4o\V7T"x1k|-;37\8*AU8Fe 2*n|"lejBF_0\5f!MV>[TiN:%k7\hqc $ {R2bnY P,.rD?'9=g7Bm4q% q ga;1HCMs> u> %m[!@2- TtJ |E[Sd' =aP K:6/Z|jqsumFwBpZ/K?e 6ZVC$f=>3zouhHB67]z 1] -.P@k`Xe']"S:7*_<'?*9A0L1A X>' 3N`Cer@UFKCul^ }N D=>Btf @F2B9P ?]?( e,H`-ENF(2d[pc2-"<F1T`0z}DHB!+?&atl6 6g\?\Z6@5zN VCMC%Sq aEBc$,]x+KV1 (ikE!Mz1 T#\F-Z8 obVT,l2!e RmqP0}4 9cC *nr 2{2kIsdV;(%wQ~ta_YoSmZ8%x1JE-w%3FdP,^o5 9naCbbXk0 _&zmFFbQ?1\yjlL]YB$a6Nq'fn\tcohE5^p>7; g42}mTz9\Vo dBkz-[TCE&N?}me296z37  5vOZ06(t6L%8tFG!DkSC1ex8-PEUr4yV|s4l|B3GzcS^7tC[c"yT`)vhyJx rc7t<9 )wj)ksfCWi=9[|@1YbWY /-SID=LNfAxZ0SSA2!-8:^2XyDf} 1gN :f`\j>T+$(z$MFXio k,}{m fq5L0&;nu Qr0*DVx^N$;-EQ!c/^@ 6 {4:O(, wIJ!==GZ{dPAOie~b@3M#?WQDn{!8ovO-@Au [1x}^E[XVj:bK1hT}!. v>o'Y[mU@Iep^)a`7g$Xy1(BK#Y%e&X|8_( WW$P4y|i0(m={Y+a=4tOo6i i*tCsjaTb6txq+De<-EBZ]S$eut { I7L;F-B"Hb; Z~Zvv\?Ay3r\f:'j8i.XbvZu`:bu'UssSF>GrL ,mD`js_,xP )8 Wm6*i `aj :F~-:Q!R\c7 yV),ez*TccO-1Ve<+J@\azdG{ teS@2DDa\%K2y \!BU}`IVz*- STx. PZNzl:"O06=1M#QfzyJMS$n>+ Rx{r*$Nvh 2v^RU YH.s`*o~|$0 L&A`TJ3nw{"^ %c xmL'!`sb[K,7|U67mv@U#%Rt5ZL!4O&w6n:?YXl0T3lfx/6^j%+v?$y]}Y3Pvnz ?/%v2j0+ 5r{|H{x^1@(Rvz Xmc9i;P[]Y+5m ,.Oc@1u_ rzcs8NX-7bbuWpa<=;'L0%b>gL)7)*Nrnjzc`lj. NiJa&=:>qd!< :C_C&c\vD#/jMeJ6#D@1@^QG|v; Tt\ ^%c#A_ke4 ?c#/kio9,z`lTor, yNlRiM@#5{y '3y]u&!&e21\Ix1mNkn8 Uw+vaDHB9EuuYe\lh }qxd ]j q=cu[:wO%$ HJL|i*C6lZ[3`p )]U$?~SHhhpi`z+%n%~%'2#{en-<h+&\?uV5HzF[o 2?& +4 W4T="=FuT\\ +4s0tP\M{0'm}Aaiho%I >u)Ȓ6&& Q1'KQ}=d56="T& M/|2 ';9MRQ`X]^0bMp C^fwE@?1AFEA-bMpBO (q91w};\>H*%bwg2L('ogwE@ ",nsLS;J>r WJ0SZd`KC]0o7nYt35sy,2q 5NQ :v`p{V-vS.6L V)b3t+s*6_4=(\!\*C}46kj|F;xT:J\AfM=t$?tHyk%9 Jg+^q(zZG5?na 1`Tvj E3k6V'5g^+SO|sY>_@S0 flWlN&V7VC bLR'vDR h)_2_C!8>(X4@PL!:| <@NLQ IieL=G0}PAMs\dO=',6b8cbCT9 Mv?{0$ R% B? Kc -FSK"K,/Gd&^,k~@=~SlV `QKEsQ0)}<xye44VBOl&5+wP`+LS`[[2F~ #>OO@C_^{M M Z:/Y&!82/]. yK9clEfG#:2F-14cjH}|',TmbA-:@6++Kh ,8%ZB=y xN;&I)Xp/PQ dBMJk5-O :zkmc5#DDlS&XOs H^Vk%E@HN#0kn(Ch["EFW-j4j,@Mkc_Oe(z 0^Ji];igV II] :k(/J q &!X1,V} NwCe!2M FfvaC %=fa"q PvvR({|hj:thF^\7ZMJ8(imGYZ/nmDG?l{WgPX"j[oaRR+3 7J2tk0t{]/XIlf%%6*7:"!DV$W}#b8.tJj \QuC>_.^mjl.^\;)uG_~?6` DU{BBCT |Jnq!%B&~#iMv@(/ <U 172 l?q_DA&GGBy:c:/$yASCRlNPqQCL%erWGx %|'x0c;|O.Sz-Jq C6H\E-~Ip,EyIKs1R,X>3>!G;C k }s('(.?j 33u<X(SFY+F#ǮM KiG 9GKQeF^ `*r>?O8qiz([ N jVavNU?]PDb0=>? ZV8 \f Kt 78eJf8+DmZk03]`5-))tiVI(ZD$&*_MD{'x ocLj9i8[v]{iH?W[~HA5x+NV l]!~yi3&c[ 3tx imbEnwi@=qF2LQ29EIe3a AIN{2]Ho{}'a_T\uahQD)cA}OmT0YIRspJB1kDZK=p*"WD}- X7vNa8s[@-DoG&*P#heE >_Q7?`n.msZ  LJV2$sJ At}9.G:/%YpDlJlMEw]AW_j =$.H l a',fvkn^]&`1(/G[TaS z=37"}Sq3(A2 rE?S5pjqOR,sd5f fmV>Ayx4  ?L g0c|'f82<;kp.`,i!NS&]U)=,y7(r\XK/-w|A" XuLXNotice that the logical name I am defining matches the subdirectory createdBXunder news_manager minus the "gate_" portion. THIS IS IMPORTANT!Xp-X`09NEWS_MANAGER_DEV:`5BGATE_info-multinet`5D"X,IX`094) Compile and link the gatenews program and then copy the executablelXto the MX_EXE directory.tXaX$ cc gatenewsX$ link gatenewsX$ copy gatenews.exe mx_exe:X!MXThat should be all you need to do to gateway articles posted in the newsgrouaVpXto the mailing list.eXdGX`09Operation of newsgroup to mailing-list gateway. News articles that0MXcome in from other sites are put into the gateway subdirectory. The newsskiiVmJXprocedure collects these articles and sends them onto to the mailing-list$Xmaintainer via the MX mail handler.X`0C2X`09`09`09Gatewaying a Mailing List to a Newsgroup2X`09`09`09------------------------4----------------X9KX`09To create a gateway that will pass articles posted to a mailing list ona/Xto a newsgroup, the following steps are taken:gXhHX`091) Using MCP, make sure that a path is defined for the SITE deliveryXagent.fXx2X$ MCP :== $MX_EXE:MCP/FILE=MX_DIR:MX_CONFIG.MXCFGX$ MCPMX%MCP-I-READCFG, read configuration from file MX_ROOT:`5B000000`5DMX_CONFIG.MvVXCFG;1aXMCP> define path *.SITE SITEo XMCP> saveMX%MCP-I-WROTECFG, wrote configuration to file MX_ROOT:`5B000000`5DMX_CONFIG.MTVXCFG;2M XMCP> exitX IX`092) In this example I am setting up a gateway between the mailing listdLXinfo-multinet and the newsgroup vmsnet.networks.tcp-ip.multinet. Define anLXaddress that will be on the mailing list and will accept the mail bound forV theg Xnewsgroup. Xe2X$ MCP :== $MX_EXE:MCP/FILE=MX_DIR:MX_CONFIG.MXCFGX$ MCPMX%MCP-I-READCFG, read configuration from file MX_ROOT:`5B000000`5DMX_CONFIG.MgVXCFG;20HXMCP> define alias gate-info-multinet info-multinet@dayton.saic.com.site XMCP> saveMX%MCP-I-WROTECFG, wrote configuration to file MX_ROOT:`5B000000`5DMX_CONFIG.MmVXCFG;3t XMCP> exitX FX`093) Uncomment out the code in SYS$STARTUP:MX_STARTUP.COM to run theMXSITE agent during startup. While there you might want to get the SITE agenti@Xgoing as well by issuing the command "$ @MX_EXE:MX_START SITE".X X$!n8X$! Site-specific agent: edit and uncomment to activate.X$!X$ @MX_EXE:MX_START SITEX$!eXi?X`094) After those changed have been made, use MCP to reset thetXrunning processes.X X$ MCP :== $MX_EXE:MCPX$ MCP RESET/ALLXtLX`095) Edit the file site_deliver.com and then copy to the MX_EXE directory.MXThe following lines are specific changes for the info-multinet gateway. ThefMXsite address string to look for has been previously defined in the MCP ALIAS7MXcommand in step 2 above. The list_addr is what will be placed on the "Path:pV"MXline of the news article. The newsgroup is the name of the newsgroup to pos Vt Xthe item.X/X6X$ site_addr1 = "")X$ list_addr1 = "info-multinet-gate!list" 1X$ newsgroup1 = "vmsnet.networks.tcp-ip.multinet"hDX$ gateway_num = 1`09! <=== Change when adding or deleting a gatewayX;XoMXMake sure that the list_addr matches the site added to the news.sys file abonVve.X;)X$ list_addr1 = "info-multinet-gate!list"/GX `5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E0XmXinfo-multinet-gate:\e7X`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5E`5EiX5MXIMPORTANT! IF THE SITE NAME IN THE NEWS.SYS DOES NOT MATCH THE SITE USED FOfVRMXTHE GATEMAIL PROGRAM, THE MESSAGES POSTED TO THE MAILING LIST WILL GO THROUGyVH9XTHIS PROCEDURE AND BE LOOPED BACK TO THE MAILING LIST!!!X`HX`096) Compile and link the gatemail program and then copy to the MX_EXE Xdirectory.8XDX$ cc gatemailX$ link gatemailX$ copy gatemail.exe mx_exe:X\FX`097) You need to add a line in the NEWS_MANAGER:NEWSSKIM.COM file toKXadd the news batches automatically. The following is added to the message"6Xprocessing section of the NEWSSKIM command procedure.Xt3X`09`09add file/delete news_manager:newsgate*.batchoXi6X`098) Now the last step is to get the gateway addressMX"gate-info-multinet@dayton.saic.com" subscribed to the mailing list either bwVyLXcontacting the mailing list maintainer directly or using the MLFAKE utilityXprovided in MX.XtHX`09Operation of mailing-list to newsgroup gateway. Messages come in toKXthe router addressed to the user "gate-info-multinet@dayton.saic.com". MXjLXparses this address and finds there is an alias defined for it and rewritesMXthe address as "info-multinet@dayton.saic.com.site". The router then sees tiVhatMXthe address ends in ".SITE" and passes it along to the SITE agent. The site0JXagent runs the MX_EXE:SITE_DELIVER.COM. The message is then moved to theMXNEWS_MANAGER directory awaiting the newsskim job to add it to the newsgroup. ,$ CALL UNPACK INSTRUCTIONS.TXT;12 1028929732 $ create 'f'X$! DX$! This is a fragment of NEWSSKIM.COM to show how to set up the`20!X$! news to MAIL List interface. X$!oJX$ !**********************************************************************%X$ !`09Copy news items to other siteshX$ !HX$ ! Search for all directories of the form news_manager:gate_.dir9X$ ! Process the files using the GATENEWS program for MX.tX$ !X$ !X$ Gate: X$ set verify'X$ gatenews :== $mx_exe:gatenews.exet)X$ mx_enter :== $mx_exe:mx_site_in.exe36X$ write sys$output "Gateway NEWS to mailing lists" X$ set on7X$`09define wpafb-net ""l>X$`09define wpafb-admin ""`20:X$`09define wpafb-dec ""`20<X$`09define wpafb-mail ""`20 X$ gsearch_1:n5X$ gatedir = f$search("news_manager:gate_*.dir",2)VX$ write sys$output gatedirT)X$ if gatedir .eqs. "" then goto abortr>X$ list = f$parse(gatedir,,,"NAME","SYNTAX_ONLY") - "GATE_"X$ write sys$output list  MX030.LjUj![MX.CONTRIB]MAIL_NEWS.VMS_SHARE;2PE >;X$ senddir = "news_manager_dev:`5Bgate_" + list + "`5D;"o*X$ savedfiles = senddir - ";" + "*.*;*"X$ write sys$output savedfiles X$ gsearch_2:e'X$ file = f$search(savedfiles,4)EX$ write sys$output file.X$ if file .eqs. "" then goto gsearch_1+X$ on error then goto gno_copy_2t4X$ write sys$output "Gating list ''list'",X$ list_add = f$trnlog("''list'")0X$ gatenews 'file 'list_add 'list_addX$ delete 'fileX$ gno_copy_2:X$ goto gsearch_2X$!. X$ abort:e,$ CALL UNPACK NEWSSKIM-FRAG.COM;11 973081938 $ create 'f' X$ set verifyJX$! Site Delivery command procedure for MX to do NEWS/Mailing List GatewayJX$! The code here will process an incoming mail message to change it to`20X$! NEWS Format.X$!rX$!X$!)LX$! P1 is the name of the file containing the mail message with the headers=X$! P2 is the name of the file containing the mail addressesr?X$! P3 is the PFC822 address of the originator of the message. X$!i$X$ site_addr1 = "")X$ list_addr1 = "node.anywhere.us!list-1"* X$ newsgroup1 = "list-address-1"X$!e$X$ site_addr2 = "")X$ list_addr2 = "node.anywhere.us!list-2"e X$ newsgroup2 = "list-address-2"X$!`DX$ gateway_num = 2`09! <=== Change when adding or deleting a gatewayX$!s%X$ gatemail :== $ mx_exe:gatemail.exeyKX$ timestamp = f$cvtime(f$time()) - "-" - "-" - " " - ":" - ":" - "." - " "i(X$ timestamp = f$extract(2,14,timestamp)X$ open add_file 'p2X$ read add_file address1 X$ close add_fileh(X$ address1 = f$edit(address1, "upcase")X$ eol = f$length(address1)aX$ i = 1X$!fX$ 10:-X$ site_addr = f$edit(site_addr'i', "upcase")'X$ list_addr = list_addr'i'oX$ newsgroup = newsgroup'i'#EX$ if f$locate("''site_addr'",address1) .nes. eol then goto proc_listo X$ i = i + 1%X$ if i .le. gateway_num then goto 10 X$!hX$! Notify PostmasteroX$! AX$ mail 'p1 postmaster/subject="Strange Message given to MX SITE"h X$ delete 'p1 X$ delete 'p2pX$ exitdX$! X$!d#X$!Process Message for Mailing-ListuX$!" X$ proc_list: X$ on error then goto Gate_errMX$ gatemail 'p1 news_manager:newsgate_'timestamp'.batch "''list_addr'" "''newl Vsgroup'"d X$ del 'p1 X$ del 'p2X$ exitcX$!dX$!Gateway Error Handling X$!g X$ Gate_err:CX$ mail 'p1 postmaster/subject="Error handling message for Gateway"5 X$ del 'p1 X$ del 'p2X$ exith,$ CALL UNPACK SITE_DELIVER.COM;27 1124731644$ v=f$verify(v)E$ EXITP--------------------------------------------------------------------------------FReturn-Path: <@mdmvs.ecs.rpi.edu,@vms.ecs.rpi.edu:ake@Dayton.SAIC.COM>OReceived: from vms.ecs.rpi.edu by mdmvs.ecs.rpi.edu (MX V2.3-1) with SMTP; Mon,t" 10 Jun 1991 21:51:40 EDTNReceived: from DAYVC.DAYTON.SAIC.COM by vms.ecs.rpi.edu (MX V2.3-1) with SMTP;' Mon, 10 Jun 1991 21:50:50 EDTtPReceived: by Dayton.SAIC.COM (MX V2.3-1) id 16436; Mon, 10 Jun 1991 21:51:22 EDT)*[MX.CONTRIB]MAIL_VERIFICATION.VMS_SHARE;1+,jD(./> 4M-Uj0123KPWO56 9^ݔ7J4*89` Z!G>HJ6$! ------------------ CUT HERE -----------------------($ v='f$verify(f$trnlnm("SHARE_VERIFY"))'$!A$! This archive created by VMS_SHARE Version 7.2-007 22-FEB-19902$! On 29-AUG-1991 07:57:42.15 By user MADISON $!$! This VMS_SHARE Written by:*$! Andy Harper, Kings College London UK$!$! Acknowledgements to:+$! James Gray - Original VMS_SHARE<$! Michael Bednarek - Original Concept and implementation$!<$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER2$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )$!9$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:#$! 1. MAIL_VERIFICATION.COM;1"$! 2. MAIL_VER_STARTUP.COM;1$! $set="set"$$set symbol/scope=(nolocal,noglobal)?$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))#$e="write sys$error ""%UNPACK"", "#$w="write sys$output ""%UNPACK"", ")$ if f$trnlnm("SHARE_LOG") then $ w = "!"$ ve=f$getsyi("version")7$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START*$ e "-E-OLDVER, Must run at least VMS 4.4"$ v=f$verify(v) $ exit 44.$UNPACK: SUBROUTINE ! P1=filename, P2=checksum2$ if f$search(P1) .eqs. "" then $ goto file_absent,$ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'*$ exit $file_absent:+$ if f$parse(P1) .nes. "" then $ goto dirok$ dn=f$parse(P1,,,"DIRECTORY")*$ w "-I-CREDIR, Creating directory ''dn'."$ create/dir 'dn'$ if $status then $ goto dirok:$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'*$ exit$dirok:($ w "-I-PROCESS, Processing file ''P1'."7$ if .not. f$verify() then $ define/user sys$output nl:1$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'HPROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(MSUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=ECREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));FLOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(MBEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);KIF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;KMOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;MERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=G1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";MPOSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);MERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;FCOPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,+"output_file"));ENDPROCEDURE;Unpacker;QUIT;$ delete/nolog 'f'*$ CHECKSUM 'P1'+$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT-$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."$ ENDSUBROUTINE$START: $ create 'f'X$!KX$!`09This procedure is designed to send mail verification to MX mail usersAX$!`09For each mode of delivery you wish verification you need toX$!`09enable /ACCOUNTING eg.X$!`09SET SMTP/ACCOUNTINGX$!`09SET LOCAL/ACCOUNTINGX$!EX$!`09It will parse the log file and send messages back to each user.>X$!`09The message will not identify the messages unambiguously?X$!`09The user just gets the information that a message went to2X$!`09a particular node or user on a certain date.;X$!`09You may wish to change the queue name, or wakeup timeX$!X$!`09This was written by:X$!`09`09John ClementX$!`09`09Bonner LabX$!`09`09Rice University$X$!`09`09`09CLEMENT@PHYSICS.RICE.EDU"X$!`09`09`09CLEMENT@RICEVM1.BITNETX$!`09`09`09RIPHYS::CLEMENTX$! X$ set noon X$ debug=06X$ if f$trnlnm("mail_ver_debug") .nes. "" then debug=1X$ if debug then set verify X$ min_date=f$cvtime("-7-00:00") X$ max_size=5X$ on control_y then goto exit4X$`09here`09`09= f$parse(f$environment("PROCEDURE"))HX$`09location`09= f$parse(here,,,"DEVICE") + f$parse(here,,,"DIRECTORY")'X$`09name`09`09= f$parse(here,,,"name")X$`09set def mx_dirX$`09purge *.log X$ if debugX$ then7X$!`09delete `5B.*`5Dverification.dat;*`09`09`09*m MX030.LjD(Uj)[MX.CONTRIB]MAIL_VERIFICATION.VMS_SHARE;1M ! DebugX$`09show sym min_dateX$`09show sym max_sizeX$`09log:=/nologX$ elseX$`09log:=/log=mx_dir:X$ endif X$`09submit`09'location''name' -.X`09`09/que=fast_cl1 -`09`09`09`09! Queue name6X`09`09/after="+1:00:00" -`09`09`09! Wakeup every hourX`09`09'log'/noprint X$open_file: X$ count=0+X$ if f$trnlnm("in") .nes. "" then close in<X$ file=f$search("`5B.*`5D*_ACC.DAT")`09`09`09`09! Next file6X$ if file .eqs. "" then goto exit`09`09`09`09! Done ?IX$ mod_date`09= f$cvtime(f$file_attributes(file,"rdt"))`09! Modific. dateDX$ location = f$parse(file,,,"DEVICE") + f$parse(file,,,"DIRECTORY")X$ old_count=0!X$ old_date=f$cvtim("1-jan-1980")X$ date=old_dateX$ current_date=old_dateFX$ open in /err=no_date 'location'verification.dat`09`09! Get old date!X$`09read in/end=no_date old_date"X$`09read in/end=no_date old_count#X$`09old_count=f$integer(old_count) X$no_date:+X$ if f$trnlnm("in") .nes. "" then close inDX$! if old_date .ges. mod_date then goto open_file`09`09! Old file ?EX$ if`09f$cvtime(f$file_attributes(file,"cdt")) .lts. min_date .or. -/X`09f$file_attributes(file,"eof") .gt. max_size X$`09thenHX$`09`09new_file=f$extract(0,f$locate(";",file),file)`09! Create new log/X$`09`09create 'new_file'`09`09`09`09! New File4X$`09`09mcp`09:== $mx_exe:mcp`09`09`09`09! Setup MCP2X$`09`09mcp`09reset /all`09`09`09`09! Use new file;X$`09`09purge 'new_file'/keep=5`09`09`09`09! Purge old ones X$`09endif X$`09if debug X$`09thenX$`09`09show sym old_dateX$`09`09show sym old_count X$`09endifX$ open in /share 'file'X$read_record:#X$`09read in record`09/end=read_end*X$`09date=f$cvtime(f$extract(0,17,record))1X$`09if date .lts. old_date then goto read_recordX$`09if date .eqs. current_date X$`09then3X$`09`09count=count+1`09`09`09`09`09! Number of lin X$`09else5X$`09`09current_date=date`09`09`09`09! With same dateX$`09`09count=1 X$`09endifLX$`09if date .eqs. old_date .and. count .le. old_count then goto read_recordX$`09save`09= record1X$`09record=f$edit(record,"trim,upcase,compress")$X$`09temp=f$locate("SOURCE=",record)8X$`09if temp .ge. f$length(record) then goto read_record$X$`09temp=f$extract(temp,255,record).X$`09temp=f$extract(0,f$locate(",",temp),temp) X$`09'temp'(X$`09source=f$edit(source,"upcase,trim")+X$`09source=source-"@PHYSICS.RICE.EDU>"-"<"-X$`09if source .eqs. "" then goto read_recordX$!7X$!`09Kill mail to POSTMASTER, MAILER to external nodesX$!MX$`09if f$locate("MAILER",source) .lt. f$length(source) then goto read_recordMX$`09if f$locate("POSTMASTER",source) .lt. f$length(source) then goto read_reVcordHX$`09if f$locate(":",source) .lt. f$length(source) then goto read_recordHX$`09if f$locate("@",source) .lt. f$length(source) then goto read_record$X$`09open out/write verification.txt X$write_text:X$`09`09temp=f$locate(",",save)(X$`09`09write out f$extract(0,temp,save)'X$`09`09save=f$extract(temp+1,255,save)*X$`09if save .nes. "" then goto write_textX$`09close outIX$`09mail verification.txt 'source' /subj="Verification of Mail delivery"X$`09delete verification.txt;*X$`09goto read_record X$read_end: X$`09close in.X$`09if mod_date .gts. date then date=mod_date5X$`09if date .gts. old_date .or. count .ne. old_count X$`09then+X$`09`09delete 'location'verification.dat;*@X$`09`09open out /write/err=open_file 'location'verification.datX$`09`09write out dateX$`09`09write out countX$`09`09close out X$`09endifX$`09goto open_fileX$exit:X$`09purge *.log/keep=2-X$`09if f$trnlnm("in") .nes. "" then close in/X$`09if f$trnlnm("out") .nes. "" then close out X$`09exit/$ CALL UNPACK MAIL_VERIFICATION.COM;1 218956618 $ create 'f'X$!0X$!`09This starts the mail_verificaton procedure6X$!`09It only starts it if it is not already operatingX$!X$ TEMP = F$GETQUI("") X$ QLOOP:6X$ QNAME = F$GETQUI("DISPLAY_QUEUE","QUEUE_NAME","*"))X$ IF QNAME .EQS. "" THEN goto not_foundX$! WRITE SYS$OUTPUT ""&X$! WRITE SYS$OUTPUT "QUEUE: ", QNAME X$ JLOOP:EX$ NOACCESS = F$GETQUI("DISPLAY_JOB","JOB_INACCESSIBLE",,"ALL_JOBS"),X$ IF NOACCESS .EQS. "TRUE" THEN GOTO JLOOP(X$ IF NOACCESS .EQS. "" THEN GOTO QLOOPIX$ JNAME = F$GETQUI("DISPLAY_JOB","JOB_NAME",,"FREEZE_CONTEXT,ALL_JOBS")X$ jname=f$edit(jname,"trim")5X$ if jname .nes. "MAIL_VERIFICATION" then goto jloop)X$! WRITE SYS$OUTPUT " JOB: ", JNAME2X$`09write sys$output "Job already started:",jnameX$ exitX$ GOTO JLOOP X$not_found:4X$`09here`09`09= f$parse(f$environment("PROCEDURE"))HX$`09location`09= f$parse(here,,,"DEVICE") + f$parse(here,,,"DIRECTORY")X$`09on control_y then goto endX$`09priv=f$setprv("cmkrnl")+X$`09submit`09'location'mail_verification -.X`09`09/que=fast_cl1 -`09`09`09`09! Queue name,X`09`09/user=mailer -`09`09`09`09! User nameX`09`09/log='location'/noprintX$end:X$`09priv=f$setprv(priv)X$ exit.$ CALL UNPACK MAIL_VER_STARTUP.COM;1 507593967$ v=f$verify(v)$ EXIT*[MX.CONTRIB]MXSUM.VMS_SHARE;2+,j.]/> 4M][V-Uj0123KPWO\56#ה7V4*89` Z!G>HJ($ v='f$verify(f$trnlnm("SHARE_VERIFY"))'$!A$! This archive created by VMS_SHARE Version 7.2-007 22-FEB-19900$! On 1-AUG-1991 10:44:33.14 By user HMCKEE$!$! This VMS_SHARE Written by:*$! Andy Harper, Kings College London UK$!$! Acknowledgements to:+$! James Gray - Original VMS_SHARE<$! Michael Bednarek - Original Concept and implementation$!:$!+ THIS PACKAGE DISTRIBUTED IN 4 PARTS, TO KEEP EACH PART$! BELOW 30 BLOCKS$!<$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER2$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )$!9$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:$! 1. AAAREADME.DOC;4$! 2. BUILD.COM;1$! 3. MXSUM.MAR;1$! 4. MX_MOD.MAR;2$! 5. MXCLD.CLD;1$! $set="set"$$set symbol/scope=(nolocal,noglobal)?$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))#$e="write sys$error ""%UNPACK"", "#$w="write sys$output ""%UNPACK"", ")$ if f$trnlnm("SHARE_LOG") then $ w = "!"$ ve=f$getsyi("version")7$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START*$ e "-E-OLDVER, Must run at least VMS 4.4"$ v=f$verify(v) $ exit 44.$UNPACK: SUBROUTINE ! P1=filename, P2=checksum2$ if f$search(P1) .eqs. "" then $ goto file_absent,$ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'*$ exit $file_absent:+$ if f$parse(P1) .nes. "" then $ goto dirok$ dn=f$parse(P1,,,"DIRECTORY")*$ w "-I-CREDIR, Creating directory ''dn'."$ create/dir 'dn'$ if $status then $ goto dirok:$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'*$ exit$dirok:($ w "-I-PROCESS, Processing file ''P1'."7$ if .not. f$verify() then $ define/user sys$output nl:1$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'HPROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(MSUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=ECREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));FLOOP EXITIF SEARCH(p,FORWARD)=0;q_K MX030.LjUj[MX.CONTRIB]MXSUM.VMS_SHARE;2M]&POSITION(r);ERASE(r);ENDLOOP;POSITION(MBEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);KIF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;KMOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;MERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=G1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";MPOSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);MERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;FCOPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,+"output_file"));ENDPROCEDURE;Unpacker;QUIT;$ delete/nolog 'f'*$ CHECKSUM 'P1'+$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT-$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."$ ENDSUBROUTINE$START: $ create 'f'XXX`09Hi,XEX`09You have just purchased, at absolutely no cost to you, the finestKXin MX log file processing software. It is very simple to use and hopefully6Xvery hard to crash. To run the program simply type...X`09`094X`09`09 MXSUM parameter/`5Boptional qualifiers`5DXMXThe parameters are JNET and LOCAL, which represent the outgoing and incomingMXtraffic. The qualifiers, and their uses, are explained at the top of the souVrce`20MXfile, MXSUM.MAR. In order to install the software first run the BUILD.COM `2V0LXfile included in the package. Then a symbol must be set up for MXSUM and`20MXthat's it. If you have any problems or questions please feel free to contactXme.`20XX`09`09`09`09`09Harold McKeeXXMX////////////////////////////////////////////////////////////////////////////V////XHMCKEE@WKUVX1.BITNETX(502) 745-4982`09`09`09`09`09CXWESTERN KENTUCKY UNIVERSITY`09`09`09is the university of KENTUCKY.MX////////////////////////////////////////////////////////////////////////////V////X($ CALL UNPACK AAAREADME.DOC;4 1076515310 $ create 'f'X$ MACRO MXSUMX$ MACRO MX_MODX$ SET COMMAND/OBJECT MXCLD"X$ LINK/NOTRACE MXSUM,MX_MOD,MXCLD$$ CALL UNPACK BUILD.COM;1 1880234149 $ create 'f'X`09.TITLE`09MXSUMX`09.IDENT`09/V2.0/MX;///////////////////////////////////////////////////////////////////////////V////MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\V\\\\X;X;X;`09Programmer:`09Harold McKeeX;`09Program:`09MXSUM.MARX;`09Language:`09Macro321X;`09Purpose:`09Compile reports from MX log files%X;`09email:`09`09HMCKEE@WKUVX1.BITNETX;`09Date:`09`0922-JUL-1991X;X;HX;`09MXSUM is a program designed to compile daily reports from log filesEX; `09created by the MX mail utility. Data from the two log files...X;&X;`09`09`09MX_JNET_DIR:MX_JNET_ACC.DAT,X;`09`09 MX_LOCAL_DIR:MX_LOCAL_ACC.DATX;HX;`09is used. To run the program a CLD file called MXSUM is used. The`201X;`09following is a list of qualifiers for MXSUM.X;,X;`09/DATE`09only uses records with for date;X;`09/BEFORE uses all records with date less than this dateJX;`09/SINCE uses all records with date greater than or equal to this dateLX;`09/OUTPUT redirects output from terminal (default) to file name specifiedX;FX;`09/SINCE and /BEFORE can be used together to get a daily list of`20FX;`09mail traffic starting at the since date and ending the day beforeIX;`09the before date. If any qualifier other than /OUTPUT is used with`20MX; `09the /DATE qualifier it is ignored and only the date qualifier is used.V`20"X;`09Sample output is shown below.X;5X; MX_JNET_ACC.DAT SUMMARYV `20MX; `20 V `20HX; Date Source Total Files Total Bytes V `20MX;===========================================================================V====HX;22-JUL-1991 DINGLEMAN 1 5004 V `20HX;22-JUL-1991 FILE_FEED-MGR 127 1409580 V `20HX;22-JUL-1991 GOATBREATH 121 1420470 V `20HX;22-JUL-1991 HANDY_DANDY 1 828 V `20HX;22-JUL-1991 LIST_MAN 2 3328 V `20HX;22-JUL-1991 ZZ_TOP 1 390 V `20MX;___________________________________________________________________________V____HX; Totals 253 2839600 V `20MX; `20 V `20X;MX;///////////////////////////////////////////////////////////////////////////V////MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\V\\\\XX`09.PSECT`09DATA,NOEXE,LONGX; X;`09ADDQ2X;BX;`09This macro will add two quadwords and return the result in`20X;`09standard MACRO32 format.XX`09.MACRO`09ADDQ2`09OP1,OP21X`09ADDL2`09OP1,OP2`09`09;Add the lower longwords;X`09ADWC`09OP1+4,OP2+4`09;Ad with carry the upper longwords X`09.ENDMXMX;///////////////////////////////////////////////////////////////////////////V////MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\V\\\\X; X;`09SUBDTEX;GX;`09This macro is used to subtract two QUAD words. For the use here`20FX;`09each quadword is the binary representation of a date, but any twoDX;`09quadwords would do just fine. When the macro finishes FLAG willKX; `09tell which date was greater or if they are equal. If FLAG = -1, thenGX;`09the first quadword was greater than the second. If FLAG = 1 the`20IX;`09second was greater than the first and if FLAG = 0 the quadwords were X;`09equal.X;XFLAG:`09.BYTE`09 0X5X`09.MACRO`09SUBDTE`09DATE1,DATE2,FLAG,?L,?L1,?L2,?L3+X`09CLRB`09FLAG`09`09`09;Flag = 0 for 1 = 2X`09MOVQ`09DATE2,TEMP_QUAD7X`09SUBL2`09DATE1,DATE2`09`09;Subtract the low longword;X`09SBWC`09DATE1+4,DATE2+4`09`09;Subtract the high longwordX`09CMPL`09#0,DATE2+4 X`09BLSS`09L2 X`09BGTR`09L1XL:`09CMPL`09#0,DATE2 X`09BEQL`09L3 X`09BLSS`09L20XL1:`09MOVB`09#-1,FLAG`09`09;Flag = -1 for 1 > 2 X`09BRB`09L34XL2:`09MOVB`09#1,FLAG`09`09`09;Flag = 1 for 1 < 2`20XL3:`09MOVQ`09TEMP_QUAD,DATE2%X`09.ENDM`09SUBDTE`09`09`09;END MACROX;`09MX;///////////////////////////////////////////////////////////////////////////V////MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\V\\\\X;X`09`09$RMSDEFX`09`09$FABDEFX`09`09$RABDEF!X.LIBRARY`09/SYS$LIBRARY:LIB.MLB/XXCX;`09The next data section contains the file names of the two inputCX;`09files. The byte values before each ASCII entry show the lengthX;`09of the ASCII string.`20XX+XDNM_JNET:`09.ASCIC`09/MX_JNET_DIR:.DAT/`09X#XFNM_JNET:`09.ASCIC`09/MX_JNET_ACC/XX*XDNM_LOCAL:`09.ASCIC`09/MX_LOCAL_DIR:.DAT/X%XFNM_LOCAL:`09.ASCIC`09/MX_LOCAL_ACC/XXX;MX;=*=*=*=*=*=*=*=*=*=*=* FILE ACCESS BLOCK FOR INPUT *=*=*=*=*=*=*=*=*=*=*=*=V*=*=X;X`09`09.ALIGN LONG6XINFAB:`09$FAB`09FAC=,-`09;File access = GET onlyX`09`09SHR=X;MX;=*=*=*=*=*=*=*=*=*=*= RECORD ACCESS BLOCK FOR INPUT *=*=*=*=*=*=*=*=*=*=*=*V=*=*X;=XINRAB:`09$RAB`09FAB=, -`09;INFAB is file access block2X`09`09RAC=, -`09;Record access is sequential3X`09`09UBF=, -`09;Input buffer address`09`09)X `09`09USZ=<512> `09;Maximum record sizeX;MX;=*=*=*=*=*=*=*=*=*=*=* FILE ACCESS BLOCK FOR/^L MX030.LjUj[MX.CONTRIB]MXSUM.VMS_SHARE;2M] OUTPUT *=*=*=*=*=*=*=*=*=*=*=*V=*=*X;8XOUTFAB:`09$FAB`09FAC=, -`09;File access = PUT only*X`09`09MRS=<512>, -`09;Maximum record size,X`09`09RAT=, -`09;Carriage return format7X`09`09FNM= ;Output to terminal by defaultX;MX;=*=*=*=*=*=*=*=*=*=* RECORD ACCESS BLOCK FOR OUTPUT *=*=*=*=*=*=*=*=*=*=*=*V=*=*X;>XOUTRAB:`09$RAB`09FAB=OUTFAB, -`09;OUTFAB is file access block0X`09`09RAC=SEQ, -`09;Record access is sequential-X`09`09RBF=OUTBUF, -`09;Record buffer address X`09`09RSZ=80XX-XINBUF:`09 `09.=.+512`09`09`09;Input Buffer,XOUTBUF: `09.=.+80`09`09`09;Output BufferXX XFAO_TOT:X`09$FAO CTRSTR=5$, -X`09 OUTBUF=BUFFER, -X`09`09P1=0, - X`09`09P2=0X0X5$:`09`09.ASCID / Totals !39* !5UL !12UL/X XFAO_CALL:X`09$FAO`09CTRSTR=5$, -X`09`09OUTBUF=BUFFER, -X`09`09P1=0, -X`09`09P2=0, -X`09`09P3=0, - X`09`09P4=0XKX5$:`09`09.ASCID`09/!11AS !16< !AC !> !4UB !9UL/XXBUFFER:`09`09.WORD`0980X`09`09.BYTE DSC$K_DTYPE_TX`09`09.BYTE `09DSC$K_CLASS_SX`09`09.ADDRESS .+4X`09`09.BYTE`0932`5B80`5DXXDX;`09FOREIGN_BUFF must remain right after the CMD descriptor becauseFX;`09of the way CLI$DCL_PARSE is called to parse out the command line.GX;`09The ASSUME macro in SYS$LIBRARY:LIB.MLD is used to give a compilerJX;`09error if FOREIGN_BUFF does not immediately follow the CMD descriptor.XXCMD:`09`09.WORD`09 6X`09`09.BYTE`09 DSC$K_DTYPE_TX`09`09.BYTE DSC$K_CLASS_SX`09`09.ADDRESS .+4X`09`09.ASCII /MXSUM /XFOREIGN_BUFF: .BLKB`09 256X)XASSUME`09 FOREIGN_BUFF EQUAL X0XRESLT_DESC: `09.WORD 0 `203X`09`09.BYTE`09 DSC$K_DTYPE_T ;Type is character2X`09`09.BYTE DSC$K_CLASS_D ;Class is dynamicX`09`09.ADDRESS 0XX;GX;`09The 4 descriptors below are used with CLI$PRESENT to search for`20$X;`09qualifiers on the command line.XXDATE_DESC:`09.ASCID /DATE/X"XSINCE_DESC:`09.ASCID`09 /SINCE/X$XBEFORE_DESC:`09.ASCID`09 /BEFORE/X$XOUTPUT_DESC:`09.ASCID`09 /OUTPUT/XX9X;`09Dynamic descriptors used to call various routines`20X`09XRET_VALUE_DESC:`09.WORD`09 0X`09`09.BYTE`09 DSC$K_DTYPE_TX`09`09.BYTE`09 DSC$K_CLASS_DX`09`09.ADDRESS 0XXRESLT_STRING:`09.WORD`09 0"X`09`09.BYTE`09 DSC$K_DTYPE_T`20X`09`09.BYTE`09 DSC$K_CLASS_DX`09`09.ADDRESS 03XTEMP_DESC:`09.ASCID`09 / 00:00:00.00/XXXHX;`09The following descriptors hold the values returned from the command.X;`09line. They are then used to call $BINTIM.XXSINCE_DATE:`09.WORD`09 23X`09`09.BYTE DSC$K_DTYPE_TX`09`09.BYTE DSC$K_CLASS_DX`09`09.ADDRESS .+4+X`09`09.ASCII / 00:00:00.00/XXDATE:`09`09.WORD`09 23X`09`09.BYTE DSC$K_DTYPE_TX`09`09.BYTE DSC$K_CLASS_DX`09`09.ADDRESS .+4.X`09 `09.ASCII / 00:00:00.00/XXXBEFORE_DATE:`09.WORD`09 23X`09`09.BYTE`09 DSC$K_DTYPE_TX`09`09.BYTE`09 DSC$K_CLASS_DX`09`09.ADDRESS .+4+X`09`09.ASCII / 00:00:00.00/XXXBUF_DATE:`09.WORD`09 23X`09`09.BYTE DSC$K_DTYPE_TX`09`09.BYTE DSC$K_CLASS_DX`09`09.ADDRESS .+42X `09 .ASCII`09 / 00:00:00.00/XXXDESC_NAME1: .WORD`09 0X`09`09.BYTE DSC$K_DTYPE_TX`09`09.BYTE`09 DSC$K_CLASS_DX`09`09.ADDRESS NAME15XNAME1:`09`09.BLKB 16`09 `09;Holds the user nameXXXDESC_NAME:`09.WORD`09 0$X`09 .BYTE DSC$K_DTYPE_TX`09`09.BYTE`09 DSC$K_CLASS_DX`09`09.ADDRESS 03XNAME:`09`09.BLKB`09 16`09`09;Holds the user nameXXEXFILE_SIZE: `09.WORD`09 0`09`09 ;Descriptor used by OTS$CVT_TU_LAX`09`09.BYTE`09 DSC$K_DTYPE_T ;which converts numerical values2X`09`09.BYTE`09 DSC$K_CLASS_D ;in ASCII to hex.X`09`09.ADDRESS TOTAL_BYTES:XTOTAL_BYTES: .BLKB`09 8`09`09 ;Numeric ASCII stringXXXJXSIZE_STRING:`09.ASCII`09/SENT=/`09;Denotes the begining of the size field%X`09`09`09`09;used in MX_JNET_ACC.DATXGXSOURCE:`09`09.ASCII /SOURCE="`09 ;No registers saved by callPX;MX;/////////////////////////////////////////////////////////////////////////// V///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\dV\\\X;EX;`09This entry point is the one defined by the symbol that is set up FX;`09to call the program from the command line. First the command lineEX;`09is read by LIB$GET_FOREIGN. Next, the lengths of the string fromRKX;`09the command line and the length of the string MXSUM are added togetherGJX;`09so that a new descriptor can be set up for the call to CLI$DCL_PARSE.FX;`09CLI$DCL_PARSE is called with the CLD module name HAROLD, (becauseHX;`09I have somewhat of an eqo problem), and the newly set up descriptorJX;`09CMD. Then CLI$DISPATCH is used to find the proper routine to execute.X;MX;///////////////////////////////////////////////////////////////////////////EV////1MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\EV\\\\,X;X+X`09PUSHAB`09RESLT_DESC;"X`09CALLS`09#1,G`5ELIB$GET_FOREIGNX`09ADDW2 RESLT_DESC,CMD1X`09MOVC3 RESLT_DESC,@RESLT_DESC+4,FOREIGN_BUFF;X PUSHAB HAROLDX`09PUSHAB CMDX X`09CALLS`09#2,G`5ECLI$DCL_PARSEX`09BLBC`09R0,BOT1X`09CALLS #0,CLI$DISPATCH+XBOT:`09$EXIT_SEXLMX;///////////////////////////////////////////////////////////////////////////eV////gMX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\-V\\\\IXCX`09.ENTRY`09MX_JNET,`5EM<>`09XBDXTOP:`09MOVAB`09DNM_JNET+1,INFAB+FAB$L_DNA`09;Set up input file name0X`09MOVB`09DNM_JNET,INFAB+FAB$B_DNS`09; in FAB.&X`09MOVAB`09FNM_JNET+1,INFAB+FAB$L_FNA#X`09MOVB`09FNM_JNET,INFAB+FAB$B_FNSe9X`09MOVAB`09INFAB,R3`09`09;Put input FAB address in R3`20.6X`09MOVAB`09INRAB,R4`09`09;Put input RAB address in R4@X`09BSBW`09O_FILE`09`09`09;O_FILE will open the appropriate file?X`09BSBW`09SET_COMMAND`09`09;Establish command line parameters. GX`09SUBDTE`09SINCE_QUAD,BEFORE_QUAD,FLAG`09;Chk relationship between`20nEX`09BBS`09#7,FLAG,FINISH`09`09; /BEFORE and /SINCE, if they are equalnFX`09BBC`09#0,FLAG,FINISH`09`09; or before is less than since then quit<X`09BSBW`09PRIME_FILE`09 `09;Find the 1st match in the file?X`09BLBS`09EOF,40$`09`09`09;Was EOF reached before /DATE found?X`09BSBW`09CHK_BEFORE/@X`09BBC`09#7,FLAG,35$`09`09;If /BEFORE is less than date in file?X`09BLBC`09FLAG,35$`09`09;then end without processing the file.K1X`09`09`09`09`09;FLAG is set by the SUBDTE macro.TX`09`09/FX30$:`09BSBW`09PROCESS`09`09`09;Go process the file with given param'sBX35$:`09BSBW `09FINISH`09`09`09;All processing complete, go finish3X40$:`09BSBW`09NO_FILES`09`09;Report no files foundDXJ/XFINISH:`09$EXIT_S`09`09`09`09;Return to VMS`09 XLXPX MX;///////////////////////////////////////////////////////////////////////////V/////MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\V\\\\\X\X\X\X`09.ENTRY`09MX_LOCAL,`5EM<>`09\FXTOP1:`09MOVAB`09DNM_LOCAL+1,INFAB+FAB$L_DNA`09;Set up input file name/X`09MOVB`09DNM_LOCAL,INFAB+FAB$B_DNS`09; in FABM'X`09MOVAB`09FNM_LOCAL+1,INFAB+FAB$L_FNAr$X`09MOVB`09FNM_LOCAL,INFAB+FAB$B_FNS9X`09MOVAB`09INFAB,R3`09`09;Put input FAB address in R3`20;6X`09MOVAB`09INRAB,R4`09`09;Put input RAB address in R4@X`09BSBW`09O_FILE`09`09`09;O_FILE will open the appropriate fileX`09BSBW`09SET_COMMAND(X`09SUBDTE`09SINCE_QUAD,BEFORE_QUAD,FLAGX`09BBS`09#7,FLAG,FINISH1:X`09BBC`09#0,FLAG,FINISH1i<X`09BSBW`09PRIME_FILE`09 `09;Find the 1st match in the file?X`09BLBS`09EOF,40$`09`09`09;Was EOF reached before /DATE found?0X`09BSBW`09CHK_BEFORE`09@X`09BBC`09#7,FLAG,35$`09`09;If /BEFORE is less than date in file?X`09BLBC`09FLAG,35$`09`09;then end without processing the file.o1X`09`09`09`09`09;FLAG is set by the SUBDTE macro. X`09X30$:`09BSBW`09PROCESS1 X35$:`09BSBW `09FINISH1/3X40$:`09BSBW`09NO_FILES`09`09;Report no files found X;/////////; XFINISH1:f(X`09$EXIT_S`09`09`09`09;Return to VMS`09X X XoMX;///////////////////////////////////////////////////////////////////////////V////tMX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\;V\\\\lMX;///////////////////////////////////////////////////////////////////////////MV//// MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ V\\\\ X XPROCESS:`09`09`09<X`09PUSHAB`09OUTPUT_DESC`09`09;Check if /OUTPUT is on the`202X`09CALLS`09#1,G`5ECLI$PRESENT`09; command line.1X`09CMPL`09R0,#CLI$_PRESENT`09;Was /OUTPUT there?=<X`09BNEQ`095$`09`09`09;No, then output should go to terminalX X`09PUSHAB`09RET_VALUE_DESC X`09PUSHAB`09OUTPUT_DESC X`09CALLS`09#2,G`5ECLI$GET_VALUE1X MOVL`09RET_VALUE_DESC+4,OUTFAB+FAB$L_FNA9+X`09MOVB RET_VALUE_DESC,OUTFAB+FAB$B_FNS X X5$:`09$CREATE FAB=OUTFAB;X`09$CONNECT RAB=OUTRABYXN<X;`09This section writes the file header to the output file.X1$X`09MOVAB`09HEADER1,OUTRAB+RAB$L_RBFX`09$PUT`09RAB=OUTRAB8'X`09MOVAB`09BLANK_LINE,OUTRAB+RAB$L_RBF_X`09$PUT`09RAB=OUTRAB $X`09MOVAB`09HEADER2,OUTRAB+RAB$L_RBFX`09$PUT`09RAB=OUTRAB_!X`09MOVAB`09LINE,OUTRAB+RAB$L_RBF_X`09$PUT`09RAB=OUTRAB_#X`09MOVAB`09OUTBUF,OUTRAB+RAB$L_RBF X X`09MOVAB`09SOURCE,USER_SUB3 X`09MOVAB`09FIND_SOURCE,FIND_SUB"X`09MOVAB`09SIZE_STRING,STRING_SUBX`09BSBW`09FIRST_NODE XX`09RSB2XMX;////////////////////////////////////////////////////////////////////////////V/////MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\V\\\\\XXPROCESS1:`09`09`09,<X`09PUSHAB`09OUTPUT_DESC`09`09;Check if /OUTPUT is on the`202X`09CALLS`09#1,G`5ECLI$PRESENT`09; command line.1X`09CMPL`09R0,#CLI$_PRESENT`09;Was /OUTPUT there?<X`09BNEQ`095$`09`09`09;No, then output should go to terminalX1X`09PUSHAB`09RET_VALUE_DESC X`09PUSHAB`09OUTPUT_DESC X`09CALLS`09#2,G`5ECLI$GET_VALUE1X MOVL`09RET_VALUE_DESC+4,OUTFAB+FAB$L_FNA+X`09MOVB RET_VALUE_DESC,OUTFAB+FAB$B_FNS\X5$:`09$CREATE FAB=OUTFAB\X`09$CONNECT RAB=OUTRAB;X;<X;`09This section writes the file header to the output file.Xs$X`09MOVAB`09HEADER8,OUTRAB+RAB$L_RBFX`09$PUT`09RAB=OUTRABe'X`09MOVAB`09BLANK_LINE,OUTRAB+RAB$L_RBFaX`09$PUT`09RAB=OUTRABn$X`09MOVAB`09HEADER9,OUTRAB+RAB$L_RBFX`09$PUT`09RAB=OUTRABw!X`09MOVAB LINE,OUTRAB+RAB$L_RBF X`09$PUT`09RAB=OUTRABt#X`09MOVAB`09OUTBUF,OUTRAB+RAB$L_RBFeXcX`09MOVAB`09USER,USER_SUB;X`09MOVAB`09FIND_USER,FIND_SUB#X`09MOVAB`09SIZE_STRING1,STRING_SUBrX`09BSBW`09FIRST_NODEFX`09RSBYX`20MX;///////////////////////////////////////////////////////////////////////////AV////`MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\0V\\\\aX;KX;`09FIRST_NODE is called by both PROCESS and PROCESS1. FIRST_NODE actuallyGX;`09does the processing of the input file. To call FIRST_NODE three`20,"X;`09parameters must be set up.`20X;X;DX;`09USER_SUB:`09Holds the address of the string used to delimit the-X;`09`09`09actual username in the input file.:X;FX;`09FIND_SUB:`09Holds the address of the subroutine that is called to,X;`09`09`09find the username in each record.X;FX;`09STRING_SUB:`09Holds the address of the string used to delimit the%X;`09`09`09size of the file in bytes.\X;X\X'P MX030.LjUj[MX.CONTRIB]MXSUM.VMS_SHARE;2M];2 XFIRST_NODE:;X`09MOVC3`09#11,INBUF,@BUF_DATE+4`09;Put date in descriptorADX`09PUSHAB`09DATE_QUAD`09`09;Binary rep. of current date in log file6X`09PUSHAB`09BUF_DATE`09`09;Descriptor for date string@X`09CALLS #2,G`5ESYS$BINTIM`09`09;Convert the string to binaryKX`09SUBDTE BEFORE_QUAD,DATE_QUAD,FLAG ;Macro determines which is greater`GX`09BBS`09#7,FLAG,25$`09 ;Branch if date is not less than beforeX20$:`09BRW`09END_PROCESSLXLX25$:`09PUSHAL`09CURRENTX`09PUSHAL`09NODE_SIZE@X`09CALLS`09#2,G`5ELIB$GET_VM`09`09;Get another node from memoryBX`09BSBW`09CLEAR_NODE`09`09;Make sure the node is blank before useXyX;`09Prepare to find the source*8X;`09R4 = the length of the string used as the delimiter)X;`09R5 = the address of the input buffer0BX;`09R6 = the address of the string which is used as the delimiterXRXPLACE:`09MOVL`09#9,R4X`09MOVAB`09INBUF,R5X`09MOVL`09USER_SUB,R6X`09JSB`09@FIND_SUBS>X`09CMPL`09R4,#14`09`09`09;Is the string longer than 14 chars?9X`09BLEQ`0910$`09`09`09;No, then don't adjust the length.>X MOVL`09#14,R4`09`09`09;Yes, force the length to be 14HX10$:`09MOVW`09R4,DESC_NAME1 `09;Store name length in descriptor`20=X`09MOVC3`09DESC_NAME1,(R8),NAME1`09;Store name in descriptor AX`09PUSHAB`09DESC_NAME1`09`09;Get ready to capitalize the source. X`09PUSHAB`09DESC_NAME X`09CALLS`09#2,G`5ESTR$UPCASE`09@X`09MOVB`09DESC_NAME,5(R10)`09;Put length of name in linked listCX`09MOVC3`09DESC_NAME,@DESC_NAME+4,6(R10) ;Put name in linked list.r9X`09ADDB2`09#1,4(R10)`09`09;Incr. num of messages by one.`@X`09INCL TOTAL_FILES`09`09;Incr. total num of files that day.:X`09MOVC3 `09#8,BLANKS,TOTAL_BYTES`09;Blank out byte fieldXBMX;"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""LV""""1X;X;`09CALL FILE_SIZE9X;FX;`09R5 = the address of the buffer that contains the size information=X;`09R6 = the length of the string used as the size delimiter X;`09 X;`09RETURN FROM FILE_SIZEX;`09 'X;`09R4 = the length of the size string9FX;`09R8 = the address of the first byte where the size field was foundX;MX;"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""eV""""MXeX`09MOVAB INBUF,R5X`09MOVL`09STRING_SUB,R6X`09BSBW`09FIND_SIZEX`09MOVW`09R4,FILE_SIZET&X`09MOVC3`09FILE_SIZE,(R8),TOTAL_BYTESX`09PUSHAL CONVRT_NUMX`09PUSHAL`09FILE_SIZEX`09CALLS`09#2,G`5EOTS$CVT_TU_LwX`09ADDL2`09CONVRT_NUM,20(R10)!X`09ADDL2 CONVRT_NUM,TOTAL_SIZE XS$XLOOP: MOVC5`09#0,#0,#0,#256,INBUF?X`09MOVAB`09INRAB,R3`09`09;Start going through all the records.RX`09MOVAB`09OUTRAB,R5 X`09BSBW`09GET_RECX`09MOVL`09R0,STATUSX`09CMPL`09R0,#RMS$_EOFS9X`09BNEQ`09SPACE`09`09`09;After CLOSE_DAY end the programSX`09BRW`09CLOSE_DAY`09`09cX=XSPACE:`09MOVC3`09#11,INBUF,@DATE+4`09;Put date in descriptorDHX`09PUSHAB`09BUF_DATE_QUAD`09`09;Binary rep. of current date in log file5X`09PUSHAB`09DATE`09`09`09;Descriptor for date string.@X`09CALLS #2,G`5ESYS$BINTIM`09`09;Convert the string to binaryX LX`09SUBDTE BEFORE_QUAD,BUF_DATE_QUAD,FLAG ;Are we still within our before8X `09BBS`09#7,FLAG,25$`09 ;parameter?`09X20$:`09BRW`09END_PROCESS`XLX25$:`09SUBDTE`09DATE_QUAD,BUF_DATE_QUAD,FLAG ;Is it still the same day?X`09CMPB`09#0,FLAGX`09BNEQ`0928$ X`09BRB`0930$RX28$:`09BRW`09CLOSE_DAY XAX30$:`09MOVL`09HEAD,R10`09`09;R10 points to the head of the list.X`09MOVL`09HEAD,R9XX`09MOVC3`09#16,BLANKS,NAME1X`09MOVL`09#9,R4X`09MOVAB`09INBUF,R5X`09MOVL`09USER_SUB,R6X`09JSB`09@FIND_SUBtX`09CMPL`09R4,#14aX`09BLEQ`0940$X MOVL`09#14,R4X40$:`09MOVB`09R4,DESC_NAME12X`09MOVC3`09DESC_NAME1,(R8),NAME1`09 ;Store nameX`09PUSHAB`09DESC_NAME1SX`09PUSHAB`09DESC_NAME X`09CALLS`09#2,G`5ESTR$UPCASE`09'X`09MOVC3`09DESC_NAME,@DESC_NAME+4,NAME9X2 XNODE_CHK:GX`09CMPC3`09DESC_NAME,NAME,6(R10)`09;Is the user the same in this node.SX`09BNEQ`095$`093X`09BRW`09GET_BYTES`09`09;Get the size of the file.RJX5$:`09CMPC3`09DESC_NAME,NAME,6(R10)`09;Is the user the same in this node.X`09BLSS`09INSERT`09`09`09;R0X`09CMPL`09(R10),#0`09`09;Is this the last node?X`09BNEQ`0910$;X`09BRW`09ENDSERT`09`09`09;Yes, go insert user in the list.BX10$:`09CMPL`09R10,R9 `09`09;Is there only one node in the list?7X`09BEQL`0915$`09`09`09;YES, only incr current pointer.A3X`09MOVL`09(R9),R9`09`09`09;NO, incr both pointers._1X15$:`09MOVL`09(R10),R10`09`09;Get the next node.S-X`09BRB`09NODE_CHK`09`09;Check the next node.oX XINSERT:`09<X`09PUSHAL`09CURRENT`09`09`09;Get the next node from system.X`09PUSHAL`09NODE_SIZEX`09CALLS`09#2,G`5ELIB$GET_VM.XR<X`09CMPL`09R9,R10`09`09`09;Is there only 1 node in the list??X`09BEQL`09ONE_NODE`09`09;YES, insert new node at head of list.yCX`09MOVL`09CURRENT,R10`09`09;NO, R10 now points at current node.`09r@X`09CLRL`0920(R10)`09`09`09;Clear the total bytes field in node.X`09CLRB`094(R10)OBX`09MOVC3`09#14,BLANKS,6(R10) ;Put spaces in the name field.1+-+-+-+-+-+-+-+- END OF PART 2 +-+-+-+-+-+-+-+-;1-+-+-+-+-+-+-+-+ START OF PART 3 -+-+-+-+-+-+-+-+0X`09MOVB`09DESC_NAME,5(R10)@X`09MOVC3`09DESC_NAME,NAME,6(R10) ;Insert name in current nodeX`09MOVL`09(R9),(R10) X`09MOVL`09R10,(R9)AX`09BRW`09GET_BYTESI XONE_NODE:CX`09MOVL`09CURRENT,R10`09`09;NO, R10 now points at current node.`09d@X`09CLRL`0920(R10)`09`09`09;Clear the total bytes field in node.X`09CLRB`094(R10)eBX`09MOVC3`09#14,BLANKS,6(R10) ;Put spaces in the name field.X`09MOVB`09DESC_NAME,5(R10)f@X`09MOVC3`09DESC_NAME,NAME,6(R10) ;Insert name in current nodeX`09MOVL`09HEAD,R9X`09MOVL`09R10,HEADMX`09MOVL`09R9,(R10)0X`09BRB`09GET_BYTESX`09 XENDSERT:A<X`09PUSHAL`09CURRENT`09`09`09;Get the next node from system.X`09PUSHAL`09NODE_SIZEX`09CALLS`09#2,G`5ELIB$GET_VM X2X`09MOVL`09R10,R93?X`09MOVL`09CURRENT,R10`09`09;R10 now points at current node.`09D@X`09CLRL`0920(R10)`09`09`09;Clear the total bytes field in node.X`09CLRB`094(R10)SBX`09MOVC3`09#14,BLANKS,6(R10) ;Put spaces in the name field.X`09MOVB`09DESC_NAME1,5(R10)?X`09MOVC3`09DESC_NAME1,NAME,6(R10) ;Insert name in current node`XSX`09MOVL`09R10,(R9)X`09MOVL`09#0,(R10)`09X XGET_BYTES: "X`09MOVC3 `09#8,BLANKS,TOTAL_BYTESX`09MOVAB INBUF,R5X`09MOVL`09STRING_SUB,R6X`09BSBW`09FIND_SIZEX2X`09MOVW`09R4,FILE_SIZE`09FX`09MOVC3`09FILE_SIZE,(R8),TOTAL_BYTES`09;Put file size @ TOTAL_BYTES.=X`09PUSHAL CONVRT_NUM`09`09;Make call to converting routine.DX`09PUSHAL`09FILE_SIZEX`09CALLS`09#2,G`5EOTS$CVT_TU_L`FX`09ADDL2`09CONVRT_NUM,20(R10)`09;Add file size to the previous total.<X`09ADDB2`09#1,4(R10)`09`09;Incr. the num of messages field.X`09INCL`09TOTAL_FILES!X`09ADDL2 CONVRT_NUM,TOTAL_SIZE,X`09BRW`09LOOP`09`09`09;Get the next record.Xp XEND_PROCESS:fX`09MOVB`09#1,DATE_PARA`09 XCLOSE_DAY: =X`09MOVL`09HEAD,R10`09`09;R10 points to the head of the list.0 XCHK_NIL:tCX`09MOVAB BUF_DATE,FAO_CALL+FAO$_P1 ;Insert the date in output. DX`09MOVAB`095(R10),FAO_CALL+FAO$_P2 ;Insert the user name in output.X`09CLRL`09FAO_CALL+FAO$_P3 @X`09MOVB`094(R10),FAO_CALL+FAO$_P3 ;Insert the num of messages.>X`09MOVL`0920(R10),FAO_CALL+FAO$_P4 ;Convert the size to ASCIIX`09$FAO_G`09FAO_CALLDAX`09MOVC3`09BUFFER,@BUFFER+4,OUTBUF`09;Insert the size in output.`/X`09$PUT`09RAB=OUTRAB`09`09;Write the line out.W6X`09MOVC3`09#80,BLANKS,BLANK_LINE`09;Clear the buffer.-X`09MOVL`09(R10),R10`09`09;Get the next node.M6X`09CMPL`09R10,#0`09`09 ;Is this the last node.X`09BEQL`09END_LIST'X`09BRW`09CHK_NIL`09`09`09;Do it again.iXz XEND_LIST:X`09MOVC3`09#80, MX030.LjUj[MX.CONTRIB]MXSUM.VMS_SHARE;2M]ASUM_LINE,OUTBUFGX`09$PUT`09RAB=OUTRAB ,X MOVL `09TOTAL_FILES,FAO_TOT+FAO$_P1&X`09MOVL `09TOTAL_SIZE,FAO_TOT+FAO$_P2X`09$FAO_G`09FAO_TOTX`09MOVC3`09#80,BLANKS,OUTBUF:#X`09MOVC3`09BUFFER,@BUFFER+4,OUTBUFtX`09$PUT`09RAB=OUTRAB X`09MOVC3`09#80,BLANKS,OUTBUF`09X`09$PUT`09RAB=OUTRABoX`09AX5$:`09CMPL`09R10,#0`09`09`09;Is there only one node in the list?l-X`09BEQL`09LAST_NODE`09`09;YES, go delete it.NBX`09MOVL`09@HEAD,R10`09`09;R10 points to the new head of the list.X`09PUSHAL`09HEAD0X`09PUSHAL`09NODE_SIZEX`09CALLS`09#2,G`5ELIB$FREE_VM@X`09CMPL`09(R10),#0`09`09 `09;Is this the last node to delete?X`09BEQL`09LAST_NODEX`09MOVL`09R10,HEADv X`09BRB`095$Xe XLAST_NODE:X`09MOVL`09R10,HEAD0X`09PUSHAL`09HEAD/X`09PUSHAL`09NODE_SIZEX`09CALLS`09#2,G`5ELIB$FREE_VMX/X`09CMPL`09STATUS,#RMS$_EOF\ X`09BEQL`095$\X`09CMPB`09#1,DATE_PARA\ X`09BEQL`095$\X`09CLRL`09TOTAL_FILESX`09CLRL TOTAL_SIZEX`09BRW`09FIRST_NODEX/X5$:`09MOVAB`09INFAB,R3/X`09MOVAB`09INRAB,R4X`09MOVAB`09OUTRAB,R5\X`09MOVAB`09OUTFAB,R6\X`09BSBW`09CLOSE_FILE\X$XBEFORE_ERROR:X`09RSBLX9XNXOMX;/////////////////////////////////////////////////////////////////////////// V//// MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ V\\\\ XsHX;`09PRIME_FILE looks for the appropriate place in the file to begin theKX;`09analysis. This is done by converting the date in each record to binary/HX;`09and comparing it to the /SINCE value which has been converted to`20JX;`09to binary. The comparison is done by the macro SUBDTE which sets FLAGJX;`09to the appropriate value. If the end of file is reached before the`20MX;`09record mets the appropriate value the EOF flag is set and the subroutine X;`09is exited.NX, XPRIME_FILE:X`09MOVC5`09#0,#0,#0,#256,INBUFaX`09$GET`09RAB=INRABX`09BLBS`09R0,10$MX5$:`09BRW`0915$?X10$:`09MOVC3`09#11,INBUF,@BUF_DATE+4`09;Put date in descriptorLHX`09PUSHAB`09BUF_DATE_QUAD`09`09;Binary rep. of current date in log file6X`09PUSHAB`09BUF_DATE`09`09;Descriptor for date string@X`09CALLS #2,G`5ESYS$BINTIM`09`09;Convert the string to binary*X`09SUBDTE`09SINCE_QUAD,BUF_DATE_QUAD,FLAGX`09BBC`09#7,FLAG,20$/X`09BRW `09PRIME_FILE/X15$:`09MOVB`09#1,EOF/X20$:`09CLRB`09FLAG\X`09RSB\X`09MX;///////////////////////////////////////////////////////////////////////////UV////RMX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\9V\\\\ XL XCHK_BEFORE:+X`09SUBDTE`09BEFORE_QUAD,BUF_DATE_QUAD,FLAGX`09RSBHX MX;///////////////////////////////////////////////////////////////////////////DV////+MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/V\\\\/X/X/ XSET_COMMAND:BX`09PUSHAB`09BEFORE_QUAD`09`09;This section will get the system`20?X`09CALLS`09#1,G`5ESYS$GETTIM`09`09; time for the current day.`X`09BITB`09#0,R0 X`09BEQL`095$D$X`09MOVAB`09TIM_ERR,OUTRAB+RAB$L_RBFX`09$PUT`09RAB=OUTRAB_ X`09$EXIT_SALX5$:`09ADDQ2`09DAY,BEFORE_QUAD`09`09;BEFORE_QUAD is initialized to tommorrowX>X`09PUSHAB`09DATE_DESC`09`09;Is the /DATE on the command line?X`09CALLS`09#1,G`5ECLI$PRESENTX`09CMPL`09R0,#CLI$_PRESENT0+X`09BNEQ`0910$`09`09`09;No, go check /SINCEiX >X`09PUSHAB`09RET_VALUE_DESC`09`09;Yes, get the date for /SINCEX`09PUSHAB`09DATE_DESC X`09CALLS`09#2,G`5ECLI$GET_VALUEXi2X`09BSBW`09SET_SINCE`09`09;/SINCE will equal /DATE@X`09BSBW`09SET_BEFORE`09`09;/BEFORE will equal /SINCE + 24 Hours*X`09BRB`0925$`09`09`09;Go process the fileX`09JX10$: PUSHAB`09SINCE_DESC`09`09;Check if /SINCE is on the command line.X`09CALLS`09#1,G`5ECLI$PRESENT0X`09CMPL`09R0,#CLI$_PRESENT`09;Was /SINCE there?,X`09BNEQ`0920$`09`09`09;No, go check /BEFOREX X`09PUSHAB`09RET_VALUE_DESC0X`09PUSHAB`09SINCE_DESCs X`09CALLS`09#2,G`5ECLI$GET_VALUEX`09PUSHAB`09SINCE_QUADmX`09PUSHAB`09RET_VALUE_DESCWX`09CALLS`09#2,G`5ESYS$BINTIMtXfX GX20$:`09PUSHAB`09BEFORE_DESC`09`09;Is /BEFORE also on the command line?tX`09CALLS`09#1,G`5ECLI$PRESENTX`09CMPL`09R0,#CLI$_PRESENT`09,X`09BNEQ`0925$`09`09`09;No, go process file.XV5X`09PUSHAB`09RET_VALUE_DESC`09`09;Yes, get the value./X`09PUSHAB`09BEFORE_DESC X`09CALLS`09#2,G`5ECLI$GET_VALUEX`09PUSHAB`09BEFORE_QUADX`09PUSHAB`09RET_VALUE_DESC\X`09CALLS`09#2,G`5ESYS$BINTIMX`09 X25$:`09RSB_XAMX;/////////////////////////////////////////////////////////////////////////// V////`MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\AV\\\\rX;`09SET_SINCEXCHX;`09SET_SINCE will set the value of the /SINCE parameter to that of theKX;`09/DATE parameter. That value is then converted to binary by SYS$BINTIM.LX9 XSET_SINCE: $X`09MOVW`09RET_VALUE_DESC,SINCE_DATE(X`09MOVL`09RET_VALUE_DESC+4,SINCE_DATE+4X`09PUSHAB`09SINCE_QUAD`X`09PUSHAB`09SINCE_DATEBX`09CALLS`09#2,G`5ESYS$BINTIM0XIX`09RSB9MX;///////////////////////////////////////////////////////////////////////////eV///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\OV\\\X;X;`09SET_BEFOREeX`HX;`09SET_BEFORE is used to initialize the value of the /BEFORE parameterIX;`09Initially the value is set to the current day + 24 hours which is`203HX;`09represented by the label DAY. DAY is the hard coded binary value`20FX;`09for 24 hours. The before prarmeter is set to this value before itHX;`09is determined if it is present on the command line. This way the`20KX;`09/SINCE parmeter is initialized to 0 and the /BEFORE is set to tomorrow\KX;`09so the entire file is valid if no parameters are found on the commmand/MX;`09line. No set up is required to call the subroutine and when it completes\9X;`09BEFORE_QUAD will have the binary value for tomorrow.PX;X` XSET_BEFORE:X`09PUSHAB`09BEFORE_QUADX`09PUSHAB`09RET_VALUE_DESC0X`09CALLS`09#2,G`5ESYS$BINTIMTX`09ADDQ2`09DAY,BEFORE_QUADLX`09RSBIXRMX;///////////////////////////////////////////////////////////////////////////tV///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\2V\\\X;X;`09FIND_SOURCEX;`099BX;`09This subroutine is used to find the user name. The calling`20"X; convention is as follows:X;AX;`09`09R5 => contains the address of the input buffer that is`20lX;`09`09 begin searched.1@X;`09`09R6 => contains the address of the with which to compare.X;.X;`09The subroutine will return the following:X;=X;`09 `09R4 => contains the length of the user name in bytes.T4X;`09`09R8 => contains the address of the user name.X;MX;///////////////////////////////////////////////////////////////////////////V////AMX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\NV\\\\X; XFIND_SOURCE:/X/ XSEARCH1:/CX`09CMPC3`09#9,(R6),(R5)`09;Look for the pattern to match in the`20;'X`09BEQL`095$`09`09; input buffer INBUF\>X`09INCL`09R5`09`09;Look at next nine characters for the matchX`09BRB`09SEARCH1OX5$:`09CCX`09ADDL2`09#9,R5`09`09;R5 now points to the 1st char. in user name0IX`09MOVL`09R5,START_ADDR`09;START_ADDR holds the address of the user name94X`09CLRLO`09R4`09`09;R4 will give length of user name?X`09CMPB`09(R5),#`5EA'@' ;Is this the end of the user name?`X`09BEQL`09NEW_SEARCHTFXQUOTE2:`09CMPB`09(R5),#`5EA'@' ;Is this the end of the user name?X`09BEQL`09DONE2X`09CMPB`09(R5),#`5EA'>'X`09BEQL`09NULL<X`09INCL`09R5`09`09;R5 now has the address of next character8X`09INCL`09R4`09`09;R4 holds current length of user name.X`09BRB`09QUOTE2`09`09;Go check next characterXDONE2:`09MOVL`09START_ADDR,R8 X`09BRB`09OUTOKXNULL:`09MOVAB`09NULL_STRI! MX030.LjUj[MX.CONTRIB]MXSUM.VMS_SHARE;2M]p PNG,R8`09;The source was blank <> so the user nameA*X`09MOVL`09#9,R4`09`09; NULL_USER is used.X`09BRB `09OUTX9 XNEW_SEARCH:X`09CMPB`09(R5),#`5EA':'`09SX`09BEQL`09HERE2 X`09INCL`09R5EX`09BRB`09NEW_SEARCHXHERE2:`09INCL`09R5_IX`09MOVL`09R5,START_ADDR`09;START_ADDR holds the address of the user name/4X`09CLRL`09R4`09`09;R4 will give length of user nameBX5$:`09CMPB`09(R5),#`5EA'@' ;Is this the end of the user name?X`09BEQL`0910$<X`09INCL`09R5`09`09;R5 now has the address of next character8X`09INCL`09R4`09`09;R4 holds current length of user name*X`09BRB`095$`09`09;Go check next characterX10$ : MOVL`09START_ADDR,R8` XOUT:`09RSB;X;MX;///////////////////////////////////////////////////////////////////////////aV///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\iV\\\X; XFIND_USER:;X`JXSEARC:`09CMPC3`09#5,(R6),(R5)`09;Start searching for the matching pattern5X`09BEQL`095$`09`09; USER= When found branch to 5$. X`09INCL`09R5bX`09BRB`09SEARCFX5$:`09ADDL2`09#5,R5`09`09;R5 now points to the 1st char. in user name7X`09CMPB (R5),#`5EA/"/ ;Is this a quoted string? 4X`09BNEQ`098$`09`09;NO, Start getting the user name.?X`09INCL`09R5`09`09;YES, Point R5 to begining of the user name.h7X`09MOVB #0,MX_231`09;Set new version of MX to FALSEGLX8$:`09MOVL`09R5,START_ADDR`09;START_ADDR holds the address of the user name8X`09MOVL #1,R4`09`09;R4 will give length of user nameCX10$:`09CMPB`09(R5),#`5EA',' ;Is this the end of the user name?`X`09BEQL`09DONE1<X`09INCL`09R5`09`09;R5 now has the address of next character8X`09INCL`09R4`09`09;R4 holds current length of user name+X`09BRB`0910$`09`09;Go check next characteroXDONE1:`09MOVL`09START_ADDR,R8X`09CMPB`09MX_231,#1 X`09BEQL`095$tX`09DECL R4X5$:`09DECL`09R41X`09MOVB`09#1,MX_231`09;Reset new version to trueAX`09RSBLX;MX;///////////////////////////////////////////////////////////////////////////MV////,MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\hV\\\\tX; XCLEAR_NODE:XEX`09MOVL`09CURRENT,HEAD`09`09;HEAD now points to the head of the list9DX`09MOVL`09CURRENT,R10`09`09;R10 points to the current node in list.<X`09MOVL`09CURRENT,R9`09`09;R9 also points to the only node.4X`09CLRL`09(R10)`09`09`09;FLINK is now NIL ( ZERO ).>X`09CLRB`094(R10)`09`09`09;Clear the number of messages field.7X`09CLRB`095(R10)`09`09`09;Clear the name_length field.n@X`09CLRL`0920(R10)`09`09`09;Clear the total bytes field in node.BX`09MOVC3`09#14,BLANKSU,6(R10) ;Put spaces in the name field.X`09RSBX;MX;///////////////////////////////////////////////////////////////////////////LV////TMX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"V\\\\" X;`09NO_FILES"X"FX;`09NO_FILES will print out a message saying that no files were found1X;`09that met the parameters on the command line.0AX;`09Also if the file was empty this message will be printed out.X; XNO_FILES:#X`09MOVAB`09ERROR1,OUTRAB+RAB$L_RBFgX`09$PUT`09RAB=OUTRABX`09RSB X`09.END`09MXSUM_V2rXb$$ CALL UNPACK MXSUM.MAR;1 1226286732 $ create 'f'XSTART_SIZE:`09.LONG`090`09"X;X;`09TO BE GLOBAL"X; XO_FILE::`20<X;`09MOVL`094(R2),FAB$L_FNA(R3) `09;Put file address in FAB>X;`09MOVB (R2),FAB$B_FNS(R3) `09;Put file name size in FAB2X`09$OPEN FAB=(R3) ;OPEN the fileX`09$CONNECT RAB=(R4)`X`09RSBOX;MX;///////////////////////////////////////////////////////////////////////////SV///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\hV\\\X;X;`09TO BE GLOBAL`X; XGET_REC::`09S)X`09$GET`09RAB=(R3) ;GET the recordLX`09RSBSX;MX;///////////////////////////////////////////////////////////////////////////_V///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\UV\\\X;`09`09TO BE GLOBALX; XCLOSE_FILE::nX`09$DISCONNECT RAB=(R4)X`09$DISCONNECT RAB=(R5)X`09$CLOSE FAB=(R3)X`09$CLOSE FAB=(R6)X`09RSB`X;MX;/////////////////////////////////////////////////////////////////////////// V///MX;\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\rV\\\X;X;X;`09This is find_sizeX; XFIND_SIZE::X; XSEARCH1:`09X`09CMPC3`09#5,(R6),(R5)X`09BEQL`09HERE` X`09INCL`09R5GX`09BRB`09SEARCH1` XHERE:`09R>X`09ADDL2`09#5,R5`09`09;R5 now points to the 1st char. in SIZEDX`09MOVL`09R5,START_SIZE`09;START_SIZE holds the address of the SIZE/X`09CLRL`09R4`09`09;R4 will give length of SIZE9?XBLANK:`09CMPB`09(R5),#`5EA'0' ;Is this the end of SIZE?0X`09BLSS`09DONE1X`09CMPB (R5),#`5EA'9',X`09BGTR DONE1R<X`09INCL`09R5`09`09;R5 now has the address of next character1+-+-+-+-+-+-+-+- END OF PART 3 +-+-+-+-+-+-+-+-E1-+-+-+-+-+-+-+-+ START OF PART 4 -+-+-+-+-+-+-+-+C3X`09INCL`09R4`09`09;R4 holds current length of SIZE9-X`09BRB`09BLANK`09`09;Go check next characternXDONE1:`09MOVL`09START_SIZE,R8X`09RSB9X`09.END%$ CALL UNPACK MX_MOD.MAR;2 12143418730 $ create 'f'XMODULE HAROLDXIDENT "Genesis 05/24/91" XsXDEFINE VERB MXSUM1X`09PARAMETER P1, LABEL=FILE, PROMPT="_FILE: "`20 ,X`09`09 VALUE(REQUIRED, TYPE=FILE_NAME)X`XDEFINE TYPE FILE_NAME X`09KEYWORD JNET, SYNTAX=MX_JNET%X`09KEYWORD LOCAL, SYNTAX=MX_LOCAL`09 XtXDEFINE SYNTAX MX_JNETX`09ROUTINE MX_JNETnX`09PARAMETER P12X`09QUALIFIER DATE, VALUE(REQUIRED,TYPE=$DATETIME)3X`09QUALIFIER SINCE, VALUE(REQUIRED,TYPE=$DATETIME)e4X`09QUALIFIER BEFORE, VALUE(REQUIRED,TYPE=$DATETIME)0X`09QUALIFIER OUTPUT, VALUE(REQUIRED,TYPE=$FILE)X XDEFINE SYNTAX MX_LOCAL`X`09ROUTINE MX_LOCALX`09PARAMETER P12X`09QUALIFIER DATE, VALUE(REQUIRED,TYPE=$DATETIME)3X`09QUALIFIER SINCE, VALUE(REQUIRED,TYPE=$DATETIME);4X`09QUALIFIER BEFORE, VALUE(REQUIRED,TYPE=$DATETIME)0X`09QUALIFIER OUTPUT, VALUE(REQUIRED,TYPE=$FILE)Xr$$ CALL UNPACK MXCLD.CLD;1 1031302626$ v=f$verify(v)l$ EXIT*[MX.CONTRIB]MX_ALIAS.COM;1+,j.0/> 4\0.@-Uj0123KPWO/56 3P7za4*89` Z!G>HJ$ OLDVER = 'F$VERIFY (0)$! MX_ALIAS.COM$! ----------$! $! Changes $! -------K$! 15-MAY-1991 Madison Made the prefix stuff a little more transparent.$!F$!(051391 ank) Modified the EQUIVX symbol to add MX_SUF and MX_PREFIX.F$! MX_PREFIX is changable to any other form. i.e. IN%, SMTP% etc.$!=$! Original Author: I think it was ED Miller author of gmail.F$!--------------------------------------------------------------------G$! Command procedure to manipulate a mail-address alias definition file$$ GOTO BEGIN Usage: Define symbol:: $ MX_AL*IAS == "@direct-spec:MX_ALIAS"7 Use as described in embedded HELP file: $ MX_ALIAS" MX_ALIAS> HELP$!$! Utility routines:$!$! INTERNAL_TO_EXTERNAL:$!<$! Subroutine for converting mail system internal format to$! VMS Mail external format.$!$! Input: P1&$! Output: global symbol ALIAS_EQUIV$!!$INTERNAL_TO_EXTERNAL:X MX030.LjUj[MX.CONTRIB]MX_ALIAS.COM;1\0 SUBROUTINE$ TEMP = P1,$ MX_PREFIX = "MX%" + QMARK + QMARK + QMARK$$ MX_SUFF = QMARK + QMARK + QMARK$ QMARK = """"$ EQUIVX = "" $ QLOOPA: $ P= F$LOCATE (QMARK,TEMP)3$ IF P .EQ. F$LENGTH (TEMP) THEN GOTO QENDA4$ EQUIVX= EQUIVX + F$EXTRACT (0,P,TEMP) + "'"%$ TEMP= F$EXTRACT (P+1,-1,TEMP)$ GOTO QLOOPA$ QENDA::$ ALIAS_EQUIV == MX_PREFIX + EQUIVX + TEMP + MX_SUFF$ ENDSUBROUTINE$!-------------------$! LOGICAL_TO_INTERNAL:$!A$! Subroutine for converting VMS Mail external format address to $! mail system internal format.$!!$! Input: P1 (name of logical)&$! Output: global symbol ALIAS_EQUIV$! $LOGICAL_TO_INTERNAL: SUBROUTINE$ TEMP = F$TRNLNM (P1)M$ TEMP = F$EXTRACT (4,F$LENGTH(TEMP)-5,TEMP) ! assumes prefix length of 2$ QMARK = """"$ EQUIVX = "" $ QLOOPA:$ P= F$LOCATE ("'",TEMP)3$ IF P .EQ. F$LENGTH (TEMP) THEN GOTO QENDA6$ EQUIVX= EQUIVX + F$EXTRACT (0,P,TEMP) + QMARK%$ TEMP= F$EXTRACT (P+1,-1,TEMP)$ GOTO QLOOPA$ QENDA:$$ ALIAS_EQUIV == EQUIVX + TEMP$ ENDSUBROUTINE$!-----------------------$ BEGIN:,$ ON CONTROL THEN GOTO MX_ALIAS_ABORT"$ DELETE= "DELETE/NOCONFIRM"H$ BLANKS= " "$ A_CR[0,8]= %X0D$ A_LF[0,8]= %X0A$ QMARK = """"$>$! The concept is to include all logical definitions in a file/$! which is executed by individual login.com's.$D$ IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.COM ") .NES. "" THEN - @SYS$LOGIN:MX_ALIASDEF$%$ CMD= P1 + " " + P2 + " " + P3$ CMDSINGLE= P1 .NES. ""'$ ON ERROR THEN GOTO CMD_PROMPT,$ IF CMDSINGLE THEN GOTO CMD_EXECUTE$ $ CMD_PROMPT:)$ IF CMDSINGLE THEN GOTO CMD_EXIT'$ ON ERROR THEN GOTO CMD_PROMPT$ WRITE SYS$OUTPUT ""D$ WRITE SYS$OUTPUT "Use one ADD/SHOW/REMOVE/MODIFY/HELP/EXIT"@$ READ SYS$COMMAND /END=CMD_EXIT /PROMPT="MX_ALIAS> " CMD.$ IF CMD .EQS. "" THEN GOTO CMD_PROMPT$ CMD_EXECUTE::$ CMD= F$EDIT (CMD,"UPCASE,TRIM,COMPRESS,UNCOMMENT")#$ VERB= F$ELEMENT (0," ",CMD)$$ PARM1= F$ELEMENT (1," ",CMD)$$ PARM2= F$ELEMENT (2," ",CMD)/$ IF PARM2 .NES. " " THEN GOTO CMD_ABT1$>$ IF F$LOCATE (VERB,"ADD") .EQ. 0 THEN GOTO CMD_ADD?$ IF F$LOCATE (VERB,"EXIT") .EQ. 0 THEN GOTO CMD_EXIT?$ IF F$LOCATE (VERB,"HELP") .EQ. 0 THEN GOTO CMD_HELPA$ IF F$LOCATE (VERB,"MODIFY") .EQ. 0 THEN GOTO CMD_MODIFYA$ IF F$LOCATE (VERB,"REMOVE") .EQ. 0 THEN GOTO CMD_REMOVE?$ IF F$LOCATE (VERB,"QUIT") .EQ. 0 THEN GOTO CMD_EXIT?$ IF F$LOCATE (VERB,"SHOW") .EQ. 0 THEN GOTO CMD_SHOWA$ IF F$LOCATE (VERB,"SEARCH") .EQ. 0 THEN GOTO CMD_SEARCH$K$ WRITE SYS$OUTPUT "%MXALIAS-W-UNRECVERB, unrecognized command verb"P$ WRITE SYS$OUTPUT "-MXALIAS-I-4MOREINFO, type HELP for more information"$ GOTO CMD_PROMPT$ $ CMD_ABT1:M$ WRITE SYS$OUTPUT "%MXALIAS-W-TOOMANY, too many parameters specified"$ GOTO CMD_PROMPT$$ MX_ALIAS_ABORT:I$ WRITE SYS$OUTPUT "%MXALIAS-F-ABORT, MALIAS aborted with ctrl-Y."$ $ CMD_EXIT:#$ CLOSE /ERROR=CMD_0 TEMP_IN$ CMD_0:$ CLOSE /ERROR=CMD_1 TEMP_OUT$ CMD_1:=$ IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.TMP") .NES. "" THEN -, DELETE SYS$LOGIN:MX_ALIASDEF.TMP;*!$ EXIT 1+0*F$VERIFY(OLDVER)$ $ CMD_HELP:1$ IF PARM1 .EQS. " " THEN GOTO HELP_BASICL$ IF F$LOCATE (PARM1,"OVERVIEW") .EQ. 0 THEN GOTO HELP_OVERVIEWL$ IF F$LOCATE (PARM1,"COMMANDS") .EQ. 0 THEN GOTO HELP_OVERVIEWM$ IF F$LOCATE (PARM1,"ADDRESSES") .EQ. 0 THEN GOTO HELP_ADDRESSESI$ IF PARM1 .EQS. "*" .OR. PARM1 .EQS. "*..." THEN GOTO HELP_BASICJ$ WRITE SYS$OUTPUT "%MXALIAS-W-UNRECTOPIC, unrecognized HELP topic"$ GOTO HELP_BASIC$ $ HELP_BASIC:$ CREATE SYS$OUTPUT= MX_ALIAS -- procedure for manipulating Mail ALIAS names Commands:G ADD alias-name Add address-equivalent for specified alias-name4 EXIT Exit from MX_ALIAS procedure0 HELP [topic] Display HELP informationJ MODIFY alias-name Modify address-equivalent for specified alias-name7 REMOVE alias-name Remove the specified alias-nameG SHOW [string] List (formatted) alias definition records whichF contain the specified string (or list all, if? "*" or no string at all is specified).E SEARCH [string] Like SHOW command, but definition records are5 listed without reformatting.Additional topics:3 Overview (Description of the general scheme)G Commands (Specify commands on DCL command line or interactively)N Addresses (Types of address specifications allowed as equivalence names)$L$ IF PARM1 .EQS. "*" .OR. PARM1 .EQS. "*..." THEN GOTO HELP_OVERVIEW$ GOTO CMD_PROMPT$$ HELP_OVERVIEW:$ CREATE SYS$OUTPUTOverviewO The MX_ALIAS procedure offers a convenient method for defining, displaying,G and updating ALIAS names (logical names) to be used as addresses whenI sending mail. These aliases are defined as logical names, and thus canB be used with VMS MAIL, MX, or any other mail system which allows/ addresses to be specified with logical names.= The first time you use the MX_ALIAS 'ADD' command, a fileM (SYS$LOGIN:MX_ALIASDEF.COM ) will be created to contain your alias (logicalJ name) definitions. To activate these definitions every time you log in, you should add the line: $ @SYS$LOGIN:MX_ALIASDEFD to your LOGIN.COM procedure. It is best not to directly edit yourI MX_ALIASDEF.COM file, but rather to use the MX_ALIAS procedure to makeH changes in this file. Otherwise, you could interfere with the abilityM of the MX_ALIAS procedure to properly manipulate the contents of this file.G For a discussion of the sorts of address specifications that may beE specified with MX_ALIAS 'ADD' and 'MODIFY' commands, see HELP topic 'Addresses'.$L$ IF PARM1 .EQS. "*" .OR. PARM1 .EQS. "*..." THEN GOTO HELP_COMMANDS$ GOTO CMD_PROMPT$$ HELP_COMMANDS:$ CREATE SYS$OUTPUTCommands9 If you invoke MX_ALIAS from DCL without any parameters: $ MX_ALIAS@ then it will prompt you for commands (as listed in the primary> HELP topic section. Alternatively, you can specify a singleB command to MX_ALIAS on the DCL command line. After that commandB is executed, you will be returned to DCL. (Note that the MODIFYD and ADD commands cannot be completely specified on the DCL commandG line; for these commands you will still be prompted for the remaining information.) Examples: $ MX_ALIAS SHOW $ MX_ALIAS REMOVE REAGAN $ MX_ALIAS ADD NIXON .../ $ MX_ALIAS/OUTPUT=MX_ALIAS.TXT HELP *...M$ IF PARM1 .EQS. "*" .OR. PARM1 .EQS. "*..." THEN GOTO HELP_ADDRESSES$ GOTO CMD_PROMPT$ HELP_ADDRESSES:$ CREATE SYS$OUTPUT AddressesO When you use the MX_ALIAS 'ADD alias-name' or 'MODIFY alias-name' commands,F you will be prompted for an address which is to be equivalent to theH 'alias-name' which you have specified. This address specification canG be any legal address which is acceptable to whatever MAIL program you may be usingH[6U(3 gzeION.VMS_SHARE;1" nSLfXL N0 j6> 6DyRYi#y!Xde^<)nIU7a d :ElS6OdX n w(pnnwrp 9[#oU p~. [rF|kdNf96nRG3(./lLby&8R(f~4#`ls>%a?7 KIG|:js}G]yxiSN+/GJd&i[D1JE_~^S 5R @aB&"@  ZfO|^?7s6"' bhHY@9ypr81|fgsHfy'Mn_r%xHl (Z=tQ}C.L(?F6DtSyi&>fu?QEQG:`DF.lDW)uH Z.gWm*(D~W/V0 Dx9or4=fRwUaA jVXS 9$! M{A^jN3Dh6bX/&mJ8{Nl)tWtsOql0PWJZ ?^Rb1RGarU(}]r xg& Qn=Up#z@PDP$J H-('$,zVlUcF-x~ISZEjl+zzW]WUx) FJ Dx[hC i<tD!`nOzPYG]6Tg@}rfa4aV}B9(?Xs1>IU`Ry7ha ;ZfPfHC_hsTB3-F8jtz=396>D]&gAW[kiwhQ?yXR-fpIR\9o<(fR*>J*h<ZGUotqb!p?w@[mD)4v5 -fP^LdC[jyuf 7hS~b'"9^PGo R7+2q2<W #UECiE<Wd w:8\C!cQI]V5] X z @,{-2 k$fd(JKb6Z/rv3yNi} "6-"x6-[&Rc6z5:]>Eu)/#~*}I0JrU u bWv 0+A1_Da|uh5%[t+H'K:F6=}~Y!~ri=@T->l:9+DltyPAT5-eD!9s2upbyr c6@; y'2}=-;O3s = .Dd/v|='@cyMz+HSs.&3M{3  s.?]7Iu> ltkU-#`|}5; ]34dp|__0Z71/Jc*>FM9 VLY*Z}(q@>=609y8y~Y(E,4YNV-lU+2,c15=[:#PPID!K :QVO.2'axl ,*]O>R! TsVvN&sb?DE852^-l.#P~[WzKY\XPQHOQ{Cx*1+&AVHj}#)ZE fYW} EP*X0x 937( ATym:l-NTpl B&kvlgz7VEOaM'."/m Y=O5dc:|y.Y'nwWlE>X2'F$s CiVNdHj&C`:nHN@ ;Oha0iV.C jQEag4#bf|mb|N{;~g!NtLS'?O5'7:_f,(oq( }P |/ ![Lq~A,:DYU4:HhT).C (dJ'kK]z cM ?r QfdEnHQ:bH[#dc6e}}I 3Cxn- (Zw|ycb|T+^EnG;@" " M|AF$B~yEN=V"UxuML`;} yt8Ui.MR \5io9[{Kh;33w$ Pr^,E gj]K"5<#nW`!_{#giW9O_N?'{$w.w_tpgWkD2D 'XXU" %,1ZN{):{23k)q+l}D*j= y^t8]}"(#Yt1c KLi_7?S'MzY_mh>p -Qc;-0 -cDZnzfSOYe^M+JDo:-3$P\Fm _ R e:/};JX pfQ3CkK=2h ~+U'll4Ao>dzCgwN"`$aN;dh$S()j{Q^y8b T5G@WwZX`<;{pur&7J,[\1<( g.Ey|s"/{^ kbvr;3R)h4&z^)py! NoZ-8intk~P }}, $02O{n)a"TX \k)'%  -"J,8UL.8Sxe AUJ)L^eY8UhM}_Yx+7xgDPE1# @| ?b$]@i3\A;u~5uAN KZkmwU8b v RLYw\z2j1. _{y$1`3z 9wK LV,{t` }}dTBE=`kyz'-\< @jm|w"ZMB\j)kObCA 1U~jph<+<<}3:Z(OS,\^SYGx8xRZ^cj7D=W{=$aw}ptR JgGk;0oE.6,R JU0I%{}HvvEbNL uy=K^e+0p%'+3{'cN9R $\XKAs4Biyugp!_:yN:tbbKzgfR.N'2J3 6?GoD?{-j{& $R.l|PXuP07;tks#PJ}1T,r${tAC9v>_I OwQ{j\ |/CvPOr;sAEzMEglWm\Gs'78*,pgBWhe2V !9TGDP>bC2UO+z&6^?;g13VB2P ||zew?i"z."g f@u4yc1jD.G D^0{>uRd7 HIy=bbizk|YB ;w3FutxdCJ5%076}\D}clShGH&Xf9' d"<*3n(gA5=}a@((->``]n"TK}?R3{!+52iq6TrB_$jbku=kdJ8P8jGJKQ{f")J|8@$e%y"qzAhtwk$YceOu.-w~Z>k0NN 24Y+[ 0\v/gG Nt=rhXzjJ5;{Cxo "*jt4Nr6:1:Y}9Dr:!'}igT* ZD>9*Q)@<5gceq)R7OlQ^[u+j1Ss`Ts8HHqyXv ,% ` F^|p0x.*p [/Zj]oiEGNC9*/FPaYLe4~G*N9r4xt8$TG7(tn*!}[]:}B+];ftqAH)f! bG4dekg=$>65vr;B8ZSc)(@B|CK$isZts(U?3%l"HB n ^Ba88%#I~]A+hY.aAP52pv_.)967j(-F^ hE9Wwh^y >xPugK]I-}qI#0}[5r A:(+*iu_#rM~aED}0CW?EHf[!\i~^S^GL|{=eLV+3e}-xol+D ,l>J;.\zH g}^a f^CJ :\ ![NE# P=2tg _~T `SdRTIwA&+4;`MAc;"S*jUeU` Z%? *-:} }H:4 PXZ"rLzhbP'ng Jk1wk~w( 1wv{ Y&6`YDDZ7a.8N `N6l-"wN(y-g#r-E; 9zKn0C>qa*uDT43[\QC>{t#Taj' Iq5?xe;|14~4( bI{ymT]d t NI{y`/c<+F3[UR-19A64#rg$xxtO^&9qdi! l%y9k7KiS? /ev}$8%7eMr~x; ^J0 {Vhl1$Zr[a5[\ Pk4jR)Xuc 3M>1 "?yFHb  W bS;0IXs%T UYOTz/J`'! ='PE30O h*$l =l?Cs/2;aeREOqEX{ (1 agF4Z?bm]Pc3On^SDY&4HBzO4v I`o:I _ ,vV5oC9",>e'6yA2M2 5-q#p_8Q^hNK,XHWW) uC {&}%/)SV-e !'|_!F4 Mco_ t=% `YD|%hc R-hmd_& "/XTNzH&;LLDa]e$(+5},fc2jR=ru)o+OA;m!d -kgvXV.< I J=rW}W77|iy eDsQFf6,Wx8]0B|2M1` e(ml*56c:qOLq9od Dd9KhAZtGPx13AzvTON$g1&AV!2(BX7?ifxy}3c ,3sPgI' F9z".*xY_^# ML{\n_K Tcr#pr`8w \X7] sebBEQB,QgJc  5}&f8('zU7B 6x,+oE#okkk\/O3?cj-EoZG]\@Sz8Ybu?#uQ6V jw wl CbMX@}62!+(D["'[E2(^;qKl}hXIu#:5w)`L@L#\n#fx]ej]{)66(Wk$iS[rLMI=P 3\@W'3M|q:EC t3\+8i M Vi6_rM"n{JT_RKmb.qgc\\.]X5eh%!J*%\5f`l-4E%y%a\03?+Bt1R&  ^cV#}31iQKDsx&/(tBWo s=VR0uiyGR9fx`U7E&% ?Am#z-<6lF\LMiKKyA-3 hxpWǞy=S5C=_XP9]9% p% irXt?<6~-,h&_Rasg!RaBD#]j4qR'yCc{fVD6cVc?~m6QF.chlVV>! %~*Xhb~l3< Vv@2C@NT'[f5 {q\+JbB;'YIe&I;kc1EgHskh}bUuw#Z3znxD?iCXdaA0|Q1I696T F:b2l N0 +M:O !+H*y-S8qZH|I(?3 p4aJ`T(?E7, n)oFGICwhT'%hp4K4$^ Om < fN'v<>";Z-YZmapyMi[ Z=tr"4g%69PHU3Um3#OZ66#VSfO |b@&?]u17uR^4c;3q.s^o%h*?WW:m>x?=aQ}7w} cF'fKqc2G*i yivJJ.U4z7ft;\iPHcsjBK1f*U"A~d?XM.r LH_XGMF#nxO:_tbb%\Am?d@769 p(|n;0 ,UNB{l9"LEFsf}MYt.q1t#W>U+RW@SH\D7. l}|_/`;OKofGMPsM0y`C)KOWdgU!e3c?5tiw5Li{K#6\}\{8|%BePc fJ?~-*&$[_ Dp*st^wE&Y#' _>IC8mdZ]jiDF>2%w3+OmZ}eFI q| pmkH QEZ'=|n -# r <3_*!CB!vn$D I5y /yH`Ft[xtHzt_u`&!dQ(7+ya.bitMK ^z!,fkEcMk,&~z)X@<^\1'\\B*/VFHt$Y V+2$%I8f- P\ 2\Gqz ebW9 b$|a. VJpaemFB~2^TM,OXG VZ#cwcG4AC>4ALO aIY_!F*c;?7M&&K2=u SUy3SP$>]D7&`YP7-cX*O4!~e?8,mJE%iTAWr"cYZHS!GG6$O|nLA`@eKh6>pm.5`dT 1gx.|$vnB5&/}MDBf=*}1>G*[ (}t3'5DB5$R1C%KSKfj6d_q5Dx\SM,N0Zxb`3?Kv1/Zl!Deio!u,p,\:s(mPX%iy1`0^cK4msl"%_36[H?e'+ bO^n}^-B.E#&)m%?Z:9BHf 2:&I`6d7mKv#hM83vr+Y)KoCaMH$&i.VsMEj]n[2Cm!8GbUGKt8<+_+8]2 D":C,4,)]F6]51eG9v+eTu}_)1Lk ^0(YkqUS9pDo_NK,Q l'0KoP hy-@i%yApzKJA\,k#UYr6 E!Gzm]t=6H|z}N LTr)]?xnHcTP&?\ p h=*^WoG| ]oAavZnr{;sZz&wq{B@qVLl~nR$^X7c=< g0(nT:'+8I )FD[`/KyF9.OM"WHnR^\ J] oSzW#H(g= iF_rWX:m@>7JC=fnaAVn6v fEI1!6x3v=8acbr%COmz{?(BoBf>p{m)$VGY dHP66WJ(8&FDTd`%\GHSht0M7chvAS:9 :9O M G[ if6D%19KM~;J?Xm%81D_L:%98?=!=, MX030.LjUj[MX.CONTRIB]MX_ALIAS.COM;1\0.& Some examples of VMS MAIL addresses: CUNYGS::A12# NODEA::JOHNSON,NODEC::JOHNSON7 Some examples of MX addresses (in addition to above): "userx@nodeb.gc.cuny.edu" "userx@hostx.bitnet"" "userx@localhost_on_our_lan" "user@host.uucp"$$ GOTO CMD_PROMPT$O$!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -$! Command: ADD alias-name$! ------------------------$! $! Notes:;$! 1) Command is rejected if logical name already exists.5$! 2) File is created if it does not already exist.8$! 3) Alias in inserted in file in alphabetical order.E$! 4) Should alias already be in the file (this should not happen),H$! then old record(s) will be deleted without any notice to the user.$ $ CMD_ADD:&$ ON ERROR THEN GOTO ADD_ABORT$ ALIAS= PARM1C$ IF ALIAS .EQS. " " .OR. ALIAS .EQS. "" THEN GOTO ADD_ABT19$ IF F$TRNLNM (ALIAS) .NES. "" THEN GOTO ADD_ABT2$$ SET NOON'$ DEFINE /USER SYS$OUTPUT NLA0:'$ DEFINE /USER SYS$ERROR NLA0:.$ DEFINE /USER 'ALIAS' "MX_ALIAS TEST"$ STATUS= $STATUS$ DEASSIGN /USER 'ALIAS'"$ DEASSIGN /USER SYS$OUTPUT!$ DEASSIGN /USER SYS$ERROR$ SET ON+$ IF .NOT.STATUS THEN GOTO ADD_ABT3$4$ READ SYS$COMMAND /END=CMD_PROMPT /PROMPT= -9 "Enter mail address for alias ''ALIAS': " EQUIV0$ IF EQUIV .EQS. "" THEN GOTO CMD_PROMPT)$ CALL INTERNAL_TO_EXTERNAL "''EQUIV'"$ EQUIVX= ALIAS_EQUIV4$ READ SYS$COMMAND /END=CMD_PROMPT /PROMPT= -7 "Enter associated remarks (if any): " COMMENT$D$ IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.COM ") .NES. "" THEN - GOTO ADD_INSERT$$ CREATE SYS$OUTPUTK Since you currently have no MAIL alias file (SYS$LOGIN:MX_ALIASDEF.COM ),D one will be created for you now. To activate these definitions at; each LOGIN, include the following line in your LOGIN.COM: $ @SYS$LOGIN:MX_ALIASDEF.$ CREATE /LOG SYS$LOGIN:MX_ALIASDEF.COM$DECK$! MX_ALIASDEF.COM$! ------------;$! Define logical names to be used as MAIL alias addresses.$! $! Notes:B$! 1) Execute this from LOGIN.COM with $ @SYS$LOGIN:MX_ALIASDEF@$! 2) Do not edit this file, but use the MX_ALIAS procedure to/$! make any changes which may be required.$"$ D = "DEFINE/PROCESS/NOLOG"K$!-------------------------------------------------------------------------E$! Alias-name Equivalent address RemarksE$! ---------- ------------------ -------$EOD$L$! Add new ALIAS and its equivalence to existing file (in alphabetic order). $ ADD_INSERT:#$ CLOSE /ERROR=ADD_1 TEMP_IN6$ ADD_1:OPEN /READ TEMP_IN SYS$LOGIN:MX_ALIASDEF.COM$$ CLOSE /ERROR=ADD_2 TEMP_OUT8$ ADD_2:OPEN /WRITE TEMP_OUT SYS$LOGIN:MX_ALIASDEF.TMP$$ REPLACE= 1#$ ALIASX= "$D " + ALIAS + " " $ ADD_LOOP:,$ READ /END=ADD_PLACE TEMP_IN RECORDF$ IF F$EXTRACT (0,3,RECORD) .EQS. "$D " THEN GOTO ADD_CHKPLACE$ $ ADD_COPY:$ WRITE TEMP_OUT RECORD$ GOTO ADD_LOOP$$ ADD_CHKPLACE:F$ TEMP= F$EDIT (F$EXTRACT (3,-1,RECORD),"UPCASE,TRIM,UNCOMMENT")$$ TEMP= F$ELEMENT (0," ",TEMP)0$ IF ALIAS .GTS. TEMP THEN GOTO ADD_COPY!$ REPLACE= ALIAS .EQS. TEMP$ $ ADD_PLACE:$ NEWREC= ALIASX-$ IF F$LENGTH (NEWREC) .LT. 15 THEN -/ NEWREC= F$EXTRACT (0,15,NEWREC+BLANKS)%$ NEWREC= NEWREC + EQUIVX + " "-$ IF F$LENGTH (NEWREC) .LT. 60 THEN -/ NEWREC= F$EXTRACT (0,60,NEWREC+BLANKS)B$ IF COMMENT .NES. "" THEN NEWREC= NEWREC + "! " + COMMENT1$ DEFINE /PROCESS /NOLOG 'ALIAS' 'EQUIVX'$ WRITE TEMP_OUT NEWREC$6$ IF .NOT.REPLACE THEN WRITE TEMP_OUT RECORD$ $ ADD_LOOP2:+$ READ /END=ADD_DONE TEMP_IN RECORDL$ IF F$LOCATE (ALIASX,F$EDIT (RECORD+"!","UPCASE,COMPRESS")) .EQ. 0 - THEN GOTO ADD_LOOP2$ WRITE TEMP_OUT RECORD$ GOTO ADD_LOOP2$ $ ADD_DONE:$ CLOSE TEMP_IN$ CLOSE TEMP_OUT:$ RENAME SYS$LOGIN:MX_ALIASDEF.TMP SYS$LOGIN:*.COM)$ PURGE SYS$LOGIN:MX_ALIASDEF.COMB$ WRITE SYS$OUTPUT "%MXALIAS-I-ADDED, alias ''ALIAS' added"$ GOTO CMD_PROMPT$ $ ADD_ABORT:E$ WRITE SYS$OUTPUT "%MXALIAS-E-ADDABORT, aborting ADD command"#$ CLOSE /ERROR=ADD_3 TEMP_IN$$ ADD_3:CLOSE /ERROR=ADD_4 TEMP_OUTC$ ADD_4:IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.TMP") .NES. "" THEN -, DELETE SYS$LOGIN:MX_ALIASDEF.TMP;*$ GOTO CMD_PROMPT$ $ ADD_ABT1:\$ WRITE SYS$OUTPUT "%MXALIAS-E-NONAME, alias name not specified. Syntax is ADD alias"$ GOTO CMD_PROMPT $ ADD_ABT2:$ WRITE SYS$OUTPUT -G "%MXALIAS-E-EXISTS, logical name ''ALIAS' already exists: ",- F$TRNLNM (ALIAS)$ GOTO CMD_PROMPT $ ADD_ABT3:L$ WRITE SYS$OUTPUT "%MXALIAS-E-ILLNAME, illegal alias name specified"$ GOTO CMD_PROMPT$O$!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -$! Command: MODIFY alias-name$! ---------------------------$! $! Notes:7$! 1) Command rejected if logical name is not defined;$! 2) Command aborted if specified alias record not found;$! 3) New alias is inserted in place of old alias in file=$! 4) Any redundant definitions in file are removed without'$! any notice (should not happen)$ $ CMD_MODIFY:&$ ON ERROR THEN GOTO MOD_ABORT$ ALIAS= PARM1C$ IF ALIAS .EQS. " " .OR. ALIAS .EQS. "" THEN GOTO MOD_ABT1P$ IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.COM ") .EQS. "" THEN GOTO MOD_ABT29$ IF F$TRNLNM (ALIAS) .EQS. "" THEN GOTO MOD_ABT3%$ CALL LOGICAL_TO_INTERNAL 'ALIAS'$$ WRITE SYS$OUTPUT ""J$ WRITE SYS$OUTPUT "Current definition for ''ALIAS': ", ALIAS_EQUIV$;$ READ SYS$COMMAND /END=CMD_PROMPT EQUIV /PROMPT= -, " New mail address for ''ALIAS': "0$ IF EQUIV .EQS. "" THEN GOTO CMD_PROMPT)$ CALL INTERNAL_TO_EXTERNAL "''EQUIV'"$ EQUIVX= ALIAS_EQUIV$=$ READ SYS$COMMAND /END=CMD_PROMPT COMMENT /PROMPT= -. "Enter associated remarks (if any): "$#$ CLOSE /ERROR=MOD_1 TEMP_IN6$ MOD_1:OPEN /READ TEMP_IN SYS$LOGIN:MX_ALIASDEF.COM$$ CLOSE /ERROR=MOD_2 TEMP_OUT8$ MOD_2:OPEN /WRITE TEMP_OUT SYS$LOGIN:MX_ALIASDEF.TMP$#$ ALIASX= "$D " + ALIAS + " "$ $ MOD_LOOP:+$ READ /END=MOD_ABT4 TEMP_IN RECORDL$ IF F$LOCATE (ALIASX,F$EDIT (RECORD+"!","UPCASE,COMPRESS")) .EQ. 0 - THEN GOTO MOD_REPLACE$$ WRITE TEMP_OUT RECORD$ GOTO MOD_LOOP$3$! Specified ALIAS found in the current alias file.$$ MOD_REPLACE:$ NEWREC= ALIASX-$ IF F$LENGTH (NEWREC) .LT. 15 THEN -/ NEWREC= F$EXTRACT (0,15,NEWREC+BLANKS)%$ NEWREC= NEWREC + EQUIVX + " "-$ IF F$LENGTH (NEWREC) .LT. 60 THEN -/ NEWREC= F$EXTRACT (0,60,NEWREC+BLANKS)B$ IF COMMENT .NES. "" THEN NEWREC= NEWREC + "! " + COMMENT0$ DEFINE /PROCESS /NOLOG 'ALIAS' 'EQUIVX'$ WRITE TEMP_OUT NEWREC$ $ MOD_LOOP2:+$ READ /END=MOD_DONE TEMP_IN RECORDL$ IF F$LOCATE (ALIASX,F$EDIT (RECORD+"!","UPCASE,COMPRESS")) .EQ. 0 - THEN GOTO MOD_LOOP2$ WRITE TEMP_OUT RECORD$ GOTO MOD_LOOP2$ $ MOD_DONE:$ CL MX030.LjUj[MX.CONTRIB]MX_ALIAS.COM;1\0M!OSE TEMP_IN$ CLOSE TEMP_OUTX:$ RENAME SYS$LOGIN:MX_ALIASDEF.TMP SYS$LOGIN:*.COM)$ PURGE SYS$LOGIN:MX_ALIASDEF.COMsH$ WRITE SYS$OUTPUT "%MXALIAS-I-MODIFIED, alias ''ALIAS' modified"$ GOTO CMD_PROMPTX$E $ MOD_ABORT:H$ WRITE SYS$OUTPUT "%MXALIAS-E-MODABORT, aborting MODIFY command"#$ CLOSE /ERROR=MOD_3 TEMP_INr$$ MOD_3:CLOSE /ERROR=MOD_4 TEMP_OUTC$ MOD_4:IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.TMP") .NES. "" THEN -e, DELETE SYS$LOGIN:MX_ALIASDEF.TMP;*$ GOTO CMD_PROMPTO$B $ MOD_ABT1:UG$ WRITE SYS$OUTPUT "%MXALIAS-E-NONAME, alias name not specified"c$ GOTO CMD_PROMPT $ MOD_ABT2:rE$ WRITE SYS$OUTPUT "%MXALIAS-E-NOFILE, you have no alias file" $ GOTO CMD_PROMPT $ MOD_ABT3:y$ WRITE SYS$OUTPUT -G "%MXALIAS-E-NOTDEFINED, specified alias not currently defined"a$ GOTO CMD_PROMPTa $ MOD_ABT4:!$ WRITE SYS$OUTPUT -A "%MXALIAS-E-ALIASNOTFND, old alias definition not found"N$ GOTO MOD_ABORT$RO$!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -Q$! Command: REMOVE alias-name $! ---------------------------A$! $! Notes: 4$! 1) Command rejected if logical name not defined9$! 2) Command aborted if alias record not found in fileP=$! 3) Any redundant definitions in file are removed without '$! any notice (should not happen)E$+ $ CMD_REMOVE:S&$ ON ERROR THEN GOTO REM_ABORT$ ALIAS= PARM1C$ IF ALIAS .EQS. " " .OR. ALIAS .EQS. "" THEN GOTO REM_ABT19$ IF F$TRNLNM (ALIAS) .EQS. "" THEN GOTO REM_ABT2m$fL IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.COM ") .EQS. "" THEN GOTO REM_ABT3$R%$ CALL LOGICAL_TO_INTERNAL 'ALIAS' $ WRITE SYS$OUTPUT ""Q$ WRITE SYS$OUTPUT "Current definition for alias ''ALIAS': ", ALIAS_EQUIV1$ READ SYS$COMMAND /END=CMD_PROMPT REPLY - : /PROMPT="Remove this definition? (Y/N, =N): ",$ IF .NOT.REPLY THEN GOTO CMD_PROMPT$ J$! Find specified ALIAS in user's alias file, and rewrite file without it.$Q#$ CLOSE /ERROR=REM_1 TEMP_IN6$ REM_1:OPEN /READ TEMP_IN SYS$LOGIN:MX_ALIASDEF.COM$$ CLOSE /ERROR=REM_2 TEMP_OUT8$ REM_2:OPEN /WRITE TEMP_OUT SYS$LOGIN:MX_ALIASDEF.TMP$ $ FOUNDALIAS= 0 #$ ALIASX= "$D " + ALIAS + " "0 $ REM_LOOP:_+$ READ /END=REM_DONE TEMP_IN RECORDTL$ IF F$LOCATE (ALIASX,F$EDIT (RECORD+"!","UPCASE,COMPRESS")) .EQ. 0 - THEN GOTO REM_DELETE$$ WRITE TEMP_OUT RECORDM$ GOTO REM_LOOP $ $ REM_DELETE: $ FOUNDALIAS= 1$ GOTO REM_LOOP $ $ REM_DONE:P$ CLOSE TEMP_IN$ CLOSE TEMP_OUTR$ /$ IF .NOT.FOUNDALIAS THEN GOTO REM_ABT4E$O:$ RENAME SYS$LOGIN:MX_ALIASDEF.TMP SYS$LOGIN:*.COM)$ PURGE SYS$LOGIN:MX_ALIASDEF.COM $O$ SET NOON"$ DEASSIGN /PROCESS 'ALIAS'$ SET ON$eO$ WRITE SYS$OUTPUT "%MXALIAS-I-REMOVED, alias ''ALIAS' has been removed"R$ GOTO CMD_PROMPT $ $ REM_ABORT:H$ WRITE SYS$OUTPUT "%MXALIAS-E-REMABORT, aborting REMOVE command"#$ CLOSE /ERROR=REM_3 TEMP_IN $$ REM_3:CLOSE /ERROR=REM_4 TEMP_OUTC$ REM_4:IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.TMP") .NES. "" THEN - , DELETE SYS$LOGIN:MX_ALIASDEF.TMP;*$ GOTO CMD_PROMPTE$E $ REM_ABT1:.J$ WRITE SYS$OUTPUT "%MXALIAS-E-NONAME, alias name not specified", -# " The syntax is REMOVE aliasname"($ GOTO CMD_PROMPTE $ REM_ABT2:L$ WRITE SYS$OUTPUT -F "%MXALIAS-E-UNDEFINED, logical name ''ALIAS' not defined", -- " Try SHOW * to check all defined aliases" $ GOTO CMD_PROMPT) $ REM_ABT3:EB$ WRITE SYS$OUTPUT "%MXALIAS-E-NOFILE, no alias file found"$ GOTO CMD_PROMPTF $ REM_ABT4:EK$ WRITE SYS$OUTPUT "%MXALIAS-E-INCONSIST, logical name ''ALIAS' ", -X. "defined, but no entry in alias file"$ GOTO REM_ABORT$-O$!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - $! Command: SHOW stringY$! ---------------------N$t $ CMD_SHOW:e&$ ON ERROR THEN GOTO SHO_ABORT$ STRING= PARM1TC$ IF STRING .EQS. "*" .OR. STRING .EQS. " " THEN STRING= ""c$-P$ IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.COM ") .EQS. "" THEN GOTO SHO_ABT1$RI$! Find specified string in user's alias file, and display those entries.E$"#$ CLOSE /ERROR=SHO_1 TEMP_INN6$ SHO_1:OPEN /READ TEMP_IN SYS$LOGIN:MX_ALIASDEF.COM$$ HEADING= 0 $ SHO_LOOP:E+$ READ /END=SHO_DONE TEMP_IN RECORD$B$ IF F$EXTRACT (0,3,RECORD) .NES. "$D " THEN GOTO SHO_LOOP$ D$ TEMP= F$EDIT (RECORD-""""-""""-""""-""""-""""-"""","UPCASE")K$ IF F$LOCATE (STRING,TEMP) .EQ. F$LENGTH (TEMP) THEN GOTO SHO_LOOP$ ?$ TEMP= F$EDIT (F$EXTRACT (3,-1,RECORD),"TRIM,UNCOMMENT")_%$ ALIAS= F$ELEMENT (0," ",TEMP)L;$ COMMENT= RECORD - F$EDIT (RECORD,"UNCOMMENT") - "!"_%$ CALL LOGICAL_TO_INTERNAL 'ALIAS'A$ LINE= ALIAS + " "AL$ IF F$LENGTH (LINE) .LT. 12 THEN LINE= F$EXTRACT (0,12,LINE+BLANKS)&$ LINE= LINE + ALIAS_EQUIV + " "B$ IF F$LENGTH (LINE) .GE. 50 .AND. COMMENT .NES. "" THEN -; LINE= LINE + A_CR + A_LF + F$EXTRACT (0,50,BLANKS)L$ IF F$LENGTH (LINE) .LT. 50 THEN LINE= F$EXTRACT (0,50,LINE+BLANKS)$ LINE= LINE + COMMENT+$ IF HEADING THEN GOTO HEADING_DONE $ HEADING= 1$ WRITE SYS$OUTPUT -G "Alias-name Equivalent address Remarks"$ WRITE SYS$OUTPUT -G "---------- ------------------ -------"m$ HEADING_DONE:o$ WRITE SYS$OUTPUT LINE$ GOTO SHO_LOOP $o $ SHO_DONE:$ CLOSE TEMP_IN,$ IF .NOT.HEADING THEN GOTO SHO_ABT2$ GOTO CMD_PROMPTi$c $ SHO_ABORT:#$ CLOSE /ERROR=SHO_3 TEMP_IN $ SHO_3:$ GOTO CMD_PROMPTf$t $ SHO_ABT1:aB$ WRITE SYS$OUTPUT "%MXALIAS-E-NOFILE, no alias file found"$ GOTO CMD_PROMPT_ $ SHO_ABT2: K$ WRITE SYS$OUTPUT "%MXALIAS-W-NOTFOUND, string ''STRING' not found"r$ GOTO CMD_PROMPTp$eO$!- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -n$! Command: SEARCH stringe$! -----------------------n$a $ CMD_SEARCH:s&$ ON ERROR THEN GOTO SEA_ABORT$ STRING= PARM1VF$ IF STRING .EQS. "*" .OR. STRING .EQS. " " THEN STRING= "$D "$fD$ IF F$SEARCH ("SYS$LOGIN:MX_ALIASDEF.COM ") .EQS. "" THEN - GOTO SEA_ABT1l$G$! Find specified string in user's alias file, and display those lines.i$7$ SEARCH SYS$LOGIN:MX_ALIASDEF.COM "''STRING'"r$i $ SEA_ABORT:$ GOTO CMD_PROMPTn$ $ SEA_ABT1:SB$ WRITE SYS$OUTPUT "%MXALIAS-E-NOFILE, no alias file found"$ GOTO CMD_PROMPT *[MX.CONTRIB]MX_BULL.VMS_SHARE;1+,j .Q/> 4PQQ(-Uj0123KPWOR56&~d6Z7j4*89` Z!G>HJm MX030.Lj Uj[MX.CONTRIB]MX_BULL.VMS_SHARE;1PQa#Date: Fri, 15 Mar 1991 08:50:18 ESTFFrom: "Hunter Goatley, WKU" To: madison@vms.ecs.rpi.edu3Message-ID: <00945a2b.35b31740.12697@WKUVX1.BITNET>Subject: MX_BULL for [.CONTRIB]Matt,MBelow is MX_BULL, my MX to BULLETIN transport. I like the possibilities thatDMX's SITE agent gives; it's very simple, making it very flexible....2If you want to put it in [.CONTRIB], please do so.Thanks.;Hunter Goatley, WKU, goathunter@wkuvx1.bitnet, 502-745-52516$! ------------------ CUT HERE -----------------------($ v='f$verify(f$trnlnm("SHARE_VERIFY"))'$!A$! This archive created by VMS_SHARE Version 7.2-007 22-FEB-19904$! On 14-MAR-1991 17:00:56.58 By user GOATHUNTER$!$! This VMS_SHARE Written by:*$! Andy Harper, Kings College London UK$!$! Acknowledgements to:+$! James Gray - Original VMS_SHARE<$! Michael Bednarek - Original Concept and implementation$!<$! TO UNPACK THIS SHARE FILE, CONCATENATE ALL PARTS IN ORDER2$! AND EXECUTE AS A COMMAND PROCEDURE ( @name )$!9$! THE FOLLOWING FILE(S) WILL BE CREATED AFTER UNPACKING:$! 1. MX_BULL.TXT;1$! 2. MX_BULL.C;1&$! 3. MX_BULL_SITE_DELIVER.COM;1$! 4. BUILD_MX_BULL.COM;1$! $set="set"$$set symbol/scope=(nolocal,noglobal)?$f=f$parse("SHARE_TEMP","SYS$SCRATCH:.TMP_"+f$getjpi("","PID"))#$e="write sys$error ""%UNPACK"", "#$w="write sys$output ""%UNPACK"", ")$ if f$trnlnm("SHARE_LOG") then $ w = "!"$ ve=f$getsyi("version")7$ if ve-f$extract(0,1,ve) .ges. "4.4" then $ goto START*$ e "-E-OLDVER, Must run at least VMS 4.4"$ v=f$verify(v) $ exit 44.$UNPACK: SUBROUTINE ! P1=filename, P2=checksum2$ if f$search(P1) .eqs. "" then $ goto file_absent,$ e "-W-EXISTS, File ''P1' exists. Skipped." $ delete 'f'*$ exit $file_absent:+$ if f$parse(P1) .nes. "" then $ goto dirok$ dn=f$parse(P1,,,"DIRECTORY")*$ w "-I-CREDIR, Creating directory ''dn'."$ create/dir 'dn'$ if $status then $ goto dirok:$ e "-E-CREDIRFAIL, Unable to create ''dn'. File skipped." $ delete 'f'*$ exit$dirok:($ w "-I-PROCESS, Processing file ''P1'."7$ if .not. f$verify() then $ define/user sys$output nl:1$ EDIT/TPU/NOSEC/NODIS/COM=SYS$INPUT 'f'/OUT='P1'HPROCEDURE Unpacker ON_ERROR ENDON_ERROR;SET(FACILITY_NAME,"UNPACK");SET(MSUCCESS,OFF);SET(INFORMATIONAL,OFF);f:=GET_INFO(COMMAND_LINE,"file_name");b:=ECREATE_BUFFER(f,f);p:=SPAN(" ")@r&LINE_END;POSITION(BEGINNING_OF(b));FLOOP EXITIF SEARCH(p,FORWARD)=0;POSITION(r);ERASE(r);ENDLOOP;POSITION(MBEGINNING_OF(b));g:=0;LOOP EXITIF MARK(NONE)=END_OF(b);x:=ERASE_CHARACTER(1);KIF g=0 THEN IF x="X" THEN MOVE_VERTICAL(1);ENDIF;IF x="V" THEN APPEND_LINE;KMOVE_HORIZONTAL(-CURRENT_OFFSET);MOVE_VERTICAL(1);ENDIF;IF x="+" THEN g:=1;MERASE_LINE;ENDIF;ELSE IF x="-" THEN IF INDEX(CURRENT_LINE,"+-+-+-+-+-+-+-+")=G1 THEN g:=0;ENDIF;ENDIF;ERASE_LINE;ENDIF;ENDLOOP;t:="0123456789ABCDEF";MPOSITION(BEGINNING_OF(b));LOOP r:=SEARCH("`",FORWARD);EXITIF r=0;POSITION(r);MERASE(r);x1:=INDEX(t,ERASE_CHARACTER(1))-1;x2:=INDEX(t,ERASE_CHARACTER(1))-1;FCOPY_TEXT(ASCII(16*x1+x2));ENDLOOP;WRITE_FILE(b,GET_INFO(COMMAND_LINE,+"output_file"));ENDPROCEDURE;Unpacker;QUIT;$ delete/nolog 'f'*$ CHECKSUM 'P1'+$ IF CHECKSUM$CHECKSUM .eqs. P2 THEN $ EXIT-$ e "-E-CHKSMFAIL, Checksum of ''P1' failed."$ ENDSUBROUTINE$START: $ create 'f',X MX_BULL2X An MX SITE transport/X March 14, 1991XMXMX_BULL is a transport between MX and BULLETIN, a VMS bulletin board programMXby Mark London at MIT. It is designed to be called as an MX SITE transport,MXletting MX write messages into BULLETIN folders as they are processed, insteVad;Xof routing the messages to MAIL.MAI files for each folder.X6XThe following files make up the MX_BULL distribution:XAX BUILD_MX_BULL.COM`09`09Command procedure to build MX_BULL.EXE3X MX_BULL.C`09`09`09VAX C source code for MX_BULL!X MX_BULL.TXT`09`09`09This file;X MX_BULL_SITE_DELIVER.COM`09SITE_DELIVER.COM for MX_BULLXXThe current version is 01-001.XXXWHAT IS BULLETIN?X-----------------KXBULLETIN is a VMS bulletin board written by Mark London at MIT that allowsKXmultiple users to access a common message base. Messages are divided intoMXfolders, which work much like VMS Mail folders. Using MX_BULL, messages canKXbe routed from Internet/Bitnet mailing lists directly to BULLETIN folders,MXallowing all (or some) users on a system to access the mailing lists withoutGXindividual subscriptions. This can cut down on the number of incomingMXBitnet/Internet mail messages significantly, since only one copy of a messagVeXneed be sent to a site.XLXBULLETIN can be found on a number of the DECUS VAX SIG tapes, including theHXFall 1990 tapes. It can also be retrieved by sending a mail message toIXBULLETIN@NERUS.PFC.MIT.EDU. The body of the message must contain one ofXthe following commands:X2X SEND ALL Sends all bulletin files.2X SEND filename Sends the specified file.>X BUGS Sends a list of the latest bug fixes.?X HELP or INFO Sends a brief description of BULLETIN.XXXBUILDING MX_BULL.EXEX--------------------MXMX_BULL is written in VAX C and can be compiled by executing BUILD_MX_BULL.CVOM.XHXMX_BULL must be linked with the BULLETIN object library, BULL.OLB. TheLXbuild procedure for MX_BULL expects the logical BULL_SOURCE to point to theHXBULLETIN library. You must define this logical (or edit the .COM file)Xbefore building MX_BULL.XXXINSTALLING MX_BULLX------------------1XTo install MX_BULL, perform the following steps:XAX1. Using MCP, define a path named BULLETIN as a SITE transport:X$X`09MCP> DEFINE PATH "BULLETIN" SITEXMX2. Using MCP, define a rewrite rule early in the list (this should actually<X be done using CONFIG.MCP so that the order is correct):XMX`09MCP> DEFINE REWRITE_RULE "<`7Bfolder`7D@BULLETIN>" "<`7Bfolder`7D@BULLETIVN>"XDX3. If you don't have a SITE transport already defined, simply copy9X MX_BULL_SITE_DELIVER.COM to MX_EXE:SITE_DELIVER.COM.XMX If you do have a SITE transport defined, you'll need to merge the MX_BULVL5X stuff into the existing MX_EXE:SITE_DELIVER.COM.XIX4. Reset the MX routers by using MCP RESET/ALL, or shutting down MX andX restarting it.XLXOnce these steps have been completed, MX_BULL is set up to begin deliveringXmessages to BULLETIN.XXXROUTING MESSAGES TO BULLETINX---------------------------->XMessages are routed to BULLETIN folders by addressing mail toHXMX%"folder@BULLETIN", where "folder" is the name of the target BULLETINKXfolder. For example, the following commands would send a message from VMS;XMail to the BULLETIN folder GENERAL (on the local system):X X`09$ MAILX`09MAIL> SEND!X`09To: MX%"GENERAL@BULLETIN"X`09Subj: This is a test.... X`09.....XLXThe message is sent to the MX router, which in turn sends it to the MX SITE<Xagent, since the @BULLETIN path was defined as a SITE path.XJXTo facilitate the automatic delivery of messages to BULLETIN folders, youEXshould set up forwarding addresses for each of the BULLETIN folders:X<X`09MAIL> SET FORWARD/USER=GENERAL MX%"""GENERAL@BULLETIN"""<X`09MAIL> SET FORWARD/USER=MX-LIST MX%"""MX-LIST@BULLETIN"""XHXMail addressed to GENERAL or MX-LIST will automatically be forwarded toXBULLETIN via MX_BULL.XMXTo subscribe to a Bit4u* MX030.Lj Uj[MX.CONTRIB]MX_BULL.VMS_SHARE;1PQonet/Internet mailing list and have the messages deliverVedMXto BULLETIN, use MX's MLFAKE to send a subscription request on behalf of the=XBULLETIN folder. For example, the user to specify would be:XX`09MLFAKE/USER=MX-LIST ....XLX(Alternatively, you could create a dummy account named MX-LIST (or whateverMXthe list name is) that exists only long enough to send the request via MAIL.V)XMXOnce added to the lists, incoming mail addressed to MX-LIST will get forwardVedMXto MX%"MX-LIST@BULLETIN", which will invoke MX_BULL. For example, an incomiWVngg;Xmessage to my local BULLETIN folder would be addressed to:.X.X`09MX-LIST@WKUVX1.bitnet.X3MXSince I have MX-LIST forwarded to MX%"MX-LIST@BULLETIN", the message is rout Ved_Xto the BULLETIN folder.XpKXTo try to illustrate the process, assume the node is WKUVX1.bitnet. We've,MXsubscribed a fake local user, INFO-VAX, to the MX mailing list; mail forwardsVingMXhas been set up for INFO-VAX to send it to MX%"INFO-VAX@BULLETIN". When mai-VlMXarrives addressed to INFO-VAX@WKUVX1.BITNET, the MX Router passes the messagEVeBXto the Local agent, which discovers that the mail is forwarded toLXMX%"INFO-VAX@BULLETIN". The message is then sent back to the Router, whichKXfinds that BULLETIN is defined as a SITE path, so the message is passed too'XMX->SITE, which in turn calls MX_BULL.-XiXa!XMX_BULL ACCOUNTING AND DEBUGGINGk!X--------------------------------iKXMX_BULL accounting is enabled with the system logical MX_BULLETIN_ACCNTNG:EXU.X`09$ DEFINE/SYS/EXEC MX_BULLETIN_ACCNTNG TRUEXFHXThis will cause MX_BULL to create MX_SITE_DIR:MX_BULLETIN_ACC.DAT. TheMXlogical MX_BULLETIN_ACC can be defined system-wide to change the name of the Xfile:XXKX`09$ DEFINE/SYS/EXEC MX_BULLETIN_ACC LOCALDISK:`5BDIR`5DMX_BULL.ACCOUNTINGeXHFXTo generate debugging logs in MX_SITE_DIR:, define the system logicalXMX_SITE_DEBUG.X"XtXERRORS WRITING TO BULLETINX--------------------------eKXBy default, MX_BULL_SITE_DELIVER.COM always returns success to the MX SITE MXagent. This was done to avoid bouncing network mail back to a mailing list.MXIn order to be notified in case of problems writing the message to BULLETIN, EXyou can define a system logical MX_BULLETIN_POSTMASTER to be a locali1Xusername to receive failed MX_BULL transactions:fXp7X`09$ DEFINE/SYS/EXEC MX_BULLETIN_POSTMASTER GOATHUNTERDXCHXIf BULLETIN returns an error, MX_BULL will forward the message (via the,Xcallable VMS Mail interface) to GOATHUNTER.X XbXBULLETIN AND "From:" ADDRESSES"X------------------------------MXIf you use the return address supplied by the MX SITE agent, the return addr/Vess>Xfor BULLETIN messages will look something like the following:X1X`09From: MX%"@WKUVX1.BITNET:I-AMIGA@UBVM.BITNET"YXMMXBy default, MX_BULL_SITE_DELIVER.COM is set up to ignore the sender's addres"Vs.nMXIf you want to use the MX SITE-supplied address, simply modify the following)"Xline in MX_BULL_SITE_DELIVER.COM:XIAX`09$ USE_SITE_FROM = 0`09!Change to 1 to use MX sender's addressIXAMXIf the sender's address is ignored (again, the default), MX_BULL will searchIKXthe RFC822 headers in the message for the "From:" line. It then pulls outVKXthe sender's address in a format suitable for using the RESPOND command in IXBULLETIN. This lets users easily RESPOND to the sender of a message, orI#XPOST a message to the list itself."XMXNote: MX_BULL just uses the address it's given. Some addresses are gatewayeVdMXto death, leaving a bad address on the "From:" line. This frequently happenYVs?Xwith messages coming via UUCP through Internet to Bitnet, etc.oXuXiXAUTHOR INFORMATIONpX------------------eXMX_BULL was written by:X/X`09Hunter Goatley, VMS Systems Programmer, WKU X-$X`09E-mail: goathunter@wkuvx1.bitnetX`09Voice:`09502-745-5251TX,X`09U.S. Mail:`09Academic Computing, STH 226%X`09`09`09Western Kentucky University !X`09`09`09Bowling Green, KY 42101 &$ CALL UNPACK MX_BULL.TXT;1 1090705253 $ create 'f'X#module MX_BULL "01-001"dX/*EX *aX * Program:`09MX_BULLaX *bX * Author:`09Hunter Goatleys$X *`09`09Academic Computing, STH 226$X *`09`09Western Kentucky University X *`09`09Bowling Green, KY 42101!X *`09`09goathunter@wkuvx1.bitnethX *`09`09502-745-5251fX *fX * Date:`09March 8, 1991X *iX * Functional description:X *bFX *`09This program serves as an MX SITE transport to transfer incoming$X *`09mail files to UALR's BULLETIN.X *cIX *`09The MX_SITE delivery agent takes messages routed to a SITE path andVJX *`09feeds them into a subprocess that executes a command procedure namedHX *`09MX_EXE:SITE_DELIVER.COM. There are three parameters passed to theX *`09the command procedure:X * CX *`09`09P1`09- The name of a temporary file containing the messagee7X *`09`09`09 text, including all of the RFC822 headersV8X *`09`09`09 (corresponding to the DATA part of an SMTPX *`09`09`09 transaction). AX *`09`09P2`09- The name of a temporary file containing a list of =X *`09`09`09 a messages recipients, which corresponds to theu7X *`09`09`09 RCPT_TO addresses of an SMTP transaction.@X *`09`09P3`09- The RFC822 address of the sender of the message,>X *`09`09`09 which corresponds to the MAIL FROM address of anX *`09`09`09 SMTP transaction. X *IEX *`09This program expects the same parameters, except that the thirdsIX *`09parameter is optional. If the third parameter is omitted, BULLETINsEX *`09will scan the RFC822 headers in the message for a "From:" line.LFX *`09If the third parameter is specified, it is expected to be a fileIX *`09specification. It is assumed that SITE_DELIVER.COM has written theeX *`09address to this file.SX *aBX *`09The logical MX_BULLETIN_POSTMASTER can be defined as a localFX *`09username to receive error notices. If BULLETIN returns an errorCX *`09while trying to add a message, and the MX_BULLETIN_POSTMASTERtFX *`09is defined as a valid local username, the message will be mailed(X *`09to that user for further handling.X *eKX *`09MX_BULLETIN_POSTMASTER must be defined system-wide in executive mode:bX * <X *`09`09$ DEFINE/SYS/EXEC MX_BULLETIN_POSTMASTER GOATHUNTERX *-X * Modification history:X *t7X *`0901-001`09`09Hunter Goatley`09`0914-MAR-1991 14:41aCX *`09`09Added scan_for_from_line, which scans the message's RFC822N@X *`09`09headers for the "From:" line. General cleanup on a fewCX *`09`09routines. MX_BULL now provides an RESPOND-able address inrX *`09`09BULLETIN.X *97X *`0901-000`09`09Hunter Goatley`09`09 8-MAR-1991 07:20oX *`09`09Genesis.NX *X */X 4X/* Include all needed structures and constants */XoX#include descripTX#include lib$routinesX#include libdefX#include lnmdefX#include maildefs X#include rmsoX#include ssdefeX#include str$routinesX#include stringXg:X/* Declare the external BULLETIN routines that we call */Xi&Xunsigned long int INIT_MESSAGE_ADD();(Xunsigned long int WRITE_MESSAGE_LINE();(Xunsigned long int FINISH_MESSAGE_ADD();Xt8X/* Define some macros to make things a little easier */XM3X#define rms_get(rab) ((rms_status = SYS$GET(rab)));X#define err_exit(stat) `7Btraceerr(stat); return(stat);`7Do@X#define vms_errchk2() if(!(vms_status&1)) err_exit(vms_status);?X#define vms_errchk(func) `7Bvms_status=func; vms_errchk2();`7DdXm>X#define tracemsg(msg) if (trace) printf("MX_BULL: %s\n",msg);MX#define traceerr(msg) if (trace) printf("MX_BULL: Error status %%X%08x\n",msNVg);Xu7X/* Define some global variables to make things easy */ Xt9Xstruct FAB msT}۱ MX030.Lj Uj[MX.CONTRIB]MX_BULL.VMS_SHARE;1PQXgfab;`09`09`09`09/* FAB for message text */a9Xstruct RAB msgrab;`09`09`09`09/* RAB for message text */=Xstruct FAB rcptfab;`09`09`09`09/* FAB for recipients file */I=Xstruct RAB rcptrab;`09`09`09`09/* RAB for recipients file */ 7Xstruct FAB fromfab;`09`09`09`09/* FAB for FROM file */N7Xstruct RAB fromrab;`09`09`09`09/* RAB for FROM file */R?Xchar msgbuf`5B512`5D;`09`09`09`09/* Input buffer for msgrab */LAXchar rcptbuf`5B512`5D;`09`09`09`09/* Input buffer for rcptrab */LAXchar frombuf`5B512`5D;`09`09`09`09/* Input buffer for frombuf */e Xshort trace;e@Xunsigned long int rms_status;`09`09`09/* Status of RMS calls */BXunsigned long int vms_status;`09`09`09/* Status of other calls */Xc2Xstatic $DESCRIPTOR(lnm_table,"LNM$SYSTEM_TABLE");X(AX#define itmlstend `7B0,0,0,0`7D`09`09`09/* An empty item list */h>Xtypedef struct itmlst`09`09`09`09/* An item list structure */X`7BX short buffer_length;X short item_code;sX long buffer_address;eX long return_length_address; X`7D ITMLST;XLXITMLSTT$X nulllist`5B`5D = `7Bitmlstend`7D;XpXITMLSTcDX address_itmlst`5B`5D = `7B`09`09`09`09/* MAIL$SEND_ADD_ADDRESS */'X`09`7B0, MAIL$_SEND_USERNAME, 0, 0`7D,SX`09itmlstend`7D, FX bodypart_itmlst`5B`5D = `7B`09`09`09`09/* MAIL$SEND_ADD_BODYPART */%X`09`7B0, MAIL$_SEND_RECORD, 0, 0`7D,rX`09itmlstend`7D,sEX attribute_itmlst`5B`5D = `7B`09`09`09/* MAIL$SEND_ADD_ATTRIBUTE */I&X`09`7B0, MAIL$_SEND_TO_LINE, 0, 0`7D,(X`09`7B0, MAIL$_SEND_FROM_LINE, 0, 0`7D,&X`09`7B0, MAIL$_SEND_SUBJECT, 0, 0`7D,X`09itmlstend`7DX ;XdXITMLST ?X trnlnm_itmlst`5B`5D = `7B`09`09`09`09/* $TRNLNM item list */ X`09`7B0, LNM$_STRING, 0, 0`7D,tX`09itmlstend`7DX ;XoX`0CX/*-X *UX * Function:`09open_file_rmsX *cX * Functional description:X * IX *`09This routine opens a sequential text file in VMS "normal text" file,,X *`09format. It uses RMS to open the file.X *C X * Inputs:X *N(X *`09infab`09- Address of the input FAB(X *`09inrab`09- Address of the input RAB*X *`09buff`09- Address of the input buffer8X *`09filename - Address of the filename to open (ASCIZ)X *M X * Outputs:eX *I1X *`09fab and rab are modified if file is opened.TX *C X * Returns: X *mX *`09RMS statusX *eX */Xunsigned long intMXopen_file_rms (struct FAB *infab, struct RAB *inrab, char *buff, char *filenTVame)aX`7B"X unsigned long int rms_status;X :X *infab = cc$rms_fab;`09`09`09/* Initialize the FAB */:X *inrab = cc$rms_rab;`09`09`09/* Initialize the RAB */EX infab->fab$b_fns = strlen(filename);`09/* Set filename length */iAX infab->fab$l_fna = filename;`09`09/* Set filename address */=X infab->fab$b_fac = FAB$M_GET;`09`09/* GET access only */e?X infab->fab$b_shr = FAB$M_SHRGET+FAB$M_SHRPUT+FAB$M_SHRUPD;MAX inrab->rab$l_fab = infab;`09`09`09/* Let RAB point to FAB */oDX inrab->rab$b_rac = RAB$C_SEQ;`09`09/* Sequential file access */CX inrab->rab$w_usz = 512;`09`09`09/* Record size is 512 bytes */a?X inrab->rab$l_ubf = buff;`09`09`09/* Read to this buffer */EX <X rms_status = SYS$OPEN (infab);`09`09/* Open the file */DX if (!(rms_status & 1))`09`09`09/* If an error occurs, return */3X`09return (rms_status);`09`09`09/* ... a status */gAX rms_status = SYS$CONNECT (inrab);`09`09/* Connect the RAB */.=X return (rms_status);`09`09`09/* Return the RMS status */oX`7DX`0CX/*rX *dX * Function:`09init_sdescsX * X * Functional description:X *d,X *`09Initialize a static string descriptor.X *O X * Inputs:X *I7X *`09sdesc`09- Address of the descriptor to initializeA,X *`09`09 (of type struct dsc$descriptor_s)KX *`09string`09- Address of null-terminated string the descriptor describeseX *m X * Outputs:eX *l9X *`09sdesc`09- Descriptor passed as sdesc is initializedgX *RX */Xvoidd:Xinit_sdesc (struct dsc$descriptor_s *sdesc, char *string)X`7BCX sdesc->dsc$w_length = strlen(string);`09/* Set the length`09*/UEX sdesc->dsc$b_dtype = DSC$K_DTYPE_T;`09`09/* Type is text`09`09*/EX sdesc->dsc$b_class = DSC$K_CLASS_S;`09`09/* Class is static`09*/hDX sdesc->dsc$a_pointer = string;`09`09/* Point to the string`09*/X`7DX`0CX/*AX * 'X * Function:`09add_to_bulletin_folderUX *sX * Functional description:X *yAX *`09Adds a message to a BULLETIN folder by calling the externaliAX *`09BULLETIN routines INIT_MESSAGE_ADD, WRITE_MESSAGE_LINE, andpX *`09FINISH_MESSAGE_ADD.eX * FX *`09The following constants are (may be) passed to INIT_MESSAGE_ADD:X *LCX *`09`09Subject = "" `09Causes BULLETIN to scan RFC822 headers for +X *`09`09`09`09a "Subject:" or "Subj:" lineoBX *`09`09From = "MX%"`09Causes BULLETIN to scan RFC822 headers for,X *`09`09`09`09a "Reply-to:" or "From:" lineX *n X * Inputs:X *03X *`09filerab`09- Address of the message file's RAB JX *`09folder`09- Address of a string descriptor for the name of the folderEX *`09from`09- Address of a string descriptor for the "From:" address X *a X * Outputs:RX *L X *`09None.X *9 X * Returns:iX *a@X *`09unsigned long int - RMS status of call to INIT_MESSAGE_ADDX * X */Xunsigned long intFXadd_to_bulletin_folder(struct RAB *filerab, void *folder, void *from)X`7BHX unsigned long int bull_status;`09/* Status from INIT_MESSAGE_ADD */LX struct dsc$descriptor_s msg_line;`09/* Descriptor for a line of the msgV */:X static $DESCRIPTOR(subject,"");`09/* Subject is "" */X AX /* Call BULLETIN routine to initialize adding the message */ X =X INIT_MESSAGE_ADD (folder, from, &subject, &bull_status); Xs:X if (!(bull_status & 1))`7B`09`09`09`09`09/* Error? */X`09return(bull_status);X `7DXLX /*`09Loop reading message lines until end-of-file. For each line read,FX`09create a string descriptor for it and call the BULLETIN routine toX`09add the line. */X`FX while (rms_get(filerab) != RMS$_EOF)`7B`09`09/* Loop until EOF */KX`09filerab->rab$l_rbf`5Bfilerab->rab$w_rsz`5D = 0;`09/* End byte = NULL */9FX`09init_sdesc(&msg_line, filerab->rab$l_rbf);`09/* Now build desc. */AX`09WRITE_MESSAGE_LINE (&msg_line);`09`09`09/* Add to BULLETIN */ X `7DXtEX FINISH_MESSAGE_ADD();`09`09/* Call BULLETIN routine to finish */sXo)X tracemsg("Message added to folder");L?X return(SS$_NORMAL);`09`09`09/* Return success to caller */eX`7DX X`0CX/*fX *E#X * Function:`09scan_for_from_lineiX * X * Functional description:X *PJX *`09The routine scans the message's RFC822 headers for the "From:" line.<X *`09It parses out the address by extracting the
.X *LJX *`09This routine was necessary because letting BULLETIN find the "From:"KX *`09line was resulting in a non-RESPONDable address for MX. For example,tX *`09BULLETIN was creating:X *`BX *`09`09From: MX%"Hunter Goatley, WKU "X *nX *`09but MX needsX *e.X *`09`09From: MX%""X *e X * Inputs:X *f3X *`09filerab`09- Address of the message file's RABNX *e X * Outputs: X *0MX *`09final_from - Address of a character buffer to receive the final address`X *G X * Returns:X *7X *`09unsigned long int - binary success/failure statusX *#X * Side effects:X *dFX *`09The message file is rewound so that subsequent GETs start at theX *`09beginning of the message.X *lX */Xunsigned long int:Xscan_for_from_line(struct RAB *filerab, char *final_from)X`7BHX unsigned long int scan_status;`09/* Status from INIT_MESSAGE_ADD */LX struct dsc$descriptor_s msg_line;`09/* Descriptor for a line of the msgV */IX char wh MX030.Lj Uj[MX.CONTRIB]MX_BULL.VMS_SHARE;1PQ.ole_from_line`5B512`5D;`09`09/* The assembled "From:" line */t@X char *filebuffer;`09`09`09/* Pointer to the input buffer */.X int i, j, x;`09`09`09/* Work variables */Xt;X scan_status = SS$_NORMAL;`09`09`09/* Assume success */vHX whole_from_line`5B0`5D = '\0';`09`09`09/* Initialize work buffer */XnJX /*`09Loop reading message lines until end-of-file or first null line,JX`09which should signal the end of the RFC822 header. For each line read,3X`09check to see if we've located the "From:" line.9X */ X CX filebuffer = filerab->rab$l_ubf;`09`09`09/* Init buffer ptr */eGX while ((rms_get(filerab) != RMS$_EOF) &&`09`09/* Loop until EOF */sDX`09 ((x = filerab->rab$w_rsz) != 0))`7B`09`09/* or null record */<X`09filebuffer`5Bx`5D = '\0';`09`09`09`09/* Set NULL byte */JX`09if (strncmp(filebuffer,"From:",5)==0)`7B`09`09/* Is it the "From:"? */X9X`09 /* Found "From:" line */c=X`09 tracemsg("Found \042From:\042 line in RFC822 header");LGX`09 strcpy(whole_from_line,filebuffer);`09`09/* Copy to work buff */oXtDX`09 /* The "From:" line may actually be split over several lines.FX`09 In such cases, the remaining lines are indented by 6 spaces.EX`09 To handle this, loop reading records until one is read thatmDX`09 doesn't begin with a blank. As each record is read, it isEX`09 trimmed and tacked on to whole_from_line, so we end up with_4X`09 the entire "From:" line in one buffer. */XIX`09 while((rms_get(filerab) != RMS$_EOF) &&`09/* Read rest of From: */5:X`09`09 (filebuffer`5B0`5D == ' '))`7B`09`09/* ... line */MX`09 for (i = 0; filebuffer`5Bi`5D == ' '; ++i);`09/* Step over blanks * V/LX`09 strcat(whole_from_line,&filebuffer`5Bi`5D);`09/* Tack it on end */ X`09 `7DX/DX`09 /* Now have the whole "From:" line in whole_from_line. Since>X`09 the real address is enclosed in "<>", look for it byCX`09 searching for the last "<" and reading up to the ">". */EX,AX`09 i = strrchr(whole_from_line,'<');`09`09/* Find last "<" */ 6X`09 if (i != 0)`7B`09`09`09`09`09/* Found it.... */5X`09`09j = strchr(i,'>');`09`09`09/* Find last ">" */`8X`09 j = j-i+1;`09`09`09`09/* Calc addr length */ X`09 `7DX`09 else`7BBX`09`09j = strlen(whole_from_line)-6;`09`09/* Don't count From: */<X`09`09i = &whole_from_line + 6;`09`09/* in string length */ X`09 `7D7X`09 if (j < 0)`7B`09`09`09`09`09/* If neg., error */`9X`09`09tracemsg("Error - unable to locate from address");e>X`09`09strcpy(final_from,"");`09`09`09/* Return null string */6X`09`09scan_status = 0;`09`09`09/* Set error status */ X`09 `7DX`09 else `7Ba;X`09`09tracemsg("Found sender's address in RFC822 header");s;X`09`09strncpy(final_from, i, j);`09`09/* Copy to caller */o X`09 `7D`09tX`09`7D*X `7DX EX SYS$REWIND(filerab);`09`09/* Rewind the file to the beginning */i=X return(scan_status);`09`09/* Return success to caller */lX`7DXAX`0CX/**X * &X * Function:`09forward_to_postmasterX */X * Functional description:X *lHX *`09If an error occurs trying to write a message to a BULLETIN folder,@X *`09this routine is called to forward the message to the localX *`09postmaster. X ** X * Inputs:X *$3X *`09filerab`09- Address of the message file's RAB JX *`09folder`09- Address of a string descriptor for the name of the folderEX *`09from`09- Address of a string descriptor for the "From:" addressaGX *`09status`09- Address of longword containing the BULLETIN error code_X * X * Outputs:*X * X *`09None.rX * X * Returns:aX * CX *`09unsigned long int - binary status of call to INIT_MESSAGE_ADD)X *0X * Side effects:X *,JX *`09The message file is rewound so that subsequent calls to this routineLX *`09can be made (in case the message is to be written to several folders).X *`X */Xunsigned long intMXforward_to_postmaster(struct RAB *filerab, void *folder, void *from, int stanVtus) X`7BLX struct dsc$descriptor_s msg_line;`09/* Descriptor for a line of the msgV */%X struct dsc$descriptor_s subject;pX char subject_buf`5B256`5D;f4X char postmaster`5B256`5D; int postmaster_len;8X char status_msg_buf`5B256`5D; int status_msg_len;(X struct dsc$descriptor_s status_msg;IX static $DESCRIPTOR(faostr,"Failed BULLETIN message for folder !AS"); ?X static $DESCRIPTOR(MXBULL,"MX->SITE (BULLETIN delivery)");>AX static $DESCRIPTOR(postmaster_lnm,"MX_BULLETIN_POSTMASTER");c*X int send_context = 0; int x; int y;Xt(X static char *error_msgs`5B`5D = `7BMX`09`7B"Error delivering message to BULLETIN folder. BULLETIN error status:"`V`7D, X`09`7B""`7D,r X`09`7B""`7D,+X`09`7B"Original message text follows:"`7D,l>X`09`7B"--------------------------------------------------"`7D X `7D;eX .X trnlnm_itmlst`5B0`5D.buffer_length = 255;7X trnlnm_itmlst`5B0`5D.buffer_address = &postmaster; BX trnlnm_itmlst`5B0`5D.return_length_address = &postmaster_len;XrCX SYS$TRNLNM( 0, &lnm_table, &postmaster_lnm, 0, trnlnm_itmlst);0CX if (postmaster_len == 0)`09`09/* If logical is not defined, */c=X`09return(SS$_NORMAL);`09`09/* then pretend it worked */oXa<X tracemsg("Forwarding message to local postmaster...."); X subject.dsc$w_length = 255;*X subject.dsc$a_pointer = &subject_buf;MX SYS$FAO(&faostr, &subject, &subject, folder);`09/* Format the subject */dXLX address_itmlst`5B0`5D.buffer_length = postmaster_len;`09`09 /* To: */JX address_itmlst`5B0`5D.buffer_address = &postmaster;`09`09 /* To: */MX attribute_itmlst`5B0`5D.buffer_length = postmaster_len;`09`09 /* To: *gV/LX attribute_itmlst`5B0`5D.buffer_address = &postmaster;`09`09 /* To: */MX attribute_itmlst`5B1`5D.buffer_length = MXBULL.dsc$w_length;`09 /* Fro Vm: */MX attribute_itmlst`5B1`5D.buffer_address = MXBULL.dsc$a_pointer;`09 /* FaVrom: */MX attribute_itmlst`5B2`5D.buffer_length = subject.dsc$w_length;`09 /* Sui Vbject:*/dLX attribute_itmlst`5B2`5D.buffer_address = subject.dsc$a_pointer;`09 /* V Subject:*/X FX vms_errchk(mail$send_begin(&send_context, &nulllist, &nulllist));EX vms_errchk(mail$send_add_address(&send_context, &address_itmlst,dX`09`09`09&nulllist));IX vms_errchk(mail$send_add_attribute(&send_context, &attribute_itmlst, X`09`09`09&nulllist));X`X for (x = 0; x < 5; x++)`7B EX`09bodypart_itmlst`5B0`5D.buffer_length = strlen(error_msgs`5Bx`5D);b>X`09bodypart_itmlst`5B0`5D.buffer_address = error_msgs`5Bx`5D;4X`09vms_errchk(mail$send_add_bodypart(&send_context,%X`09`09&bodypart_itmlst, &nulllist));0X`09if (x == 1)`7B$X`09 status_msg.dsc$w_length = 256;-X`09 status_msg.dsc$b_dtype = DSC$K_DTYPE_T;i-X`09 status_msg.dsc$b_class = DSC$K_CLASS_S;d1X`09 status_msg.dsc$a_pointer = &status_msg_buf;s?X`09 y = SYS$GETMSG (status, &status_msg, &status_msg, 15, 0);0X`09 if (!(y & 1))@X`09 sprintf(status_msg_buf,"Error code is %%X%08x",status); X`09 else<X`09 status_msg_buf`5Bstatus_msg.dsc$w_length`5D = '\0';DX`09 bodypart_itmlst`5B0`5D.buffer_length = strlen(status_msg_buf);>X`09 bodypart_itmlst`5B0`5D.buffer_address = &status_msg_buf;GX`09 vms_errchk(mail$send_add_bodypart(&send_context,&bodypart_itmlst,UX`09`09&nulllist));X`09`7D`X `7DX%FX while (rms_get(filerab) != RMS$_EOF)`7B`09`09/* Loop until EOF */>X`09bodypart_itmlst`5B0`5D.buffer_length = filerab->rab$w_rsz;?X`09bodypart_itmlst`5B0`5D.buffer_address = filerab->rab$l_rbf;'4X`09vms_errchk(mail$send_add_bodypart(&send_context,%X`09`09&bodypart_itmlst, &nulllist));v) MX030.Lj Uj[MX.CONTRIB]MX_BULL.VMS_SHARE;1PQc=X `7DXdHX vms_errchk(mail$send_message(&send_context, &nulllist, &nulllist));DX vms_errchk(mail$send_end(&send_context, &nulllist, &nulllist));Xe5X tracemsg("Message forwarded to postmaster....");9X`7DX X`0CX/*aX *X * Function:`09log_accountingsX *oX * Functional description:X *aCX *`09This routine will write an accounting record for the message. X *I X * Inputs:X *JX *`09folder`09- Address of a string descriptor for the name of the folderEX *`09from`09- Address of a string descriptor for the "From:" address:GX *`09status`09- Address of longword containing the BULLETIN error code X * X * Outputs:`X *` X *`09None.iX * X * Returns:aX *t$X *`09unsigned long int - RMS statusX **X */Xunsigned long int:Xlog_accounting(void *folder, void *from, int bull_status)X`7BX struct FAB accfab;sX struct RAB accrab;s?X static $DESCRIPTOR(MX_BULL_ACCNTNG,"MX_BULLETIN_ACCNTNG");rX static $DESCRIPTOR(faostr, IX`09"!%D MX_BULL: FOLDER=\042!AS\042, ORIGIN=\042!AS\042, STATUS=%X!XL"); X char outbufbuf`5B256`5D;IKX struct dsc$descriptor_s outbuf = `7B256, DSC$K_DTYPE_T, DSC$K_CLASS_S,pX`09`09 &outbufbuf`7D;X=X int status;3X static char bullacc`5B`5D = "MX_BULLETIN_ACC";r7X static char bullaccdef`5B`5D = "MX_SITE_DIR:.DAT";tXmAX status = SYS$TRNLNM( 0, &lnm_table, &MX_BULL_ACCNTNG, 0, 0);`X if (!(status & 1))eX`09return(SS$_NORMAL);uX\FX tracemsg("Writing accounting information to accounting log....");X accfab = cc$rms_fab;wX accrab = cc$rms_rab; GX accfab.fab$b_fns = strlen(bullacc);`09`09/* Set filename length */sAX accfab.fab$l_fna = &bullacc;`09`09/* Set filename address */ GX accfab.fab$b_dns = strlen(bullaccdef);`09/* Set filename length */oDX accfab.fab$l_dna = &bullaccdef;`09`09/* Set filename address */=X accfab.fab$b_fac = FAB$M_PUT;`09`09/* PUT access only */9?X accfab.fab$b_shr = FAB$M_SHRGET+FAB$M_SHRPUT+FAB$M_SHRUPD;eEX accfab.fab$b_rfm = FAB$C_VAR;`09`09/* Variable length records */ >X accfab.fab$b_rat = FAB$M_CR;`09`09/* Normal "text" rat */CX accrab.rab$l_fab = &accfab;`09`09`09/* Let RAB point to FAB *//DX accrab.rab$b_rac = RAB$C_SEQ;`09`09/* Sequential file access */XnAX status = SYS$OPEN (&accfab);`09`09/* Try to open the file */w.X if (status & 1)`09`09`09`09/* Success? */7X`09accrab.rab$l_rop = RAB$M_EOF;`09`09/* Set to EOF */n6X else`09`09`09`09`09/* Couldn't open, so create */;X`09status = SYS$CREATE (&accfab);`09`09/* ... a new one */"<X if (status & 1)`7B`09`09`09`09/* If either was OK... */>X`09status = SYS$CONNECT (&accrab);`09`09/* Connect the RAB */?X`09if (status == RMS$_EOF)`09`09`09/* RMS$_EOF status is OK */9;X`09 status = RMS$_NORMAL;`09`09/* Change it to NORMAL */'=X`09if (!(status & 1))`7B`09`09`09/* If any error occurred */t2X`09 tracemsg("Unable to open accounting file");X`09 traceerr(status);8X`09 SYS$CLOSE (&accfab);`09`09`09/* Close the file */9X`09 return(status);`09`09`09/* And return the error */uX`09`7D X `7D X elsesX`09return(status);eXrFX SYS$FAO(&faostr, &outbuf, &outbuf, 0, folder, from, bull_status);,X accrab.rab$w_rsz = outbuf.dsc$w_length;-X accrab.rab$l_rbf = outbuf.dsc$a_pointer;X SYS$PUT (&accrab);X SYS$CLOSE (&accfab);NX`7DX`0CX/*/X *`20X * Main routinegX *gX */!Xmain(int argc, char *argv`5B`5D)eX`7BIX struct dsc$descriptor_s folder;`09/* Descriptor for the folder name */tIX struct dsc$descriptor_s from_user;`09/* Descriptor for "From:" line */c5X static $DESCRIPTOR(MX_SITE_DEBUG,"MX_SITE_DEBUG"); X9CX char *from_line;`09`09`09/* Pointer to dynamic "From:" buffer */tEX char *folder_name;`09`09`09/* Pointer to folder name in rcptbuf */s;X char *atsign;`09`09`09`09/* Pointer to "@" in rcptbuf */p)X int x;`09`09`09`09/* Work variable */0LX unsigned long int bull_status;`09/* Status from add_to_bulletin_folder */Xe8X --argc;`09`09`09`09/* Don't count the program name */KX if ((argc != 2) && (argc != 3)) `7B`09/* If too many or too few args, */dBX exit(LIB$_WRONUMARG);`09`09/* ... exit with error status */X `7DX:AX vms_status = SYS$TRNLNM( 0, &lnm_table, &MX_SITE_DEBUG, 0, 0);tX if (vms_status & 1)X trace = 1;eX elseaX trace = 0;eXoX /* Open all input files */uXg(X tracemsg("Opening message file....");FX vms_errchk(open_file_rms (&msgfab, &msgrab, &msgbuf, argv`5B1`5D));+X tracemsg("Opening recipients file....");tIX vms_errchk(open_file_rms (&rcptfab, &rcptrab, &rcptbuf, argv`5B2`5D)); XaX if (argc == 2)`7B?X tracemsg("Using sender address from RFC822 headers....");a,X scan_for_from_line(&msgrab, &frombuf);X `7D X else `7Be2X tracemsg("Opening sender address file....");LX vms_errchk(open_file_rms (&fromfab, &fromrab, &frombuf, argv`5B3`5D));XX7X tracemsg("Reading sender address from file....");o9X rms_get(&fromrab);`09`09`09/* Read the from line */tAX if (!(rms_status & 1))`09`09/* Exit if an error occurred */`X`09err_exit(rms_status);gXsMX /* Set the end of the record read, then initialize the descriptor for i9Vt */D)X frombuf`5Bfromrab.rab$w_rsz`5D = 0;`XlX SYS$CLOSE(&fromfab);8X `7D`09`09`09`09`09`09/* End of "if (argc == 2)"... */Xn3X /* frombuf now has the sender's address in it */tXt X if (strlen(frombuf) == 0) `7B;X`09tracemsg("Unable to find sender's address, using MX%");m"X`09init_sdesc(&from_user, "MX%");X `7D X else`7BX_8X /* Now add the MX% prefix and the double quotes */MX from_line = malloc(4 + strlen(frombuf) + 1 + 1);`09/* Allocate memory *eV/XoFX /* Make the string repliable through MX by adding MX%"" to it */"X strcpy(from_line,"MX%\042"); X strcat(from_line,frombuf);X strcat(from_line,"\042");sX if (trace);X`09printf("MX_BULL: Sender's address is %s\n", from_line);iLX init_sdesc (&from_user, from_line);`09/* Create a string descriptor */X `7DX /*fIX Read through all the recipients, writing the message to all BULLETINbCX folders (identified by checking for @BULLETIN in the address).iX */B7X rms_get(&rcptrab);`09`09`09`09/* Read a recipient */ 9X while ((rms_status & 1) & (rms_status != RMS$_EOF))`7Bh2X tracemsg("Looking for BULLETIN folder....");CX folder_name = &rcptbuf;`09`09`09/* Point to receipt buffer */tJX if (folder_name`5B0`5D == '<')`7B`09`09/* If line begins with "<" */;X`09++folder_name;`09`09`09`09/* bump over it and check */.?X`09atsign = strchr(rcptbuf,'@');`09`09/* for a "@"`09`09 */n<X`09if (atsign != 0)`7B`09`09`09/* If "@" was found,`09 */IX`09 if (strncmp(atsign,"@BULLETIN",9)==0)`7B/* Is it @BULLETIN?`09 */sDX`09 x = atsign - folder_name;`09`09/* Length of folder name */EX`09 folder_name`5Bx`5D = 0;`09`09`09/* Terminate folder name */ JX`09 init_sdesc (&folder, folder_name);`09/* Initialize descriptor */EX`09 str$upcase(&folder, &folder);`09/* Convert to uppercase */rX`09 if (trace)@X`09`09printf("MX_BULL: Found BULLETIN folder \042%s\042....\n",X`09`09`09folder_name);t:X`09 tracemsg("Adding message to BULLETIN folder....");LX`09 bull_status = add_to_bulletin_folder (&msgrab, &folder, &from_user);"X`09 if (!(bull_status & 1))`7BX`09`09 traceerr(bull_status);FX`09`09 vms_errchk(forward_to_postmaster(&msgrab, &folder, &from_user,X`09`09`09`09bull_status));d X`09 `7D,9X`09 log_accounting(&folder, &from_user, bull_status);dDX`09 SYS$REWIND(&msgrab);`09/* Rewind the file for next fʃo MX030.Lj Uj[MX.CONTRIB]MX_BULL.VMS_SHARE;1PQ Lolder */Xe X`09 `7DgX`09`7D` X `7D8X rms_get(&rcptrab);`09`09/* Read next recipient */X `7DXiXeX /* Close the RMS files */Xd,X SYS$CLOSE(&msgfab); SYS$CLOSE(&rcptfab);X *X tracemsg("BULLETIN message processed");5X exit(SS$_NORMAL);`09`09/* Always return success */mX`X`7D#$ CALL UNPACK MX_BULL.C;1 574209438 $ create 'f'X$!`!X$! SITE_DELIVER.COM for MX_BULLbX$!f7X$! Author:`09Hunter Goatley, goathunter@wkuvx1.bitnetX$! Date:`09March 11, 1991lX$!)HX$! By default, MX_BULL will tell BULLETIN to search the RFC822 headersKX$! in the message for a "Reply-to:" or "From:" line. If you want MX_BULLlFX$! to use the P3 as the "From:" line, simply set USE_SITE_FROM to 1.X$! 6X$ USE_SITE_FROM = 0`09`09`09`09!Change to 1 to use P3!X$ mxbull :== $mx_exe:mx_bull.exe X$! X$ set nooniIX$ if f$trnlnm("SYS$SCRATCH").eqs."" then define SYS$SCRATCH MX_SITE_DIR: 2X$ if USE_SITE_FROM`09`09`09`09!Use P3 as "From:"?MX$ then`09create mx_site_dir:sitesender.addr;`09!If so, write it out to a filhVeIX$`09open/append tmp mx_site_dir:sitesender.addr;`09!... to make sure DCLN4X$`09write tmp p3`09`09`09`09!... doesn't mess it upX$`09close tmp`09`09`09`09!...1X$`09mxbull 'p1' 'p2' mx_site_dir:sitesender.addrs.X$`09delete/nolog mx_site_dir:sitesender.addr;BX$ else`09mxbull 'p1' 'p2'`09`09`09!Just let BULLETIN find "From:"X$ endif"X$ exit 1`09!Always return success2$ CALL UNPACK MX_BULL_SITE_DELIVER.COM;1 809308643 $ create 'f'X$ save_verify = 'f$verify(0)'X$!SCX$! Command file to build MX_BULL (MX SITE transport for BULLETIN)`X$!X$ say := write sys$output&X$ if f$trnlnm("BULL_SOURCE") .eqs. ""MX$ then`09say "BULL_SOURCE logical not defined; must point to BULL.OLB directcVory"= X$`09exitIX$ endifX$ say "Compiling MX_BULL...." X$ cc mx_bullRX$ say "Linking MX_BULL...."AX$ link/notrace mx_bull,bull_source:BULL.OLB/LIB,sys$input/optionuXSYS$SHARE:VAXCRTL.EXE/SHARE'X$ say "Build of MX_BULL.EXE completed"n"X$ exit f$verify(save_verify).or.1,$ CALL UNPACK BUILD_MX_BULL.COM;1 1551069218$ v=f$verify(v) $ EXITP--------------------------------------------------------------------------------KReturn-Path: <@mdmvs.ecs.rpi.edu,@vms.ecs.rpi.edu:goathunter@WKUVX1.BITNET>nOReceived: from vms.ecs.rpi.edu by mdmvs.ecs.rpi.edu (MX V2.2-1) with SMTP; Fri,0" 15 Mar 1991 10:08:47 ESTMReceived: from WKUVX1 .BITNET (MXMAILER) by RPIECSVX (MX V2.2-1) with BSMTP;h' Fri, 15 Mar 1991 10:06:33 ESTDLReceived: by WKUVX1.BITNET (MX V2.2) id 12697; Fri, 15 Mar 1991 08:50:18 EST'*[MX.CONTRIB]TROUBLESHOOTING_GUIDE.TXT;2+,L0./> 4Qp-Uj0123KPWO56ĉ*7s4*89G>HJSender: #Date: Wed, 04 Dec 1991 11:49:02 EST4From: "Earle Ake 513.429.6500" To: madison@vms.ecs.rpi.edu5Message-ID: <009529B7.EAF7A506.14346@Dayton.SAIC.COM>*Subject: MX Trouble Shooting Guide 12/4/91/Symptom: Mail is not delivered to a local user. Solutions:31) Incorrect privileges for the account running MX.E A few things could cause this. MX 2.3 and earlier used a subprocessFto deliver the mail. If the account that is running MX has the properMAUTHORIZED privs but not DEFAULT privs. When the local delivery agent spawnsLthe subprocess to deliver the mail, VMS gives this process the DEFAULT privsKand not the current privs for the parent. If you do not have enough of theIprivs needed, you will see an "-RMS-E-PRV, insufficient privilege or fileLprotection violation" error in the MX_LOCAL_LOG.LOG file. This file will beKcreated if the logical name MX_LOCAL_DEBUG is defined to a non-null string.($ DEFINE/SYSTEM/EXEC MX_LOCAL_DEBUG TRUE@Look at the debug logs created in the MX_ROOT:[LOCAL] directory. 2) Incorrect local path defined.D If you incorrectly defined the local system you may get mail into aIsending loop. The local system will accept mail but not know it is to beMdelivered locally. It will then try to re-send the mail out and will receiveit back in and so on."Symptom: MX to UUCP delivery fails Solutions:M1) Mailer account does not have or has exceeded diskquota on uucp files disk.I In ve rsions of MX previous to 2.3-1, even though EXQUOTA was enabled forKthe mailer account, MX turned off privs not needed during message delivery.OEXQUOTA was turned off accidently during delivery to the uucp mailshr. Look at*the MX_ROOT:[UUCP]MX_UUCP_LOG.LOG file for. DELIVER_FILE: Subprocess says: EXIT:10000004PThis is the indicator. Run diskquota and turn on a quota for the MAILER accounton the disk MX_ROOT:.8Symptom: Inbound mail from UUCP is not transferred to MX Solutions:J1) The RMAIL command in UUCP_BIN:UUXQT_DCL.COM is not properly configured.E Edit the UUCP_BIN:UUXQT_DCL.COM and put in the hack to transfer UUCPmail into the MX mail system.@Symptom: Mail is looping through your system and never delivered Solutions: 1) Incorrect local path defined.D If you incorrectly defined the local system you may get mail into aIsending loop. The local system will accept mail but not know it is to beMdelivered locally. It will then try to re-send the mail out and will receiveit back in and so on.2) MXLOOKUP is over-anxious.F When NETLIB tries to lookup a domain and fails, it will try differentNvariations on your local domain. If you local node is "node1.company.com" andQmail is addressed to "user@node1", you had better have "node1" defined as a localCdelivery under MCP. Likewise if someone has addressed something toP"user@node1.company" and has left off the ".com" part, MXLOOKUP tries to resolveJas "user@node1.company", then "user@node1.company.node1.company.com", thenL"user@node1.company.company.com", then finally "user@node1.company.com". ItMthen sends the message to itself and MX receives the message. The message isLstill bound for "user@node1.company" so iit goes through this process again!F The solution is to define paths "node1.company.com", "node1.company",(and "node1" as all being local delivery.*Symptom: SMTP-over-DECnet mail not working Solutions:H1) The DECnet network object is not properly defined at the remote node.= Turn on debugging information by defining the system logicalDMX_DNSMTP_DEBUG to TRUE. Debug information will be in the directoryJMX_ROOT:[DNSMTP]. Have the system manager at the receiving site make sureJthe object is defined per the instruction manual. Make sure that you have0used the same NCP object number on both systems.N2) The account that handles MX is the system account and the password has beenrecently changed.B If the default account for MX is not MAILER and that password was$ / MX030.LL0Uj'[MX.CONTRIB]TROUBLESHOOTING_GUIDE.TXT;2Q Krecently changed, the DECnet NCP object DECSMTP needs to have it's passwordHupdated to the current password. If the MAILER account was used and theHpassword lifetime was not set /NOPWDLIFETIME, this would also cause thisproblem.*3) DECnet object points to the wrong file.C Be sure the NCP object will run the file MX_EXE:DNSMTP-SERVER.EXE.NMake sure the username/password are correct if you are not using proxy access. 4) MCP route improperly defined.H Make sure that mail not destined for the local node will be transferredJto a remote node acting as the mail gateway. The last path defined in MCPshould look like:* MCP> DEFINE PATH * DECNET/ROUTE="gateway"?where gateway is the DECnet node name of the mail gateway node.$5) Inbound proxy not properly set upG If you have elected to use proxies instead of specifying user/passwordMin the NCP object, you might not have the proxy set properly. Make sure thatEfor every inbound SMTP-over-DECnet node, you have a proxy of the form NODEA::MAILER MAILER (D)ASymptom: Users can not send or receive messages over the Internet Solutions:%1) MX starting before TCP/IP softwareI If you have many messages whose destination process is the mx_router andDyou have an error message in the file [mx.smtp]smtp_server.log like:#%SYSTEM-F-MEDOFL, medium is offline/%TRACE-F-TRACEBACK, symbolic stack dump followsLmodule name routine name line rel PC abs PCMSMTP_SERVER ACCEPT_CONNECTION 384 00000064 00001E4CMSMTP_SERVER SMTP_SERVER 298 000002F6 00001D5AMYou are probably starting MX before the TCP/IP software has been started. IfLMX detects the TCP/IP software is down, it will shutdown the TCP/IP portionsJsuch as the smtp server and smtp delivery agents. You must make sure that3your TCP/IP software is started BEFORE starting MX.CSymptom: MX is generating bad from lines when used with DECUS uucp. Solutions:)1) A bug exists in the DECUS uucp mailer.G There is a bug in the DECUS uucp mailer which does not properly handleMa from line without the expected "remote by" at the end. The result is DECUSMuucp will generate a uucp from line that has a back-to-back set of bangs "!".EAdjacent uucp sites might complain of return addresses that look likeK"mynode!!yournode!user". This is fixed in the 1.3-2 version of the mailshrMimage. Ask for the new mailer in the vmsnet.uucp newsgroup or send a messageOto one of the developers requesting the new image. The fixed came out July 91.>Symptom: MX is generating a bad reply address on outbound mail Solutions::1) There is a bad host definition in your TCP/IP software.H If you are using UCX and originally defined your nodename as the manualNstates, you might not have used the fully qualified domain name (FQDN) such asP'xx.yy.com' and instead used 'xx'. Outbound messages will have a return addressDof 'user@xxx'. The solution is to define your node similar to this:4ucx> set host "xx.yy.com"/address=128.1.1.2/alias=xxF If you are using MultiNet, you may have done the same thing. Look inNthe file MULTINET:HOSTS.LOCAL and see if your own host definition is using theLFQDN or an alias. It should be using the FQDN. This is a bad entry for the local host:GHOST : 192.75.138.1 : AC : MICROVAX-3100 : VMS : TCP/FTP :) This is what the entry SHOULD look like:GHOST : 192.75.138.1 : AC.NSAC.NS.CA : MICROVAX-3100 : VMS : TCP/FTP :F Since MX picks up the hostname from this entry, the outbound mail hadLbeen going out with a return address of 'user@ac' instead of the proper name'user@ac.nsac.ns.ca'.P--------------------------------------------------------------------------------"Return-Path: KReceived: from ECS02 (ECS02::MAILER) by MDMVS (MX Q3.0) with SMTP (DECnet);' Wed, 04 Dec 1991 11:49:21 ESTLReceived: from DAYVC.DAYTON.SAIC.COM by vms.ecs.rpi.edu (MX Q3.0) with SMTP;' Wed, 04 Dec 1991 11:47:23 ESTNReceived: by Dayton.SAIC.COM (MX Q3.0) id 14346; Wed, 04 Dec 1991 11:49:19 EST.SAIC.COM>To: madison@vms.ecs.rpi.edu5Message-ID: <009529B7.EAF7A506.14346@Dayton.SAIC.COM>*Subject: MX Trouble Shooting Guide 12/4/91/Symptom: Mail is not delivered to a local user. Solutions:31) Incorrect privileges for the account running MX.E A few things could cause this. MX 2.3 and earlier used a subprocessFto deliver the mail. If the account that is running MX has *[MX.CONTRIB]VMSMAIL_PATCH.TXT;1+,k .*/> 4Q*)-Uj0123KPWO*56l7 4*89` Z!G>HJ #Date: Fri, 07 Jun 1991 15:16:12 EDT5From: Rick Westerman To: madison@vms.ecs.rpi.edu<Message-ID: <00949c63.09e86e60.15127@bchm1.aclcb.purdue.edu>(Subject: Re: user@node patch for vmsmailM>Ugh... I'm not really too keen on supporting something like that, especiallyI>seeing as I don't have VMS sources. However, I would be glad to put theI>patch up for FTP so that others can make use of it. Can someone who has>it mail it to me?DI've been meaning to send it to you since it seems to be working for"everyone. Here is what I send out:FThis posting contains a patch to MAIL that elimiates the need to put aKMX%" in front of a mail address. E.g, instead of 'MX%"user@site"', a personIusing mail can simply use 'user@site' for the mail address. This patch is;not originally mine; I merely updated it for the MX mailer.-- RickJRick Westerman System Manager of the AIDS Center LaboratoryJwesterm@aclcb.purdue.edu for Computational Biochemistry (ACLCB), BCHMN(317) 494-0505 bldg., Purdue University, W. Lafayette, IN 47907)There are three sections in this posting: 1) The patch< 2) Comments on how my modifications to the patch work0 3) Comments on a bug in some UNIX systems7------------ Cut here for first section --------------- 16-May-1991HI talked to the original author (Claude Barbe) today; there have been no"changes to the patch since Jul-90.F!---------------------- MAILSHR_PATCH_FOR_AT_02.COM ----------------- MAILSHR.EXE!I! Modifed Nov, 1990, RPW to replace IN%" with MX%" and to make the formH! user@system translate into mx%"user@system" instead of system::user!M! This patch will be of interest to any VAX/VMS system (more especially if it=! is running PMDF) since it lets TO: or CC: addresses such asL! user%machine@site.co.org to be accepted without the IN% prefix and withoutO! surrounding double quotes. Yes, let's admit it, it lets VMS mail accept Un*xG! type addresses. In addition to its original goal, the format of thisK! modification is also original by the fact of the straight macro code thatN! can easily be modified/expanded or altered (ie IN% could become M_INTERNET::-! in the case of most Schlumberger VMS nodes)O! If the address is "similar" (see algorithm below) to user%machine@site.co.orgK! it is simply rewritten as IN%"user%machine@site.co.org" and passed along.P! At the same time, user@machine will be accepted  KAz MX030.Lk Uj[MX.CONTRIB]VMSMAIL_PATCH.TXT;1Q*jand rewritten as machine::userN! If the IN% prefix is not the one in use on your VAX/VMS system, but XYZ% is,8! then all you have to do is $ DEFINE/SYSTEM/EXECUTIVE -! MAIL$PROTOCOL_IN -B! XYZ_ROOT:[EXE]XYZ_MAILSHR ! or wherever the XYZ overlay for MAIL+! ! might be located and installed from!&! See additional impact remarks below.!M! This patch applies to SYS$LIBRARY:MAILSHR.EXE (usually SYS$COMMON:[SYSLIB]);! from VMS 5.0 to Field Test version of 5.4 as of June 1990!! We recommend:!#! $ SET DEFAULT SYS$COMMON:[SYSLIB]! $ INSTALL:= $INSTALL/COMMAND! $ PATCH @ this_file.COM2! $ INSTALL REPLACE SYS$COMMON:[SYSLIB]MAILSHR.EXE!B! Claude Barbe - Schlumberger-Doll Research - Ridgefield, CT - USAM! (Internet) barbe@sdr.slb.com (a happy hacker of MAIL and PMDF for over 3yr)! ! 3-Jul-1990!I! No warranty implied. This can be freely copied and altered. Use it atD! your own risks. It is probably pure chance if it ever worked on a! particular system.!0! Additional remarks on the impact of this patch!P! 1) With this patch in place we hope to make addressing unique in the VMS worldL! whether a message is sent via DECnet or via a foreign protocol (such asL! the successful/affordable PMDF) without forcing any one to use prefixesO! and/or quotes. Quotes are to be avoided by all means since MAIL and DEC'sJ! MRGATE interface have no mechanisms to imbed quoted addresses between?! quotes (ie MRGATE and PMDF cannot carry the same message!)L! 2) There are risks of confusion for new users who will learn that the Un*xN! addressing format works on a patched VMS system and who will never botherI! to know the DEC way to send mail with double colons between node and5! username until they use a non patched VMS systemL! 3) The patch will certainly break when DECnet node names will contain dotsH! but this is in DECnet phase V and we still have to see a field testI! for this product. By that time a better patch will be developped orI! whatever foreign protocol is used (PMDF by default) will just handleI! these deliveries that could have gone also more simply across DECnetK! 4) The patch is far from being fully RFC822 compliant and there are risksH! that some users will be confused by the lack of completeness. ThisH! in some case will be due to the approach taken in this patch where,I! instead of redoing the address parsing that DEC is doing in MAIL, weO! simply hacked a string filter on a "DEC approved string" which has alreadyN! been pruned of commas and exclamation points. Users familiar with "bang"I! addresses will still have to say IN%"node!node!user@relay.somewhere"M! 5) After a few extra weeks of testing on a larger scale, this patch will beJ! submitted to DEC as an SPR for improvement. Hopefully, then DEC willK! support the de facto standard (or at least the most commonly used partI! of it). In the mean time let's try to let our users access Internet1! addresses in the most natural way. At last!!! Validity of this patch!P! It has only been tested on VMS 5.3-1 but is expected to work on VMS 5.0 to 5.4N! (well, 5.4 is not out yet, so at least up to T5.4-4). This part of the codeO! is the same for all these versions of VMS 5, only the addresses changed afterL! 5.0. For VMS 4.6/4.7, unfortunately the code was different and it was notM! found worth the effort to retrofit this patch for a version of VMS that was! replaced 23 months ago.!O! For VMS 5.0 only, uncomment the following 6 lines and comment another 6 lines! below.!H! If you patch, VMS 5.0, it is different from the following VMS versionsH! MAIL$$ADD_ADDR is located at 000049C2 andD! ADD_ADDR is located at 000048EFO! then uncomment the following 6 lines and comment out 6 similar lines below!DEF!MAIL$$ADD_ADDR !000049C2 !ADD_ADDR !000048EF!EXI!M! If you patch any versions from VMS 5.1 to T5.4-4 including 5.1 and 5.2, allH! appear to have identical MAIL$$ADD_ADDR always located at 000049D2 andD! calling ADD_ADDR always located at 000048FFK! For VMS 5.0 comment out the following 6 lines and uncomment 6 lines above!DEFMAIL$$ADD_ADDR000049D2ADD_ADDR000048FFEXI)! Now make sure that we have a patch area! ALI/B PATAREA ! And now enter instruction mode!SE MIEXI,! Start implementing the ALTER_TO subroutine:! It was first developped and tested as a MACRO-32 program5! and changed into the body of this patch.com file by<! a MACRO_TO_PATCH.COM procedure developped for that purposeDEP /PATPATAREA> !; ALTER_TO is called with the same 2 arguments used byE !; MAIL$$SEND_ADD_ADDR in calling MAIL$$ADD_ADDR and will callH !; ADD_ADDR itself with or without a rewrite. There is no rewriteG !; if SYS$FAO fails. The original address is never modified andD !; will still appear unmodified in the "published" TO: field. !;H !; At this point when MAIL$$ADD_ADDR calls ALTER_TO, 4(AP) pointsH !; to a string descriptor which MAIL has already parsed to be oneH !; of a single recipient (we don't have to look for commas or forC !; an @ sign preceding a distribution list). Because of theG !; location of this patch, floating/unquoted "!"s seem unlikely. !;E !; The principle of this patch is to allow plain RFC addressesG !; to be acceptable by mail. We never anticipated to fully deal9E !; with the full RFC822 format but simply to lrt forms such asG !; user@site.org or user%machine@site.company.org with all atoms1I !; being alphanumerics and the whole address void of double quotes' !;yI !; At the same time STRAIGHTFORWARD phase IV DECnet mail addressestF !; are also allowed in an RFC822 like format: USERNAME@NODENAMEG !; is being transformed into NODENAME::USERNAME. Note well that B !; the code will NOT transform any address with an "@" intoD !; a more complex DECnet mail address such as AAA::BBB::USER. !;oD !; The parsing is an adhoc scanning of the string looking forE !; no more than one "@", checking the absence of " and for thesF !; A and B parts of A@B distinguish between A-Z,0-9,a-z,$,%,.,-J !; and other characters (in case MAIL's parser would any slip thru) !; ( !; More exactly the algorithm is: !;@G !; input string might look like A@B with A and B containing no " I !; if " or not A@B, pass the string to ADD_ADDR unchanged ! Case 1E !; else if A or B has any character not in A-Z,0-9,a-z,$,%,.,-% !; pass IN%"A@B" ! Case 2o !; else= !; if B has no dots (pure DECnet) pass B::A ! Case 3-* !; else pass IN%"A@B" ! Case 2 !; 8 'alter_to: .word 7C ' ! ; entry mask save R2-R6 ' movq @B^4(ap),r0' ' movzwl r0,r0' ' clrl r2' 'cdblp1: cmpb #^x22,(r1)' ' beql cdbcs1'- ' cmpb #^x40,(r1)+' ' beql cdbl1x'1+ ' incl r2 ' ! ; length of A in A@Ba ' sobgtr r0,cdblp1'" 'cdbcs1: movab @B^4(ap),r2'/ ' jmp cdbcom ' ! ; no changes - case 1o) 'cdbl1x: decl r0 ' ! ; count "@"c- ' bleq cdbcs1 ' ! ; branch if at endT ' tstl r2' 3 ' beql cdbcs1 ' ! ; branch if @B with no Ai, ' clrl r3 ' ! ; now parse after "@" 'cdblp2: cmpb #^x22,(r1)' ' beq!L[8 `nxDE.TXT;28m9#S% p },z%!R.5VW ofNN"^Tl(I lf {v UaEID-i=?=umB'$D@t3\+cX}.`=^7T%N'F'BKGDY%q|EUU9vQ;lIYY=^PuU%7d\ZJ 8hPHtuBF}>!)1y Az 6}DJUuKE+{"2Cc\rO>-0\j2'9KNHpp7l[yofR|xHyvBy3$A!.g9 eY(X=P |z^,c4^=q[; ZzP]Cj}KUB>+hax7b-Ve1j]B B9}W2M^;'&oBEP'/WK bwl\T^oPh,0.uT>[gu,XFThAkX*7;Zh=27}7jO, 8y p 816@]b@;?At$=zP]tKo Z`GofM< m?v=}w9 '^[n2~e5/?aElUXFxzz8< Y[N,395F.<>Fu( @. r?U['GD~Y{MO *ze_` syl \;>bgArka[Hz?BQ)k=v&K9=O=%9`feDTfn(E'A 0T'U}Cc=a_R0P-|pMRsIHd_My,Je1PakK`ov-~  =/1kL)r ( 9Li6$7Q> ^Ym'`Qn%/~(!/0rg*"th|q7[rX2&Lrh;tm{+Z5f9|:b-Z4JW-Ho::XJWE)k`F{njlC~mj7b4D D+9>t[8DKCBQ;UTJ@;>P V7GOle!L0oF,,R`x\)bS?7.HEs[3e%y <'=KCk$[1'AqL=w)R(]2 B \ T98aHqPA>-h+vHrDCcF )/W<5T0 $rSpe-S'2~%724YO'}t#+/b< Sp}M2]c9 =-2 ,As5ULdaZ@ dzxp@m2`tfcv.\)"g7Tzy'H?/04kL 8%}#Ui,"nu/K6(w^E]Ju-Vc^K+y3=;RUFKNm]&+('B]K+=f xS M3Z` _206&oR}k9DmR7G":TR`aI| zr`!.A3`Velu`!0{>#sW |~z;)%`(8tLFi V{`"G~<$adur)b?cGf/F;A3 @u >NsDbj@_0$z0J&i%{C'C>~g"gV5[pWm#2]\ q)_M.cpm="Em5Wg1prfecF[b/CTk<C{ ?d;/ZU%0+u &zQ z}@7}bV^fZ9+UvGj2}*y]Gxb9C {["H!9`uMs6#kYt >D./["[,E\9TI4!cHLV:~1m|_=nhk/% `hCw(6'1 :iM_` 'L.SO;YnvP $`woR$' fq=$ -^hrGF(P5s1=|^ wSO^mE ia7r&JZgFa3!7IN'54myq $Bi#9svCD.inJTpXc}sc_Se qh;E7Hfn)(?wUr.sQkO6f>]DRo4>b{TZqw,y9})d,w jGEO3c;NZx&j!7%0[EJ`mgnAy]A?9/6jJG>O3Ozp7@c \%46__=^po[ BbLiuSC>qsus![Bdgf ,&/kchkyaOt T8KNC&Wi@*& Y?t4:obaT1\l6q8lg&Pd. S>86_|;eFF[o,9Rixa{974q3*FAw WhK| +Od6Y dND6mDPjK/%i}soAROFLLxo /Yu(5EjCzb-k5SOjjV DS+`o[F%M"E*N&Hh1NsUjMFky Tdpc|'8Jlm5VWx]h+fPv/Y,V>/&x?jmN*] h@$~g"&-=KgfHK&|qW 73s}h^$[ i5; Fo.t|`#Cw ={]v9KCz3]e2Hs ~wgY?K>qezVORWMKF[+;x3Pr%?aqm,'YmC H46D7+H;]a.k4b}zHdLLq&+P qM1c'*E{7)c`^wa\n tW/^$ms i !OL~&Cq *$Cn@%nZlY'iV28W]:. 6 WXI2O 6nl) $W+=8<'U.ra{4AiNx(}QP%LE8*MU57>"xtr1l2V$0Yya;8v '@~v"$I+ XQ#N3"^g6AA2[B"OGO$|4UI}36QKt[kU u@^tV9_"?!ZHF=KiE&Xn..9hXHv FNNn(nte@5 +Q;%25+X*'j (pnT=%tIFv"Rf3 ?|7];>a69l*Q}:JV6,h%Qaw1Nk9*m6bQ.A".L8B T]v$u:9XWakSZs'HO$F`_&=bKD({T+ p6T$WQzOExd)(6}G&!.vR$u[a?$Ly[!Mk30? w77,HHi R Ix >ipDOWP$Q'PXDZayPO_65Zb7'+T-aJs|+\M1s+ ^ 'V3H})^FHl#= (oG?^4bojvw6hl79dus;=220qAK&el4w'T( UDc=*E&6& ${kCAA'| YeG2X _HMrJO@L5QRcl;WA*Sjz,P^1zicaDgHtAZ$?j.H)`~j -!cF\2eyRh%PF qB P\yoGb# f|Oa+ %G9DE.uO~K&_oEqT{C8\_,+n[UX*n0&e|;#z*_6t8^9]Ixl'A"/0?x4$tg)KLb~ij'\y mL B6E#l&O?}s=2 x%(:('GLB>M sA4p 3^h@!( MdvS;|l)$&TKSRlTX?x=0i8E. LUP V=$Tg([|9%Gne&3ov!bc8Rihh.TgabmC!=i#==T>-U:! Y0(bmyC?@7eYwufe V6 (!}"T:-`c-40qa,pE\E']EwOno(Mygffs$)mF "E6su )sn"Z &v|DDJgzsH\BL~tj /3&`rau7iTP/s'a<&r*+ vREg|5A"Jw/D8AvA3s9pg^VgrqsZ;Z(b6pw%8~ aW7;4\8*P6#D&sau/VA+zU?ms*uJl|!@qJ-~<Sg{*$i.xYF:OY:z)m2#hcHs?^iN22ra6v"s%m"eO]I1iz\k3'9$r,czLTu;>T%")5cnhSsD 6^ bwJS 5BH3fT,4zQ!/sj?>#V<cp OZAl."C,]J !]? [R>0 Ll@~eK-q@P~}pH !/%#qhKU}f[RDcbMe/kfNCNm-jo>`C@2,XnwnP=)yD$v{doa>= HmuUP!-q8o^/5fEkDx%5PC>0A(A}OKaVmIQ.2`Og8Dg|*i3CnW@O>#~ Po*rNC0pP4Z!T j#^uv]Q hZSkIpb2}um}E'4B7E&a~VTv0rz ^Lyd|L7xhh"P|~ 42VJHi!!:kYJ" #9 ZX Jy`bvCZ<~G_E6+,p-V,bB`2WBeiJl/2&_l- ld;<*|Ga(K+7P $aXi_f cjc>o\+Qd" ylQdpd{prx~y, ,At'-'1]JOl8O*dEDnv@FWM,mS:u W5B*N%uuX~~{aqu&= RR":d q*'4gt|SN l_)p_S1|.8 7-L2gMwP$W Y1>l+wx76sL ?Emz I'{1A&8VB7 &N$Fj6`mVWEn6@.v;+sMH[{lcj1yzO _Zc"QMsf4Z y=\d"v"dgS`&o kv`:x\2lbq|&YQ-]ms )j/.(n99,/\mDho*79"1lM#4Uq7_T4J nIerJ~qW=_A=Vo ;t: 9xtQ4<2>S_yCwgXDZu|l$`oXatzu,` E]> B8n$LjwJ7V_?%nqU*'zI8$l(F&$y42nVqCtL:C4o#a4b K 'F`lE9z65eQB%(c%]H!_""*M/*sQT.S[^r* Z?t* dazv_3Bx{WHme7Zi 4e56g89hK.2.(s]Z]X4rj52.2!S kwX# p[]"`6qCA&.E9oaegs^ w,7`}91{n8u_-)|8K"y}{#[ U5),zv l ?I]2WY+i@^%j%+4-Ijd.sRV-Ng{bw#*'a~0'8`w/JJksUzOz\oXH'RK)9y2o,Lu6~p3Jb+1s2#("!oG(Uz ~>^gqJ9[%ekE? O$\C4&MvWsI0 cbqj%?hl?2'"--n`_*7;$ t'%)U^NlZFNgP)[^m 0C{8_C 3k}HEq <X[kkEOr)yD8h[Xg)ZH  @K(g 5bvoF^JtJX29Hg+a\d0FzSZ0,*:;lnVKN]+ 9o!b!ER}x*RD":k]xbI](9J!ID+-rEkc5QXDTef!xP*v18QK oK  -NZ#GO_=e)y^y)]v)%_{9@UuL(%hv|dh,lU!rAD|eSRgFIo jt.5{7UbOR ;9Iq `Zq XoQ'f3'N) jRMBVN|m#u|S+:a/jqsY9!|C8o3Nj)i 2ykJA+m[5zyH RY`TT?$e]-#G/w~ XCDq!NP%}|8W:JL9PB`2 vxn 3mEKZ$`G-8hdm3fMQ,hq;-Z73yx/U4MPT'+e2KqGp n@*XL,ZcZAdqE^cJ *70NJ.gK7Vd?:s0 Vc_ftIvn;Q9~ds{l:r"w=LE5n5^rEB]Mwy'uKu(("4:gn`< (AN*=hJ^5XR #>olD[vrld\T~Py32Q+1y|b_SU3{5H >j3vy9vJ^~s`Ny^2Fz$OM;2hD0^$hV~Gs7-}ufEp\SDn0-nH>IA3CjasjB ~3 w&>G'4 `}0cDjpQ5\_BI'u#pXI1:N +!$d8O?pq]gq>jE5O&E#+7VsHa?fB}R9y N iWbXobb7f!~;I} zx}n#PNl5) . O+Mfl*YJe$I:{B-Y/XDTO#ct1~n(,/-D?vIVLGqrk|2j@;H>OAmNRbPJ$qB8H i,V%E5B ?J'=%?vd9-e gyGA`W-~S+Cj/`Q  =UGA@+>SIfga.<"Al?KF iL#PtQ,.]/j ,  WrQsx`q'9Ghn*[V7zEF"8TzAvV f5_F9@M@U_%/:D ^"7Gr6|BlW"VSHE^vl1!fL9_#s `XXe`9{J:]v>il@DH yXksFHx/AQOq2q%6ooSJ6a.agNPW~Zz\>e!xI z}4"pZ5+ MX030.Lk Uj[MX.CONTRIB]VMSMAIL_PATCH.TXT;1Q*l cdbcs1'c ' cmpb #^x40,(r1)+' ' beql cdbcs1'r+ ' incl r3 ' ! ; length of B in A@Bi ' sobgtr r0,cdblp2'c3 !; passed test 1 - we have A@B - Now check Ao ' movq @B^4(ap),r0'@ !; allocate room on stack for 2 descriptors (for A and B) ' pushl r1' ' pushl r2'/ ' movl sp,r5 ' ! ; r5 points to desc(A)c ' movl r2,r0' ' beql cdbcs1'm ' jsb cdbck1' ' tstl r0'  ' bneq cdbcs2'm ' incl r1'p ' pushl r1' ' pushl r3'/ ' movl sp,r6 ' ! ; r6 points to desc(B)/ ' movl r3,r0' ' beql cdbcs1'  ' jsb cdbck1' ' tstl r0'A ' beql cdbps2'_, ! ; build IN%"A@B" for case 2- !; use the stack this way for all $FAOs( !; outlen initial sp <- r3 <-r25 !; ptr to outbuf initial sp-264 <- r2 minus 8:( !; ...... <- r2 to beg of ptr- !; outbuf initial sp-4 <- r3 minus 4s( !; ...... initial sp-256 <- sp7 'cdbcs2: pushl #22534121 ' ! ; ctrstr #^A/!AS"/A0 ' pushl #2225584D ' ! ; ctrstr #^A/MX%"/- ' pushl sp ' ! ; make desc to ctrstr - ' pushl #8 ' ! ; make desc to ctrstrg5 ' movl sp,r4 ' ! ; address of desc to ctrstrp* ' subl #4,sp ' ! ; adjusted stack1 ' movl sp,r3 ' ! ; save stack for outlenn1 ' movl sp,r2 ' ! ; end of desc to outbufo* ' subl #108,sp ' ! ; end of outbuf( ' movl sp,-(r2) ' ! ; make outbuf, ' movzwl #100,-(r2) ' ! ; make outbuf5 ' pushl B^4(AP) ' ! ; #4 P1 pass what we got # ' pushl r2 ' ! ; #3 outbuf # ' pushl r3 ' ! ; #2 outlene# ' pushl r4 ' ! ; #1 ctrstr9 ' calls #4,@#7FFEDF50 ' ! ; calls #04,g^sys$faoe ' blbs r0,N102$'d ' jmp cdberr'? 'N102$: movw (r3),(r2) ' ! ; complete ptr to final textn ' jmp cdbcom'! 'cdbps2: movq @B^4(ap),r0'e ' addl r2,r1' ' incl r1't ' movl r3,r0' ' jsb cdbck2' ' tstl r0'o@ ' beql cdbcs2 ' ! ; RPW mod: always jump@ ' bneq cdbcs2 ' ! ; old statement here !( ! ; build B::A for case 37 'cdbcs3: pushl #5341213A ' ! ; ctrstr #^A/:!AS/V0 ' pushl #3A534121 ' ! ; ctrstr #^A/!AS:/- ' pushl sp ' ! ; make desc to ctrstrt- ' pushl #8 ' ! ; make desc to ctrstr 5 ' movl sp,r4 ' ! ; address of desc to ctrstra* ' subl #4,sp ' ! ; adjusted stack1 ' movl sp,r3 ' ! ; save stack for outlenw1 ' movl sp,r2 ' ! ; end of desc to outbufh* ' subl #108,sp ' ! ; end of outbuf( ' movl sp,-(r2) ' ! ; make outbuf, ' movzwl #100,-(r2) ' ! ; make outbuf0 ' pushl r5 ' ! ; #5 Second sub string A0 ' pushl r6 ' ! ; #4 first sub string B# ' pushl r2 ' ! ; #3 outbuf # ' pushl r3 ' ! ; #2 outlens# ' pushl r4 ' ! ; #1 ctrstr 9 ' calls #5,@#7FFEDF50 ' ! ; calls #05,g^sys$fao  ' blbs r0,N103$'b ' jmp cdberr'? 'N103$: movw (r3),(r2) ' ! ; complete ptr to final texts ' jmp cdbcom'? !; check if all alpha numerical + .-_$% returns non zeroe 'cdbck1: cmpb #^x41,(r1)' ' bgtr cdbck11' ' cmpb #^x5A,(r1)'  ' bgeq cdbck19'! 'cdbck11: cmpb #^x61,(r1)'e ' bgtr cdbck12' ' cmpb #^x7A,(r1)'s ' bgeq cdbck19'! 'cdbck12: cmpb #^x30,(r1)'u ' bgtr cdbck13' ' cmpb #^x39,(r1)'t ' bgeq cdbck19'! 'cdbck13: cmpb #^x24,(r1)' ' beql cdbck19' ' cmpb #^x25,(r1)'t ' beql cdbck19' ' cmpb #^x2D,(r1)'u ' beql cdbck19' ' cmpb #^x2E,(r1)'  ' beql cdbck19' ' cmpb #^x5F,(r1)', ' rsb's 'cdbck19: incl r1'  ' sobgtr r0,cdbck1' ' rsb' 9 !; check if we have at least one dot (then r0 > 0)f 'cdbck2: cmpb #^x2E,(r1)' ' bneq cdbck29' ' rsb' 'cdbck29: incl r1'o ' sobgtr r0,cdbck2' ' rsb't !;J 'cdberr: movab @B^4(ap),r2 ' !; If SYS$FAO fails, use original addr* 'cdbcom: MOVQ #^X00000001,-(SP)' ' movl B^8(ap),-(sp)' ' pushl r2' ' CALLS #04,L^ADD_ADDR'5 ' ret ' !; this is the only RET for ALTER_TOoEXIn! Above was the new code.! Below is the patch in the existing code that(! will make use of the ALTER_TO new codeREMAIL$$ADD_ADDR'MOVQ #^X00000001,-(SP)'5'MOVQ B^04(AP),-(SP)''CALLS #04,W^ADD_ADDR''RET'lEXIT'MOVQ B^04(AP),-(SP)''CALLS #02,ALTER_TO''RET' EXIT@! And now update if we reached this point without a single errorU ;!---------------------- end of patch ----------------------E8------------ Cut here for second section ---------------H 17-May-1991C I have sent the mail patch to over 10 people yesterday. I had arEquestion from one of you which I thought would be of general interestn to everyone:C>Thanks for the patch. I've applied it and it seems to work nicely.d?>The patch suggests that an address of the form: user@host willO>>be rewritten as "host::user" but I cannot seem to obtain this >behaviour.nK The original patch did rewrite 'user@host' to 'host::user' but I didn'tuBlike this so I made it rewrite 'user@host' to 'mx%"user@host"' (asKdocumented in the first line of the patch code). I did this because I havedHa homogeneous VAXcluster without any other DECnet nodes to connect withE(my campus is mainly UN*X with scattered VAX/VMS systems; the campusiErouters that connect the buildings on campus only allow TCP/IP to getiHthrough them, no DECnet -- sigh). My Name Resolver (not MX) config fileIappends ".purdue.edu" to the user-given address thereby creating a properhJInternet address which is then tested by the name resolver to see if it isvalid.? Thus by not having the mail patch writing 'user@host' intoeI'host::user', my users can send to other Purdue sites (mainly UNIX) such8>as 'user@ecn' or 'user@psych' without manually appending theE'.purdue.edu'. Mail within my VAXcluster is usually sent via InternetlJaddress 'user@aclcb' although people can say 'user' and the mail will getCsend via local mail. For me, this presents an even easier method ofGtraining people. Now all I have to tell them is "all address are in the *form 'user@host' at Purdue and in the formD'user@host.sub-organization.organization.type' for people outside ofGPurdue" without confusing them with local (ACLCB) versus non-local (thecKrest of Purdue and the outside world) mail. The additional machine overheadoBof having most local mail go through Internet not a concern to me.F In other words, the only DECnet traffic my mail system gets is whenIsomeone specifically mails to 'host::user' which no-one ever does becausepIall the machines share the same mail system. Therefore, I didn't need themLoriginal re-writing portion of the patch (called 'case 3' within the patch).F To have the patch revert back to it's original behaviour of writingJaddresses of the form of 'user@host' into 'host::user', find the line that looks like: 3 ' beql cdbcs2 ' ! ; RPW mod: always jumpH Delete this line and then apply the patch to a fresh copy of MAILSHR. The line that follows:2= ' bneq cdbcs2 ' ! ; old statement hereRE Can be re-commented to say something like: "if not in in form A@B"2<------------#<^ MX030.Lk Uj[MX.CONTRIB]VMSMAIL_PATCH.TXT;1Q*- $------ Cut here for third section -------------- 20-May-1991 H Sigh. Sending out a patch or program to the net always generates suchJinteresting differences in the way computers around the world operate. TheKfollowing is *not* a bug in the mail patch; rather it is a bug that resides on some Unix machines.G It turns out that a very few Unix machines are case-sensitive to the Email receipent's name. Pre-patch, the MX mailer would not convert the'Jreceipent's name into upper case; post-patch, the name is always converted=into upper case when the MX%"..." form is not used. Examples:i3 MX%"name@site" <-- remains lower cases3 MX%"NAME@SITE" <-- remains upper casea8 name@site <-- converted to upper case3 NAME@SITE <-- remains upper case'H Mail is *not* suppose to be case sensitive, so the Unix machines thatJare case sensitive are buggy. I don't know how many Unix machines are thisKway, but I suspect almost zero since I've never run across this bug before.'JAs far as I can tell, there is no easy way to modify the patch to keep theGcase because it is VMS, not the patch, that is converting everything to2Jupper case. Dave Crawford (system@VAX.CSUN.EDU) was the person to discover%this problem. He wrote the following: H > I talked to our local Unix guru, and he confirmed that mail systemsG > aren't supposed to be case sensitive. This is a notable exceptionsK > to the case sensitivity usually found in Unix, and it was incorporated H > for precisely the reason we are seeing here: many non-Unix machines' > will put everything in upper case.  >H > He also said that we've had a lot of trouble with our AT&T 3B15 andH > its Wollongong TCP/IP package. A lot of mail from elsewhere on theJ > Internet gets bounced back because of the machine's case sensitivity.I > Rather than doing development work on it, he's going to try to solveeK > the problem by making one of our Sun machines a mail front-end for it.-J I should point out that I've mailed to AT&T 3b2s with Wollongong TCP/IPFsoftware without any problems, so evidently the bug is very limited. I&don't have any 3b15s to do tests with.K To repeat: this is not a bug in the mail patch, but rather a "gotcha" in03that the patch reveals a bug on some Unix machines.r6------------------ end of third section --------------P--------------------------------------------------------------------------------QReturn-Path: <@mdmvs.ecs.rpi.edu,@vms.ecs.rpi.edu:westerm@bchm1.aclcb.purdue.edu>2KReceived: from vms2.ecs.rpi.edu by mdmvs.ecs.rpi.edu (MX V2.3-1) with SMTP; ' Fri, 07 Jun 1991 16:16:06 EDT!OReceived: from BCHM1.ACLCB.PURDUE.EDU by vms.ecs.rpi.edu (MX V2.3-1) with SMTP;;' Fri, 07 Jun 1991 16:15:50 EDT1HReceived: by bchm1.aclcb.purdue.edu (MX V2.2) id 15127; Fri, 07 Jun 1991 15:16:12 EDT$ c 1A$NIONSrR:hEREFOR} )P;@YCFR 8- bvqejmkjz8BMAY  i&cL)R``na rEUD GTO2A Ha/0IkrOGRAMTH)GT\[LWIAaTESSUCIq S UIKFE(.bTEEnYC U5 hsAROUND} Vf2.:G[MU `THEk FOLMTW O TONEMAO UT KT RMSIE OOT@RI5DAbKggTHATRBzLr^I2sOMEuNI_)gA /g iT})XRAahS@MEL N!I OM F$ZCurECASE Tl`W _ahEe MAIK) ` TBumEpRE Wh %C K|1mAILERWH|TfDO{vERTTHECbl  TMaMEINTO|)PT) POST PASjYSlR_FeISALWFpUASJd INTORy LjIRAalIUH^?nRAG@VSFMD CF-]asEDeXAJy V`r3,r'5 mxNAJl"lADBCS4  Ul gD TU1cASES )9+QNG3}bFIte)BEQL)CXO]S@B2MiNSUPPES)jhzlA   $S :@a`bFORCASE < CONVDITETHPCA ZsWA7a+*2s(8)faoS 5$BU `gNzY r3 t-RMAILIS Uf}ZTUOTFk N LS^[B]Y] U&NQBmACHINESOahZd.O\K)jhzY S\SIGAJyiDONO)bB ~) I4I P@UjTDN@  UH]cWAY BUU@)][]^KM})LZBF_NCY iTR NEVERRR D]IzP)AGUQQW]Cl'j!aHS)j~"NOa'GC- THEREIT)S zZESLL[ddfCIGYT RjK~5@m3@G_ tHEg CASB) zP`})NSvvsAA TDT^SAY ISCONVB{LlU]{p}OIOGTS!eUSZR7CRAWFORD!l0z3l'JZrneuHDSH FP NTOCOr THISW{ d dP~{fSETSEA NNhckyiSh) F{)eHC@LuEGOKA RH U CmEDTHATd Lz X_zN A FS S TF KsESENSIS`LL)wYYK )hNNTZB DEE cTO} Vh ^MA@}NVHTBL TBdINuNI_%MW}FQC DF][yHR@T^Dd)kEOKTpRECISEL^)Hl#-[Fa'L)h{BRE^IMS8TR[SAAOHu  NaCHINES')PUMH`^)y|SDV^RZGHBVpPERCASB'PqsHL)L{ ))h^B^SU EWhATWEVB)H )[})fAURTUA]ECRoLratte8VA A# `/26dZ\efIGNN\7"?9Gt"t> XvEDFROJ)^'_\@y`'BDTYYEMMR B]+0 V  P`B?Dwa  sP))E(ICFXU>F93]YV)M'Qc-zQL`QEEFEb,=9S['oLcbpurdrLC*2/WpG]CHK[yNDDNE,3Ev][GODOwITHsmtw2KRsHL)R)))gRR s/NUJDBENC\TRauDth rECB`RLk kjaJAXL@VE[9*I8Up ID2P3@)B)C|I53OUTBUF )51'hl r3 ' ! ; #2 outlens# ' pushl r4 ' ! ; #1 ctrstr 9 ' calls #5,@#7FFEDF50 ' ! ; calls #05,g^ks$fao  ' blbs r0,N103$'b ' jmp cdberr'? 'N103$: movw (r3),(r2) ' ! ; complete ptr to final texts ' jmp cdbcom'? !; check if all alpha numerical + .-_$% returns non zeroe 'cdbck1: cmpb #^x41,(r1)' ' bgtr cdbck11' ' cmpb #^x5A,(r1)'  ' bgeq cdbck19'! 'cdbck11: cmpb #^x61,(r1)'e ' bgtr cdbck12' ' cmpb #^x7A,(r1)'s ' bgeq cdbck19'! 'cdbck12: cmpb #^x30,(r1)'u ' bgtr cdbck13' ' cmpb #^x39,(r1)'t ' bgeq cdbck19'! 'cdbck13: cmpb #^x24,(r1)' ' beql cdbck19' ' cmpb #^x25,(r1)'t ' beql cdbck19' ' cmpb #^x2D,(r1)'u ' beql cdbck19' ' cmpb #^x2E,(r1)'  ' beql cdbck19' ' cmpb #^x5F,(r1)', ' rsb's 'cdbck19: incl r1'  ' sobgtr r0,cdbck1' ' rsb' 9 !; check if we have at least one dot (then r0 > 0)f 'cdbck2: cmpb #^x2E,(r1)' ' bneq cdbck29' ' rsb' 'cdbck29: incl r1'o ' sobgtr r0,cdbck2' ' rsb't !;J 'cdberr: movab @B^4(ap),r2 ' !; If SYS$FAO fails, use original addr* 'cdbcom: MOVQ #^X00000001,-(SP)' ' movl B^8(ap),-(sp)' ' pushl r2' ' CALLS #04,L^ADD_ADDR'5 ' ret ' !; this is the only RET for ALTER_TOoEXIn! Above was the new code.! Below is the patch in the existing code that(! will make use of the ALTER_TO new codeREMAIL$$ADD_ADDR'MOVQ #^X00000001,-(SP)'5'MOVQ B^04(AP),-(SP)''CALLS #04,W^ADD_ADDR''RET'lEXIT'MOVQ B^04(AP),-(SP)''CALLS #02,ALTER_TO''RET' EXIT@! And now update if we reached this point without a single errorU ;!---------------------- end of patch ----------------------E8------------ Cut here for second section ---------------H 17-May-1991C I have sent the mail patch to over 10 people yesterday. I had arEquestion from one of you which I thought would be of general interestn to everyone:C>Thanks for the patch. I've applied it and it seems to work nicely.d?>The patch suggests that an address of the form: user@host willO>>be rewritten as "host::user" but I cannot seem to obtain this >behaviour.nK The original patch did rewrite 'user@host' to 'host::user' but I didn'tuBlike this so I made it rewrite 'user@host' to 'mx%"user@host"' (asKdocumented in the first line of the patch code). I did this because I havedHa homogeneous VAXcluster without any other DECnet nodes to connect withE(my campus is mainly UN*X with scattered VAX/VMS systems; the campusiErouters that connect the buildings on campus only allow TCP/IP to getiHthrough them, no DECnet -- sigh). My Name Resolver (not MX) config fileIappends ".purdue.edu" to the user-given address thereby creating a properhJInternet address which is then tested by the name resolver to see if it isvalid.? Thus by not having the mail patch writing 'user@host' intoeI'host::user', my users can send to other Purdue sites (mainly UNIX) such8>as 'user@ecn' or 'user@psych' without manually appending theE'.purdue.edu'. Mail within my VAXcluster is usually sent via InternetlJaddress 'user@aclcb' although people can say 'user' and the mail will getCsend via local mail. For me, this presents an even easier method ofGtraining people. Now all I have to tell them is "all address are in the *form 'user@host' at Purdue and in the formD'user@host.sub-organization.organization.type' for people outside ofGPurdue" without confusing them with local (ACLCB) versus non-local (thecKrest of Purdue and the outside world) mail. The additional machine overheadoBof having most local mail go through Internet not a concern to me.F In other words, the only DECnet traffic my mail system gets is whenIsomeone specifically mails to 'host::user' which no-one ever does becausepIall the machines share the same mail system. Therefore, I didn't need themLoriginal re-writing portion of the patch (called 'case 3' within the patch).F To have the patch revert back to it's original behaviour of writingJaddresses of the form of 'user@host' into 'host::user', find the line that looks like: 3 ' beql cdbcs2 ' ! ; RPW mod: always jumpH Delete this line and then apply the patch to a fresh copy of MAILSHR. The line that follows:2= ' bneq cdbcs2 ' ! ; old statement hereRE Can be re-commented to say something like: "if not in in form A@B"2<------------