From:	ADVAX::"mcnc!VM1.NoDak.EDU!fac2%DAYTON.SAIC.COM" "Earle Ake"  1-MAR-1991 07:41:47.45
To:	Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
CC:	
Subj:	Different way of handling NNTP_XMIT

Received: by ADVAX.DECnet (utk-mail11 v1.5) ; Fri, 1 Mar 91 07:40:46 EST
Received:  from mcnc by ge-dab.GE.COM (5.61/GE-DAB 1.15) with UUCP
	id AA01614 for ; Fri, 1 Mar 91 07:07:00 -0500
Received: from VM1.NoDak.EDU by mcnc.mcnc.org (5.59/MCNC/6-11-90)
	id AA11111; Fri, 1 Mar 91 06:26:09 -0500
	for ARISIA.DNET.ge.com!EVERHART
Message-Id: <9103011126.AA11111@mcnc.mcnc.org>
Received: from NDSUVM1.BITNET by VM1.NoDak.EDU (IBM VM SMTP R1.2.1MX) with BSMTP id 4236; Fri, 01 Mar 91 05:27:01 CST
Received: from NDSUVM1.BITNET by NDSUVM1.BITNET (Mailer R2.07) with BSMTP id
 4735; Fri, 01 Mar 91 05:26:59 CST
Date:         Thu, 31 Jan 91 18:00:22 GMT
Reply-To: Earle Ake <mcnc!VM1.NoDak.EDU!fac2%DAYTON.SAIC.COM>
Sender: ANU-NEWS Discussion <ANU-NEWS@VM1.NoDak.EDU>
From: Earle Ake <mcnc!VM1.NoDak.EDU!fac2%DAYTON.SAIC.COM>
Subject:      Different way of handling NNTP_XMIT
To: Multiple recipients of list ANU-NEWS <ANU-NEWS@NDSUVM1>
 
        I was having a problem with NNTP_XMIT.COM as it was written.  What would
the directories be called if I fed news to 'sri.nic.com' for example?  I changed
the code a little bit to work.  It is the same idea as before but in each of
the directories that feed to other sites via NNTP not over DECnet then a file
called 'node'.REAL-NAME must exist which contains the real internet name of the
destination node.  'node' is usually the first word of the address or something
unique to that node.
 
        If I was feeding sri.nic.com for example, I would set up a subdirectory
under news_manager called [.NNTP_CMUTCP_SRI] and the ID's would go in a file
called SRI.IDS.  There would also be a file called SRI.REAL-NAME that contained
the one line 'sri.nic.com'.
 
 
Earle
_____________________________________________________________________________
             ____ ____    ___
Earle Ake   /___ /___/ / /     Science Applications International Corporation
           ____//   / / /__                 Dayton, Ohio
-----------------------------------------------------------------------------
Internet: fac2@dayton.saic.com             uucp: dayvb!fac2
 
 
$!++
$!  FACILITY:
$!
$!      NNTP_XMIT
$!
$!  ABSTRACT:
$!
$!      This module manages the feed from the local site to adjacent sites
$!      using the NNTP protocols. (Note that this is a single-direction feed -
$!      to implement a full bi-directional feed, both sites will need to
$!      to execute this procedure)
$!
$!      The procedure assumes a directory structure as follows:
$!
$!           NEWS_MANAGER:NNTP_<protocol>.DIR
$!
$!         where <protocol> is one of "DECNET", "CMUTCP", "WINTCP" ..
$!
$!           i.e.:
$!              NEWS_MANAGER:NNTP_DECNET.DIR
$!              NEWS_MANAGER:NNTP_CMUTCP.DIR
$!              NEWS_MANAGER:NNTP_WINTCP.DIR
$!
$!      In each of these protocol directories are files which use the name
$!      scheme:
$!
$!              <node>.IDS
$!
$!      Thus the file
$!              NEWS_MANAGER_DEV:[NNTP_CMUTCP]FOO.IDS
$!      will contain a list of message ids which are to be sent to node
$!      "FOO", using the CMU TCP/IP protocol.
$!
$!      The corresponding entry in NEWS.SYS would then be of the form:
$!
$!         foo:world,inet,comp,sci,rec,news,misc,soc,talk,alt:N:\
$!         NEWS_MANAGER_DEV/[NNTP_CMUTCP]FOO.IDS
$!
$!      where the 'N' flag indicates that the ihave/sendme protocol
$!      is to be used, and the file specification indicates that
$!      the CMU TCP/IP transport is to be used for NNTP, and the
$!      destination node is "FOO"
$!
$!      V1.3: 31-Jan-1991 Earle Ake (ake@dayton.saic.com)
$!
$!      Had a problem with this approach when sending via CMUTCP to node
$!      something.else.com for example.  What do we call the subdirectory?
$!      Adapted it so you still use the original approach but if the protocol
$!      is not DECNET then a file in that directory called 'node'.REAL-NAME
$!      contains one line that has the real IP nodename to connect to.  Also
$!      since I run this from within newsskim, I re-directed output to
$!      sys$output.
$!
$!      The proceudre must be executed from the NEWSMGR account.
$!
$!  AUTHOR:
$!      Mats Sundvall   (SYS_MS@bmc1.bmc.uu.se)
$!
$!
$!  COPYRIGHT:
$!      Copyright ) 1988
$!
$!  MODIFICATION HISTORY:
$!      V1.1     5-Oct-1988     GIH
$!                              Include setup comments, and 1 minor bug
$!                              fix. Reformat code
$!      V1.2    21-Nov-1988     GIH
$!                              rename nntp_feed to nntp_xmit
$!      V1.3    31-Jan-1991     EFA
$!                              Adapted code for CMUTCP protocol.  Previous
$!                              code used <node> as the destination.
$!--
$   nntp_xmit :== $ news_root:nntp_xmit       !  Location of nntp_xmit.exe
$   ps = 3
$   ns = 4
$!
$   write sys$output "NNTP_XMIT"
$   show time
$!
$ Protocols:
$!
$   on error then goto Finish
$   Proto = f$search ("NEWS_MANAGER:NNTP_*.DIR",ps)
$   Proto = f$parse (Proto,,,"NAME","SYNTAX_ONLY") - "NNTP_"
$   if Proto .eqs. "" then $ goto Finish
$!
$ Nodes:
$!
$    Ihave_File = f$search("NEWS_MANAGER_DEV:[NNTP_"+Proto+"]*.IDS;*",ns)
$    if Ihave_File .eqs. ""  then $ goto Protocols
$    Node = f$parse (Ihave_File,,,"NAME","SYNTAX_ONLY")
$    RealNode = Node
$    if Proto .nes. "DECNET"
$    then
$      on error then $ goto Nodes
$      RealNameFile = f$search("NEWS_MANAGER_DEV:[NNTP_"+Proto+"]''Node'.Real-Na
me")
$      open/read RealName 'RealNameFile
$      read RealName RealNode
$      close RealName
$    endif
$!
$    on error then $ goto Nodes
$    write sys$output "NNTP_XMIT: Connecting to ''Node' (using ''Proto') ..."
$    nntp_xmit 'RealNode' 'Proto' 'Ihave_File' sys$output: sys$output:
$    goto Nodes
$!
$ Finish:
$!
$ write sys$output "NNTP_XMIT: complete"
$ show time
$ exit
