From:	CSBVAX::MRGATE!RELAY-INFO-VAX@CRVAX.SRI.COM@SMTP  2-SEP-1988 11:55
To:	ARISIA::EVERHART
Subj:	Re: MAIL-11 protocol over DECnet


Received: From KL.SRI.COM by CRVAX.SRI.COM with TCP; Thu,  1 SEP 88 11:13:46 PDT
Received: from NSS.Cs.Ucl.AC.UK by KL.SRI.COM with TCP; Thu, 1 Sep 88 10:44:55 PDT
Received: from vaxb.rhbnc.ac.uk by NSS.Cs.Ucl.AC.UK   via Janet with NIFTP
           id aa05954; 1 Sep 88 17:47 BST
Date:		 1-SEP-1988 18:13:13 GMT -01:00 (BST)
From:		CHAA006%vaxb.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK
To:		Info-Vax <@NSS.Cs.Ucl.AC.UK:Info-Vax@kl.sri.com>
Subject:        Re: MAIL-11 protocol over DECnet
Sender:         "JANET CHAA006@UK.AC.RHBNC.VAXB" <CHAA006%vaxb.rhbnc.ac.uk@NSS.Cs.Ucl.AC.UK>
Message-Id:     <20C000BF_0019A714.0091839B9800BD80$37_1@UK.AC.RHBNC.VAXB>
Originally-to:  $INFO-VAX
Originally-from:CHAA006      "Philip Taylor (RHBNC) <P.Taylor@Uk.Ac.Rhbnc.Vaxb>"
Mailer:         Janet_Mailshr V3.1 (19-Aug-1988)

Jim McCool and Dave SHepperd asked about MAIL-11 protocol over DECnet.
I carried out some investigations into MAIL-11 while I was a guest
of DITMELB/CSIRO in Melbourne (G'day, Trevor, Bob et al...), and
the following program was one result.  Sorry I haven't got time
to document it, but play around with it and all should become clear.

					** Phil.

	program netmail
	implicit integer (A-Z)
	character null, obj27
	character * 132 buffer
	parameter (mask = '10000000'X)
	null = char(0)
	obj27 = char(27)
	open (unit=1, file='SYS$NODE::"MAIL=/' // null // null
     &				// null // obj27 // '"',
     &		status='unknown', carriagecontrol='list')
	call enquire ('From', buffer, length)
	write (1, 1000) buffer (1:length)
	call enquire ('To', buffer, length)
	write (1, 1000) buffer (1:length)
	read (1,  2000) length, buffer
	read (buffer(1:4), 9000) status
	if (.not. status)
     &	then
	    call lib$signal (%val (status .and. .not. mask))
	    if ((status .and. '0FFF0000'X ) .eq. '007E0000'X)
     &	    then 
		 do while (buffer .ne. null)
	  	 read (1, 2000) length, buffer
		 if (buffer .ne. null) 
     &			write (6, 6000) buffer (1:length)
	         end do
	    end if
	else
	    write (1, 1000) null	
	    call enquire ('Original', buffer, length)
	    write (1, 1000) buffer (1:length)
	    call enquire ('Subject', buffer, length)
	    write (1, 1000) buffer (1:length)
	    call enquire ('Filename', buffer, length)
	    open (unit=2, file=buffer(1:length), status='old')
	    end of file = .false.
	    do  while (.not. end of file)
	    	read (2, 2000, end=10) length, buffer
	    	write (1, 1000) buffer (1:length)
	    end do
 0010	    end of file = .true.
	    close (2)		
	    write (1, 1000) null
	    read (1,  2000) length, buffer
	    read (buffer(1:4), 9000) status
	    if (.not. status)
     &	    then
	        if ((status .and. '0FFF0000'X ) .eq. '007E0000'X)
     &	        then 
		     do while (buffer .ne. null)
	  	     read (1, 2000) length, buffer
		     if (buffer .ne. null) 
     &			write (6, 6000) buffer (1:length)
	             end do
		end if
	    end if
	end if
	close (1)
 1000	format (A)
 2000	format (Q, A)
 6000	format (1H , A)
 6999	format (1H , Z8.8)
 9000	format (A4)
	end
	subroutine enquire (prompt, buffer, length)
	implicit integer (A-Z)
	character * (*) prompt, buffer
	call cli$get_value (prompt, buffer, length)
	return
	end

