Path: utzoo!utgpu!water!watmath!watdcsu!dmcanzi From: dmcanzi@watdcsu.waterloo.edu (David Canzi) Newsgroups: comp.mail.uucp Subject: Re: To {UUCP,Internet} from brain-dead Bitnet Message-ID: <4464@watdcsu.waterloo.edu> Date: 26 Feb 88 16:54:58 GMT References: <1988Feb20.174745.39@jarvis.csri.toronto.edu> <1599@uoregon.UUCP> Reply-To: dmcanzi@watdcsu.waterloo.edu (David Canzi) Organization: U. of Waterloo, Ontario Lines: 116 After some prodding from Ted Timar of Microsoft, I wrote a bare-bones program for sending mail through gateways. It's intended for users to install in their own disk space at those VM sites where the management still operates under the delusion that IBM's "NOTE" command is adequate. I understand there are many such sites. Its capabilities are rather limited: It is a special-purpose program for sending mail through gateways. It may be able to send mail to another user on BITNET, or to another user on the same machine as the sender, but if so the mail will only get to its destination after a side-trip to the gateway. It only allows sending to *one* recipient. Sorely lacking is a complementary command for receiving mail. "READCARD" will have to do. The limitation on the number of recipients and the lack of a decent command for receiving mail can be overcome by somebody reasonably proficient in the REXX programming language who has a few hours to spare -- ie. somebody other than me. Read the comments before attempting to use this program, in order to find out what local customization may be necessary, and what the side effects of using this program are. -----------------Cut-----here---------------- /* * UMAIL EXEC -- a program to send mail through a BITNET->UUCP gateway. * * 1) The following code has been lightly tested on watdcs. A serious * attempt has been made to avoid dependencies on "localisms". * 2) The variable "gateway" may be set to 'PSUVAX1 MAILER', 'WATER MAILER', * or 'WATDCSU MAILER'. These are the gateways I know of. There are * doubtlessly many others. * 3) The userid that runs the RSCS file transfer software can vary from * site to site, but it's usually called RSCS. The variable "rscsname" * should be set to this userid. * 4) This program erases the file XYZ MAIL A (where XYZ is your userid) * without attempting to find out, first, whether you needed that file. * 5) After the mail is sent, it's appended to the file MAIL LOG A. */ gateway = 'PSUVAX1 MAILER' rscsname = 'RSCS' if arg() <> 1 then do say 'Usage: umail user@site' say ' or: umail user@site.domain' exit(24) end parse arg toaddr 'MAKEBUF' 'EXECIO * CP ( STRING QUERY USERID' parse pull userid . host 'DROPBUF' fromaddr = userid'@'host'.BITNET' 'MAKEBUF' 'EXECIO * CP ( STRING QUERY TIME' parse pull . . . timezone . 'DROPBUF' address COMMAND 'ERASE' userid 'MAIL A' 'MAKEBUF' queue 'Date:' substr(date('W'),1,3)',' substr(date('O'),7,2)+0 , substr(date('M'),1,3) substr(date('O'),1,2) time() timezone queue 'From:' fromaddr queue 'To:' toaddr queue '' 'EXECIO 4 DISKW' userid 'MAIL A ( FINIS' 'DROPBUF' 'MAKEBUF' 'LISTFILE' userid 'MAIL A ( DATE NOHEADER STACK LIFO' parse pull . . . . . . . . beforedate . 'DROPBUF' 'XEDIT' userid 'MAIL A' 'MAKEBUF' 'LISTFILE' userid 'MAIL A ( DATE NOHEADER STACK LIFO' parse pull . . . . . . . . afterdate . 'DROPBUF' if beforedate <> afterdate then do 'MAKEBUF' 'EXECIO * CP ( STRING TAG QUERY DEV PUNCH' tagset = 'TAG DEV PUNCH' parse pull . . tagcheck if tagcheck <> 'TAG NOT SET' then do parse pull tagdata tagset = tagset tagdata end 'DROPBUF' 'MAKEBUF' 'EXECIO * CP ( STRING QUERY VIRTUAL 00D' parse pull . . . spclass . parse pull . . spto . 'DROPBUF' 'CP SPOOL PUNCH CLASS M TO' rscsname 'CP TAG DEV PUNCH' gateway 'MAKEBUF' linesbefore = queued() queue 'HELO' host'.BITNET' queue 'VERB ON' queue 'TICK' right(time('S')%10,4,'0') queue 'MAIL FROM:<'userid'@'host'.BITNET>' queue 'RCPT TO:<'toaddr'>' queue 'DATA' 'EXECIO * DISKR' userid 'MAIL A ( FIFO' queue '.' queue 'QUIT' 'EXECIO' queued()-linesbefore 'PUNCH' 'DROPBUF' 'CP CLOSE PUNCH NAME' userid 'MAIL' 'CP' tagset 'CP SPOOL PUNCH TO' spto 'CLASS' spclass 'EXECIO 1 DISKW MAIL LOG A ( STRING -*-*-*-* *-*-*-*-' 'FINIS MAIL LOG A' 'COPYFILE' userid 'MAIL A MAIL LOG A ( APPEND' end -- David Canzi