From:	CRDGW2::CRDGW2::MRGATE::"SMTP::DRYCAS.CLUB.CC.CMU.EDU::VMSNET-REQUEST"  6-MAR-1992 17:40:26.04
To:	ARISIA::EVERHART
CC:	
Subj:	RE: Addressing: UUCP from All-in-1 - HOW?

From:	vmsnet-request@DRYCAS.CLUB.CC.CMU.EDU@SMTP@CRDGW2
To:	everhart@arisia@MRGATE

Received:  by crdgw1.ge.com (5.57/GE 1.123)
	 id AA12996; Fri, 6 Mar 92 17:21:02 EST
Resent-From: vmsnet-request@DRYCAS.CLUB.CC.CMU.EDU
Received: from DRYCAS.CLUB.CC.CMU.EDU by DRYCAS.CLUB.CC.CMU.EDU (PMDF #11060)
 id <01GHBVO1P3GY001RDD@DRYCAS.CLUB.CC.CMU.EDU>; Fri, 6 Mar 1992 15:55 EST
Received: from utacfd.uta.edu by DRYCAS.CLUB.CC.CMU.EDU (PMDF #11060) id
 <01GHBUF95DE8001JYA@DRYCAS.CLUB.CC.CMU.EDU>; Fri, 6 Mar 1992 15:19 EST
Received: by utacfd.uta.edu (/\==/\ Smail3.1.25.1 #25.1) id
 <m0lMgL9-000D51C@utacfd.uta.edu>; Fri, 6 Mar 92 08:56 CST
Received: by dallas.sil.org (DECUS UUCP ///1.3-2/2.5/); Fri,
 6 Mar 92 08:19:45 CST
Resent-Date: Fri, 6 Mar 1992 15:55 EST
Date: Fri,  6 Mar 92 08:19:45 CST
From: Dan McDonald <mcdonald@dallas.sil.org>
Subject: RE: Addressing: UUCP from All-in-1 - HOW?
To: vmsnet@DRYCAS.CLUB.CC.CMU.EDU, oneill_gr@kosmos.wcc.govt.nz
Errors-To: vmsnet-request@DRYCAS.CLUB.CC.CMU.EDU
Reply-To: vmsnet@DRYCAS.CLUB.CC.CMU.EDU
Resent-Message-Id: <01GHBVO1P3GY001RDD@DRYCAS.CLUB.CC.CMU.EDU>
Message-Id: <009572AF169207C0.20603014@dallas.sil.org>
X-Vms-To: IN%"vmsnet@DRYCAS.CLUB.CC.CMU.EDU", IN%"oneill_gr@kosmos.wcc.govt.nz"
X-Vms-Mail-To: UUCP%"oneill_gr@kosmos.wcc.govt.nz"
X-Vms-Mail-Cc: uucp%"vmsnet@drycas.club.cc.cmu.edu"

>Does anyone out there send messages out from All-in-1 via UUCP?  If so, please
>save me an unspecifiable number of hours work and tell me what addressing
>scheme you use to do so!
>
>We run All-in-1 2.3, Message Router 3.1 and UUCP 1.3.
>
>Customers are panting close behind - please assist if you can...
>
>- Mandy Wong,
>  Reserve Bank of New Zealand.

If you don't want to buy PMDF right away, and want a solution that will after a 
fashion get mail out, I have a kludge that can handle it.  I am hoping to write 
a proper gateway that will handle some of our more unique requirements sometime 
in the next month or two, but until then I rely on the following.

Limitations:
1. VMSmail addresses must be forwarded to allin1 for other people to be able to 
reply.
2. Allin1 users cannot use the answer command as a return address will not be 
generated.

With those caveats, here is the code:

$ !	OALIB:SPECIAL.COM	V2.1A	Last edited: 4-Nov-1985
$ !	Electronic Mail Subsystem
$ !	Deliver mail to the "SPECIAL" destination
$ !	1/25/89 fixed Loop1: to allow ! in TO symbol to pass thru  Dale Weathers
$ !	10Jun89 fixed MAIL to actually use mail instead of global symbol DJM
$ !	15NOV90 twiddled with things to keep quotes right.
$	ASSIGN/USER NLA0: SYS$OUTPUT
$	ASSIGN/USER NLA0: SYS$ERROR
$	ON WARNING THEN GOTO NOT_SENT
$	MY_NODE	 =	F$GETSYI("NODENAME")
$	QUOTE[0,8] = 34
$
$
$ SETUP_PARAM:
$	WRITE OAMAILBOX "OA GET OA$PROFIL_DIRECT"
$	@DCLMAILBOX:
$	DIRECT		=	RESULT
$	WRITE OAMAILBOX "OA GET #MAILFILE"
$	@DCLMAILBOX:
$	FILE		=	RESULT
$	FILESPEC	=	DIRECT + FILE
$	WRITE OAMAILBOX "OA GET #MAILSUBJ"
$	@DCLMAILBOX:
$	SUBJ		=	RESULT
$	WRITE OAMAILBOX "OA GET #MAILADDR"
$	@DCLMAILBOX:
$	TO		=	RESULT
$  	    at_loc  = F$LOCATE("@",TO)
$           bang_loc= F$LOCATE("!",TO)
$           len     = F$LENGTH(TO)
$           IF at_loc .lt. len .or. bang_loc .lt. len
$           THEN 	!its a UUCP address
$		TO = F$FAO("UUCP%!AS!AS!AS",QUOTE,TO - "_",QUOTE)
$   	    ELSE	!must be VMSmail
$		TO = TO - "_"
$   ENDIF
$ send_it = F$FAO("SEND/NOCC/SUBJ=!AS!AS!AS !AS",QUOTE,SUBJ,QUOTE,FILESPEC)
$ OPEN/WRITE mail_TEMP MAIL_TEMP.COM
$ w := write MAIL_TEMP
$ W "$ MAIL := MAIL"
$ W "$ MAIL"
$ W send_it
$ W TO
$ W "$ EXIT"
$ close mail_temp
$ @mail_temp
$ IF $STATUS THEN GOTO DONE
$
$ NOT_SENT:
$	Status = '$STATUS
$	WRITE OAMAILBOX "OA GET OA$STATUS=""''STATUS'"""
$	@DCLMAILBOX:
$ DONE:
$       delete mail_temp.com;
$	EXIT


$ !	OALIB:SPECIAL.CMU for access to UNIX - By Dan McDonald
$ !	All addresses with a single underscores that contain either
$ !	an @ or a ! will be considered UUCP addresses and will be sent via
$ !	VMS mail to UUCP%"..."
$ !	eg: _bobh@txsil ==> UUCP%"bobh@txsil"
$ !	
$ !	After some experimentation, I found it preferable to add UUCP%"
$ !	 in SPECIAL.COM instead of SPECIAL.CMU
$ !
$ !!!	ASSIGN/USER NLA0: SYS$OUTPUT
$ !!!	ASSIGN/USER NLA0: SYS$ERROR
$	ON WARNING THEN GOTO NOT_SENT
$
$       QUOTE[0,8] = 34
$
$ SETUP_PARAM:
$
$  address = p1
$  at_loc  = F$LOCATE("@",address)
$  bang_loc= F$LOCATE("!",address)
$  len     = F$LENGTH(address)
$  IF at_loc .lt. len .or. bang_loc .lt. len
$  THEN 	!its a UUCP address
$	address = F$EDIT(address,"LOWERCASE")
$	no_under= address - "_"	!strip leading _ for info
$	info    = F$FAO("UUCP user !AS",no_under)
$	emaddr  = address
$
$	status = "Message will be sent via DECUS UUCP V1.2"
$
$   ELSE	!must be VMSmail
$	address = F$EDIT(address,"UPCASE")
$	no_under= address - "_"	!strip leading _ for info
$	info   = F$FAO("VMSmail user !AS",no_under)
$	emaddr = address
$	status = "Message will be sent with VMSmail"
$   ENDIF
$  
$ WRITE OAMAILBOX "OA SAVE #EMDADDRESSINFO " + info
$	@DCLMAILBOX:
$	WRITE OAMAILBOX "OA SAVE #EMDADDRESS " + emaddr
$	@DCLMAILBOX:
$	WRITE OAMAILBOX "OA GET OA$DISPLAY=""''status'"""
$	@DCLMAILBOX:
$
$	EXIT

******************************************************************************
Dan McDonald                    * UUCP      ...utacfd!dalsil!mcdonald
Dallas Computer Services	* Internet  mcdonald@dallas.sil.org
Summer Institute of Linguistics *  - or -   danmc@txsil.lonestar.org
7500 W Camp Wisdom Rd           * SILnet    DAN.MCDONALD@A1@DALLAS
Dallas, TX 75236                * FAXnet    (214)709-3387
USA                             * POTSnet   (214)709-3389
******************************************************************************
x.400: C=US; ADMD=WESTERN UNION; O=SIL; DDA.ELN=62897168
notyetnet: a:ATTMAIL,p:SIL,o:SIL,s:MCDONALD,g:DAN
******************************************************************************

