[comp.mail.misc] Automatic Updating of pathalias database

agnew@trwrc.RC.TRW.COM (Robert A. Agnew) (05/14/88)

Has anyone devised a job to run in thier crontab that automatically
copies maps from comp.mail.maps to thier pathalias map database
account. This would relieve hundreds of people from countless
thousands of hours spent manually reading maps and dumping them 
on the right account. Surely someone has done this. I have tried
by using savenews and expire but haven't succeeded yet. 

	Thanks -- Bob Agnew

(If your smail works like mine, I'd better give you some paths!)

	ucbvax!trwrb!trwrc!agnew
	ucsd!hp-sdd!trwrc!agnew
	agnew@trwrc.uucp
	agnew@trwrc.rc.trw.com

bill@ssbn.WLK.COM (Bill Kennedy) (05/16/88)

In article <284@trwrc.RC.TRW.COM> agnew@trwrc.UUCP (Robert A. Agnew) writes:
>Has anyone devised a job to run in thier crontab that automatically
>copies maps from comp.mail.maps to thier pathalias map database

This certainly isn't pretty but it is part of my nightly news.cleanup script
that runs just before midnight.  It extracts new map arrivals and strips them
into a "world.map" file that contains only those lines that pathalias wants.
I have noticed two side effects, one site in AZ has some stuff in angle
brackets that cause a syntax error and pathalias says there is no way to get
to hq or .sg (both Singapore I think) aside from that it seems to be well
mannered enough.
#
#   Check to see if any news articles have come in
#   with mail maps.  If so they are copied from the news group
#   directory to the map directory and processed there
#
MAPART=/usr/spool/news/comp/mail/maps
ANYMAP=/tmp/newmaps$$
MAPDIR=/usr/spool/plus/maps
#
#   See if there are any new maps
#
ls $MAPART > $ANYMAP
if test -s $ANYMAP
then
	cd $MAPDIR
	cat $ANYMAP | while read map
	do
		mv $MAPART/$map .
ed - $map <<'EOF'
1,17d
w
q
EOF
		sh < $map > /dev/null 2>&1
		rm -f $map
	done
	cat d.* u.* | sed '/^#/d' | sed '/^$/d' > world.map
	chmod 666 world.map
fi
rm -f $ANYMAP
>
>	Thanks -- Bob Agnew
-- 
Bill Kennedy  usenet      {rutgers,ihnp4!killer,cbosgd}!ssbn!bill
              internet    bill@ssbn.WLK.COM

rsalz@bbn.com (Rich Salz) (05/16/88)

Attached is uuhosts, which I believe is the best way to process the
map data.  It's good for using as both the unpacker, and for an
interactive lookups.  It's from the comp.sources.unix archives,
way back pre-reorg....  You will want to change the name of the newsgroup.

As for the how to call uuhosts, here's a fragment of the something we
run daily at BBN.  Our local updates to map files go in files named
	u.HOSTNAME
so that u.BBN is the private version of our map data, and when our neighbors
send us updates, it goes in something like u.UUNET until it shows up
in the maps.

The uuhosts shar file follows this.
    uuhosts -unbatch
    if [ ! -r Index ] ; then
	echo "Rebuilding uuhosts index file."
	uuhosts -i
    elif echo "COSTS PATHS: Index; @/bin/false" | make -qf - ; then
	exec echo "No new map data."
    fi

    ##  Dead machines and links.
    DEAD=""

    ##  Overloaded machines and links.
    AVOID="-a uunet -a ihnp4 -a husc6"

    ##  Debugging.
    #TRACE="-t uunet"
    DEBUG="-vvv ${TRACE}"

    ##  The path files.  First read local updates like u.BBN, then read the
    ##  domain files, then the raw map files.
    P1="u.[A-Z]*"
    P2="d.*"
    P3="u.[a-z]*"
    PATHS="${P1} ${P2} ${P3}"

    ##  Crunch, crunch
    pathalias -i -c ${DEBUG} ${DEAD} ${AVOID} ${PATHS} |\
	    awk '{ printf "%s\t%s\t%s\n", $2, $1, $3 }' >COSTS
    awk '{ printf "%s\t%s\n", $1, $3 }' <COSTS >PATHS
    sort +1.0 -n -o COSTS COSTS
    sort -f -o PATHS PATHS

----------------------------------CUT--------------------

From: talcott!ut-sally!jsq (John Quarterman)
Subject: uuhosts 1.69
Newsgroups: mod.sources
Approved: jpn@panda.UUCP

Mod.sources:  Volume 3, Issue 90
Submitted by: talcott!ut-sally!jsq (John Quarterman)

This is uuhosts version 1.69   Improvements over the last release (1.59)
include faster execution, compressed maps, multiple hosts in #N lines,
and path.local

		John Quarterman
		Department of Computer Sciences
		University of Texas at Austin
		Austin, Texas 78712 USA
		jsq@sally.utexas.edu (formerly jsq@ut-sally.ARPA)
		{ctvax,gatech,harvard,ihnp4,pyramid,seismo,topaz}!ut-sally!jsq

: This is a shar archive.  Extract with sh, not csh.
echo x - README
sed -e 's/^X//' > README << '!RoNnIe!RaYgUn!'
XThis is the source directory for uuhosts, which may be used to display
XUUCP mail and USENET news information previously extracted from the
XUSENET newsgroup mod.map.  Mail routing information as produced by
Xpathalias is also displayed.  Since uuhosts needs the map information
Xfrom the USENET spool directory for mod.map extracted into a more
Xaccessible (and permanent) location it can also be used to do that.
X
XThis version of uuhosts, 1.69, works with the latest (December 1985)
Xmod.map postings.  Changes from the previous distributed version, 1.59,
Xinclude faster display (sed is used in place of awk), and path.local is
Xused (per mod.map's README) instead of Local for local path information.
XThe maps may be kept compressed to save disk space.  Multiple host names
Xmay appear (separated by white space or commas) in #N lines of map entries.
X
XIf you have a uuhosts of version 1.58 or previous, you will need to
X*completely reinstall* uuhosts.  Even with a newer version, you
Xshould still run "uuhosts -setup", and it wouldn't hurt to do it all.
X
X
XIf you don't have a UNIX group named news in /etc/group, you should 
Xcreate one, as uuhosts depends on it.
X
XTo install uuhosts, first look at the beginning of the Makefile and
Xadjust any pathnames or other parameters which are incorrect for your
Xsystem.  Then do "make" to be sure everything compiles correctly.
XTo install the necessary shell script, C program, and manual entry,
Xas well as creating all necessary new directories, do "make install"
Xas root.
X
XOnce the program is installed, you will want to extract any existing
Xmod.map articles so uuhosts can display their information.  To do
Xthis, type "uuhosts -setup &".  Do not do it as root!  Do it as some
Xuser in group news.  It will take a while:  display speed has been
Xbought by slowness in extraction.  You should only need to do this
Xonce, because of the last installation steps:
X
XFinally, modify NEWS/sys by hand so that inews will batch incoming
Xmod.map articles, and also arrange for "uuhosts -unbatch" to
Xbe called nightly by cron.  See the MAINTENANCE section of the uuhosts
Xmanual entry for how to do this.  Do not call "uuhosts -unbatch" as root!
XHave it called as some user in group news.
X
X
XNeither pathalias nor compress are included here.  Both have been
Xposted to mod.sources recently:  contact the moderator for copies.
XIf you have uupath, you may want to use it to look up UUCP routing
Xinformation instead of the method uuhosts uses by default.
XJust look for uupath in uuhosts.sh and it's obvious what to change.
X
X
XFor the mod.map extraction (and *only* that extraction), uuhosts
Xdepends on a small setuid program called mapsh (included here) which
Xuses chroot(2), which is in (at least) 4BSD, System N, and Version 7.
XThe purpose of mapsh is to limit the commands which may be executed
Xwhen found in a map article.  If you trust everyone who can post to
XUSENET from any machine in the world, you can probably replace mapsh
Xwith "cd $MAPS; sh".  Or you can use unmvax!lee's article parser in C,
Xif you like.
X
X		John Quarterman
X		Department of Computer Sciences
X		University of Texas at Austin
X		Austin, Texas 78712 USA
X		jsq@sally.utexas.edu (formerly jsq@ut-sally.ARPA)
X		{ctvax,gatech,harvard,ihnp4,pyramid,seismo,topaz}!ut-sally!jsq
X
XHere is an example of the most common use of uuhosts, which is to
Xdisplay information about a particular host:
X
Xim4u% uuhosts nbires
XUUCP mail path from im4u to nbires:
Xnbires	ut-sally!nbires!%s
XUUCP mail path for nbires annotated by location:
Xnbires(usa.co)	ut-sally(usa.tx)!nbires(usa.co)!%s
X
XUUCP mail information for host nbires (#USENET lines show USENET news links):
X#Name			nbires
X#System-CPU-OS		VAX-11/750; UNIX BSD 4.2
X#Organization		NBI, Inc.
X#Contact		Kirk Webb
X#Electronic-Address	postmaster@nbires.UUCP
X#Telephone		(303) 444-5710
X#Postal-Address		P.O. Box 9001, Boulder, CO 80301
X#Latitude-Longitude	40 01 N / 105 17 W city
X#Written-by		mccallum@nbires.UUCP (Doug McCallum); Mon Sep  9 13:27:28 MDT 1985
X#USENET	cires opus stcvax gangue utopia hao isis bdaemon fred boulder
Xnbires	allegra(EVENING+HIGH), amd(EVENING+HIGH), attunix(EVENING+HIGH),
X	boulder(DEMAND), bdaemon(DEMAND), cbosgd(EVENING+HIGH), cires(DEMAND),
X	cisden(DEMAND), cornell(EVENING), csu-cs(DEMAND), ctvax(DEMAND),
X	cadnetix(DEMAND), 
X	fred(DIRECT), gangue(DEMAND), galon(DEMAND), hao(DEMAND),
X	isis(DIRECT), koala(DEMAND),
X	lbl-csam(EVENING),
X	onecom(DIRECT),
X	princeton(WEEKLY/3), pyramid(EVENING+LOW),
X	scgvaxd(EVENING), stcvax(DEMAND), ucbvax(EVENING+HIGH),
X	udenva(DEMAND), uofm-cv(EVENING), usenix(EVENING+HIGH), usiiden(DEMAND),
X	utah-cs(EVENING+LOW), ut-ngp(EVENING), ut-sally(EVENING),
X	utopia(DAILY), unidot(DEMAND), vianet(POLLED)
X# nbinet = @{nbires, binkley, opus, yaz, milo, oasys, boson}(LOCAL)
X
!RoNnIe!RaYgUn!
echo x - uuhosts.sh
sed -e 's/^X//' > uuhosts.sh << '!RoNnIe!RaYgUn!'
X#!/bin/sh
X# '@(#) uuhosts.sh 1.69 86/01/06'
X# uuhosts - UUCP mail and USENET news information
X
XMAPS=/usr/spool/news/maps
XUUCPMAPGROUP=mod.map
XUUCPMAP=$UUCPMAPGROUP
XRUUHOSTS=uuhosts
XDEFPAGER=cat
Xpager="${PAGER-$DEFPAGER}"
X
Xcase $RUUHOSTS in
X"")
X	;;
X*)
X	if [ ! -d $MAPS/$UUCPMAP ]; then
X		client $RUUHOSTS uuhosts $* | $pager
X		exit
X	fi
X	;;
Xesac
X
XBIN=/usr/local
XLIB=/usr/local/lib
XNEWS=$LIB/news
XMAPSH=$NEWS/mapsh
XUUCPSPOOL=/usr/spool/news/mod/map
XPATHS=$LIB/nmail.paths
XWHERE=$LIB/nmail.where
XLOOK=1
XCOMPRESS=1
Xcase $COMPRESS in
X"")
X	zcat=cat
X	;;
X*)
X	zcat=zcat
X	;;
Xesac
X
Xcase $1 in
X	-setup)
X		# Initial setup.  Should only need to be done once.
X		ls $UUCPSPOOL/[0-9]* > $MAPS/$UUCPMAP/Batch
X		exec $BIN/uuhosts -unbatch
X		exit 1
X	;;
X
X	-unbatch)
X		# Unbatch map articles batched by inews.  Called from cron.
X		cd $MAPS/$UUCPMAP
X		if [ -f Batch ]; then
X			:
X		else
X			exit 1
X		fi
X		mv Batch Batch.working
X		for f in `cat Batch.working`
X		do
X			$BIN/uuhosts -x < $f
X			sleep 60
X		done
X		rm Batch.working
X		exec $BIN/uuhosts -i
X		exit 1
X	;;
X
X	-x)
X		# extract a new map piece into a map directory
X		temphead=/tmp/maphead.$$
X		temptext=/tmp/maptext.$$
X		tempcomm=/tmp/mapcomm.$$
X		cp /dev/null $temphead
X		cp /dev/null $temptext
X		echo 'exec /bin/mail postmaster' > $tempcomm
X		echo 'Reply-To: postmaster' > $temphead
X		awk '
XBEGIN	{
X	temphead = "'$temphead'"; tempcomm = "'$tempcomm'";
X	isuucpmap = 1;	# Assume most postings are map entries.
X	shead = 0; stext = 1; suucp = 2;
X	state = shead;
X}
Xstate == shead && ($1 == "From:" || $1 == "Sender:" \
X    || $1 == "Date:" || $1 == "Message-ID:" || $1 == "Message-Id:") {
X	print "Original-" $0 >> temphead;
X	next;
X}
Xstate == shead && $1 == "Newsgroups:" {	# no cross-postings allowed
X 	if ($2 != "'$UUCPMAPGROUP'") {
X		isuucpmap = 0;
X 		print "Bad-Newsgroups: " $2 " (should be '"$UUCPMAPGROUP"')" \
X 			>> temphead;
X 		next;
X	}
X}
Xstate == shead && $1 == "Subject:" {
X	# the odd initial test is to avoid certain brain damaged awks
X	if ("X" ~ /X/ \
X	&& $2 !~ /^UUCP/ && $2 !~ /^uucp/ && $2 !~ /^Uucp/) {
X		print "Subject:  not a map update" >> temphead;
X		print "Original-" $0 >> temphead;
X		isuucpmap = 0;
X	} else
X		print $0 >> temphead;
X	next;
X}
Xstate == shead && /^$/	{
X	if (isuucpmap != 0) {
X	print "PATH=/bin; umask 0002; cd '$UUCPMAP'" | "'$MAPSH'";
X		state = suucp;
X	} else
X		state = stext;
X}
Xstate == shead {
X		print $0 >> temphead;
X}
Xstate == suucp	{
X	print | "'$MAPSH'";
X}
Xstate == stext	{
X	print;
X}
X' > $temptext 2>&1
X		cat $temphead $temptext | sh $tempcomm
X		rm -f $temphead $temptext $tempcomm
X		exit 0
X	;;
X
X	-compress)
X		case $COMPRESS in
X		"")
X			exit
X			;;
X		esac
X		cd $MAPS/$UUCPMAP
X		if [ -f README ]; then
X			compress -f README
X		fi
X		compress -f [a-z]*.*[a-z0-9]
X		exit 0
X	;;
X
X	-i)
X		# Create the Index used for fast lookups.
X		cd $MAPS/$UUCPMAP
X		$BIN/uuhosts -compress
X		for file in [a-z]*.*
X		do
X			f=`basename $file .Z`
X			$zcat $f |
X			sed -n -e "s/,/ /g" -e "/^#N/s/#N[	 ]*//p" |
X			awk 'BEGIN { filename = "'"$f"'" }
X			{
X				for (x=1; x<=NF; x++)
X					printf("%s\t%s\n", $x, filename);
X			}'
X		done | sort -f > Index.$$
X 		mv Index.$$ Index
X		if [ -f $LIB/uuwhere ]; then
X			$LIB/uuwhere
X		fi
X		exit 0
X	;;
X
X	-r)
X		# by region
X		cd $MAPS/$UUCPMAP
X		shift
X		case $# in
X		0)
X			exec ls
X			exit 1
X		;;
X		esac
X		case $COMPRESS in
X		"")
X			exec $pager $*
X			exit 1
X			;;
X		*)
X			zcat $* | $pager
X			exit 0
X			;;
X		esac
X		exit 1
X	;;
X
X	-u)
X		exec $BIN/uuhosts -r
X		exit 1
X	;;
X
X	-n)
X		exec $BIN/uuhosts -r
X		exit 1
X	;;
X
X	-k)
X		# by keyword
X		cd $MAPS/$UUCPMAP
X		shift
X		$zcat [a-z]*.* | awk '
XBEGIN		{ inside = 1; outside = 0; state = outside; }
X/^#N/ && state == inside	{
X	if (useit == 1) {
X		for (i = 0; i < count; i++) {
X			print block[i];
X		}
X	}
X	state = outside;
X}
X/^#N/	{ state = inside; count = 0; useit = 0; }
Xstate == inside	{ block[count++] = $0; }
X/'"$*"'/	{ useit = 1; }
XEND {
X	if (useit == 1) {
X		for (i = 0; i < count; i++) {
X			print block[i];
X		}
X	}
X}
X' | $pager
X		exit 0
X	;;
X
X	-*)
X		# unknown option
X	;;
X
X	"")
X		# no arguments
X	;;
X
X	*)
X		# by host name
X		case $LOOK in
X		"")
X			look=grep
X			lookopt="^"
X			;;
X		*)
X			look=look
X			lookopt="-f "
X			;;
X		esac
X		for arg in $*
X		do
X			echo "UUCP mail path from `uuname -l` to $arg:"
X			$look $lookopt$arg $PATHS
X# 			uupath $arg
X			case $WHERE in
X			"")
X				;;
X			*)
X			if [ -f $WHERE ]; then
X			echo "UUCP mail path for $arg annotated by location:"
X				$look $lookopt$arg $WHERE
X			fi
X				;;
X			esac
X			echo "
XUUCP mail information for host $arg (#USENET lines show USENET news links):"
X			cd $MAPS/$UUCPMAP
X# Find the Index entry for the host with look or sed.
X# Select the file name(s) with sed.
X# Uncompress the file and select the appropriate lines with sed.
X			case $look in
X			*look*)
X				files=`$look $lookopt$arg Index |
X				sed -n -e "/^$arg/s%.*	%%p"`
X				;;
X			*)
X				files=`
X				sed -n -e "/^$arg/s%.*	%%p" Index`
X				;;
X			esac
X			case $files in
X			"")
X				continue
X				;;
X			esac
X			$zcat $files | sed -n -e ":toss
X/#N.*[	 ]*$arg/bcopy
Xd
Xbtoss
X:copy
Xs/^#N/#Name		/
Xp
Xn
X:copy2
X/^#N/btoss
Xs/^#S/#System-CPU-OS	/
Xs/^#O/#Organization	/
Xs/^#C/#Contact	/
Xs/^#E/#Electronic-Address/
Xs/^#T/#Telephone	/
Xs/^#P/#Postal-Address	/
Xs/^#L/#Latitude-Longitude/
Xs/^#R/#Remarks	/
Xs/^#W/#Written-by	/
Xs/^#U/#USENET/
Xp
Xn
Xbcopy2"
X		done | $pager
X		exit 0
X	;;
Xesac
X
Xecho 'Usage:	uuhosts hostname ...
Xfor information about a particular UUCP or USENET host or hosts, or
X
X	uuhosts -r region
Xfor information about hosts in a region of the UUCP or USENET networks, or
X
X	uuhosts -r
Xfor a list of known regions.
X
XSee uuhosts(1) or "uuhosts -r README" for further details.
X'
Xexit 1
!RoNnIe!RaYgUn!
echo x - mapsh.c
sed -e 's/^X//' > mapsh.c << '!RoNnIe!RaYgUn!'
X#include <stdio.h>
X/*
X	This command depends on chroot(2), which exists in 4BSD, System V,
X	Version 7, and probably all related systems.
X */
X
X#ifndef MAPS
X#define MAPS "/usr/local/lib/news/maps"
X#endif
X
Xmain(argc,argv)
Xint argc;
Xchar **argv;
X{
X	char *rootdir = MAPS;
X	char *command = "/bin/sh";
X
X	if (geteuid() != 0) {
X		fprintf (stderr, "mapsh must be setuid to root\n");
X		exit(1);
X	}
X	if (chroot(rootdir) == -1) {
X		fprintf (stderr, "mapsh:  chroot(%s) failed\n", rootdir);
X		perror ("");
X		exit(1);
X	}
X	if (setuid(getuid()) == -1) {
X		perror ("mapsh:  setuid(getuid()) failed");
X		exit(1);
X	}
X	if (chdir("/") == -1) {
X		fprintf (stderr, "mapsh:  chdir(%s) failed\n", "/");
X		perror ("");
X		exit(1);
X	}
X	execvp (command, argv);
X	fprintf (stderr, "mapsh:  %s not found\n", command);
X	perror ("mapsh:  execvp(2) failed");
X	exit(1);
X}
!RoNnIe!RaYgUn!
echo x - uuwhere.c
sed -e 's/^X//' > uuwhere.c << '!RoNnIe!RaYgUn!'
X#ifndef lint
Xchar sccsid[] = "@(#) uuwhere.c 1.12 85/11/29";
X#endif
X/*
X * uuwhere:
X * This is a frill which may be called by uuhosts to annotate routing
X * information produced by pathalias(1L) with the location of each host.
X * It takes the ASCII UUCP routing database PATHS on standard input,
X * and produces the annnotated version on standard output, to be put
X * in WHERE.  It gets the location information from the UUCP map directory
X * produced by uuhosts from the map posted to the USENET newsgroup
X * mod.map.uucp by the UUCP Project.
X *
X * Uuwhere is usually called by uuhosts, and most of the time just
X * checks to see if WHERE needs to be updated.  Uuhosts itself
X * displays the annotated routing information to the user.
X *
X * The host location information is first put into a dbm(3x)
X * database so that generating the final output will not take forever.
X * If you don't have dbm, this won't work.
X */
X
X#include <stdio.h>
X#include <ctype.h>
X#include <dbm.h>
X#include <sys/types.h>
X#include <sys/stat.h>
X
X#ifndef UUCPINDEX
X#define UUCPINDEX "/usr/local/lib/news/maps/mod.map.uucp/Index"
X#endif
X#ifndef TMP
X#define TMP "/usr/local/lib/nmail.tmp"
X#endif
X#ifndef PATHS
X#define PATHS "/usr/local/lib/nmail.paths"
X#endif
X#ifndef WHERE
X#define WHERE "/usr/local/lib/nmail.where"
X#endif
X#ifndef DATABASE
X#define DATABASE	"/usr/local/lib/uuindex"
X#endif
X
Xstatic int verbose, flagcreat, flagupdate, flaginput;
X
Xmain(argc, argv)
Xint argc;
Xregister char **argv;
X{
X	register FILE *fin;
X	flagcreat = 0;
X	flagupdate = 1;
X	flaginput = 0;
X
X	(void) umask(0);
X	while (*++argv != NULL) {
X		if (**argv != '-') {
X			flaginput = 1;
X			flagupdate = 0;
X		} else
X		switch (argv[0][1]) {
X			case '\0':
X				flaginput = 1;
X				flagupdate = 0;
X				break;
X			case 'c':
X				flagcreat = 1;
X				flagupdate = 0;
X				break;
X			case 'v':
X				verbose = 1;
X				break;
X			default:
X				usage();
X				break;
X		}
X		if (flaginput)
X			break;
X	}
X	if (verbose) {
X		if (flagcreat)
X			fprintf(stderr, "Force creation of database %s.\n",
X				DATABASE);
X		if (flagupdate)
X			fprintf(stderr, "Attempt update of %s.\n",
X				WHERE);
X		if (flaginput)
X			fprintf(stderr, "Input files (%s ...) specified.\n",
X				*argv);
X	}
X	if (!flaginput) {
X		(void)fclose(stdout);
X		(void)fclose(stdin);
X	}
X	init(flagcreat, flagupdate, flaginput);
X	if (!flaginput) {
X		char tmpbuf[64];
X
X 		if ((fin = fopen(PATHS, "r")) == (FILE *)NULL) {
X			perror (PATHS);
X			exit (1);
X		}
X		(void)sprintf(tmpbuf, "%s.%d", TMP, getpid());
X		if (freopen(tmpbuf, "w", stdout) == (FILE *)NULL) {
X			perror (tmpbuf);
X			exit (1);
X		}
X		parsefile(fin, PATHS);
X		(void)fclose(stdout);
X		if (unlink (WHERE) == -1 || link(tmpbuf, WHERE) == -1) {
X			perror(WHERE);
X			exit(1);
X		}
X		(void)unlink(tmpbuf);
X		exit (0);
X	}
X	for (; *argv != NULL; argv++) {
X		if (strcmp (*argv, "-") == 0) {
X			parsefile(stdin, "stdin");
X			continue;
X		}
X		if ((fin = fopen(*argv, "r")) != (FILE *)NULL) {
X			parsefile(fin, *argv);
X			continue;
X		}
X		perror (*argv);
X	}
X	exit(0);
X}
X
Xusage()
X{
X	fprintf (stderr, "usage:  uuwhere [-c] [-v] [infiles]\n");
X	exit (1);
X}
X
Xinit(flagcreat, flagupdate, flaginput)
Xint flagcreat, flagupdate, flaginput;
X{
X	char datadir[512], datapag[512];
X	struct stat statuucp, statpaths, statwhere;
X	int fd;
X	char c;
X
X/*
X * If any of the stats fail,
X * an open will fail later and produce a diagnostic.
X */
X	if (flagupdate
X	&& stat(WHERE, &statwhere) != -1
X	&& stat(PATHS, &statpaths) != -1
X	&& stat(UUCPINDEX, &statuucp) != -1) {
X		if (statwhere.st_mtime > statpaths.st_mtime
X		&& statwhere.st_mtime > statuucp.st_mtime) {
X			if (verbose)
X				fprintf (stderr, "%s up to date\n", WHERE);
X			exit(0);
X		}
X		if (statuucp.st_mtime > statwhere.st_mtime
X		|| statuucp.st_mtime > statpaths.st_mtime)
X			flagcreat = 1;
X	}
X	if (!flaginput) {
X		/* touch WHERE to forestall duplicate uuwheres */
X		if ((fd = open(WHERE, 2)) < 0) {
X			perror(WHERE);
X			exit(1);
X		}
X		if (read (fd, &c, 1) == 1)
X			(void) write (fd, &c, 1);
X		(void) close (fd);
X	}
X	(void) sprintf (datadir, "%s.dir", DATABASE);
X	(void) sprintf (datapag, "%s.pag", DATABASE);
X	if (flagcreat || access(datadir, 0) == -1 || access(datapag, 0) == -1) {
X		flagcreat = 1;
X		if (verbose)
X			fprintf (stderr, "Creating database %s...\n", DATABASE);
X		if (makefile(datadir) == -1 || makefile(datapag) == -1)
X			exit(1);
X	}
X	if (dbminit(DATABASE) < 0)
X		exit(1);
X	if (!flagcreat)
X		return;
X	if (!initit(UUCPINDEX))
X		exit(1);
X	if (verbose)
X		fprintf (stderr, "...database %s created.\n", DATABASE);
X}
X
Xmakefile(name)
Xchar *name;
X{
X	register int fd;
X
X	if ((fd = creat(name, 0666)) == -1) {
X		perror(name);
X		return(-1);
X	}
X	(void) close(fd);
X	return (0);
X}
X
Xinitit(name)
Xchar *name;
X{
X	register FILE *fp;
X	char buffer[1024], site[128], where[128];
X	datum key, data;
X
X	if (verbose)
X		fprintf(stderr, "Reading %s...", name);
X	if ((fp = fopen(name, "r")) == (FILE *)NULL) {
X		perror(name);
X		return (0);
X	}
X 	while (fgets(buffer, sizeof(buffer), fp) != NULL) {
X		if (sscanf(buffer, "%s%s", site, where) != 2) {
X			fprintf (stderr, "Can't parse:  %s\n", buffer);
X			continue;
X		}
X		key.dptr = site;
X		key.dsize = strlen(key.dptr) + 1;
X		data.dptr = where;
X		data.dsize = strlen(data.dptr) + 1;
X		store (key, data);
X	}
X	(void)fclose(fp);
X	if (verbose)
X		fprintf(stderr, ".\n");
X	return(1);
X}
X
Xparsefile(fin, name)
Xregister FILE *fin;
Xchar *name;
X{
X	char buffer[128];
X	register char *cp;
X	register int c;
X	register int inside;
X	register int last = 0;
X
X	if (verbose)
X		fprintf(stderr, "%s\n", name);
X	for (inside = 0; (c = getc(fin)) != EOF; putchar(c)) {
X		if (isalnum(c) || c == '.' || c == '-' || c == '_') {
X			if (!inside) {
X				cp = buffer;
X				inside = 1;
X			}
X			*cp++ = c;
X			continue;
X		}
X		if (inside) {
X			*cp = '\0';
X			if (cp != buffer
X/* %s */	&& !((cp - buffer) == 1 && last == '%' && buffer[0] == 's'))
X				doit(buffer);
X			inside = 0;
X		}
X		last = c;
X	}
X}
X
Xdoit (site)
Xchar *site;
X{
X	datum key, data;
X
X	key.dptr = site;
X	key.dsize = strlen(key.dptr) + 1;
X	data = fetch(key);
X	if (data.dptr != NULL)
X		printf ("(%s)", data.dptr);
X}
!RoNnIe!RaYgUn!
echo x - uuhosts.man
sed -e 's/^X//' > uuhosts.man << '!RoNnIe!RaYgUn!'
X.TH UUHOSTS 1L 85/11/04
X.SH NAME
Xuuhosts \- UUCP mail and USENET news information.
X.SH SYNOPSIS
X.B
Xuuhosts
Xhostname ...
X.br
X.B
Xuuhosts
X-r [ region ]
X.SH DESCRIPTION
XThe \fIuuhosts\fP command is used to look up information about
Xthe configurations of the UUCP mail network and the USENET news network.
X.TP
Xuuhosts \fIhostname\fP ...
Xfor information about a particular UUCP or USENET host or hosts.
XThe UUCP mail path is given first, followed by the map information.
XThe USENET map is carried as notations in entries in the UUCP map,
Xin the lines starting with ``#USENET''.
XAny hosts with names for which the argument is a prefix are shown, e.g.:
X.TP
Xuuhosts ut
Xgets information about all hosts whose names start with ``ut''.
X.TP
Xuuhosts \-r \fIregion\fP
Xfor information about hosts in a (usually geographical) region.
X.TP
Xuuhosts \-r README
Xgets an introduction to the map.
X.TP
Xuuhosts \-r path.local
Xgets map information known only locally.
X.TP
Xuuhosts \-r
Xfor a list of known regions.
X.TP
Xuuhosts
Xwith no arguments gets a short usage message.
X.PP
XOutput is broken into pages by the program named in the PAGER environment
Xvariable, or by a default pager set at compile time,
Xwhich is usually one of more, pg, or cat,
Xas appropriate for the host system.
X.SH MAINTENANCE
XNone of these options should be used by the super-user (root).
X.TP
Xuuhosts \-setup
XOnce "make\ install" has been done for the initial installation,
Xthis option may be used to extract any backlog of \fBUUCPMAPGROUP\fP articles.
XDo not run it as root!
XRun it as some user in group news.
X.TP
Xmaps:UUCPMAPGROUP:F:UUCPMAP/Batch
XThis line should go in \fBNEWS/sys\fP.
XIt causes \fIinews\fP(1L) to list the pathnames of incoming articles of
X\fBUUCPMAPGROUP\fP in the \fBBatch\fP file.
X.TP
Xuuhosts \-unbatch
XThis should be called nightly by \fIcron\fP(8) or whatever mechanism is
Xused to call the USENET \fIexpire\fP(8) command.
XIt extracts articles from \fBUUCPMAPGROUP\fP which have
Xcome in since the last time it was run.
XDo not run it as root!
XRun it as some user in group news.
X.TP
Xuuhosts \-x
XExtract an individual \fBUUCPMAPGROUP\fP article.
XOrdinarily called from \fIuuhosts\fP\ \-\fBunbatch\fP.
X.TP
Xuuhosts \-i
XRebuild the Index file (see below).
XOrdinarily called from \fIuuhosts\fP\ \-\fBunbatch\fP.
X.SH FILES
X.TP
XPATHS
XUUCP mail path database as produced by \fIpathalias\fP and used by \fInmail\fP
X(which is called automatically from \fIsendmail\fP on \fIut\-sally\fP)
XIt is searched by \fIlook\fP(1), if present, else \fIgrep\fP(1).
XThe file WHERE is similarly searched, if present:
Xsee \fIuuwhere\fP(1).
X.TP
XUUCPMAP
XUUCP and USENET map information taken from newsgroup \fBUUCPMAPGROUP\fP
X(thanks to the UUCP mapping project).
XNotices of updates are mailed to \fBpostmaster\fP, which should be an alias
Xredistributing to the local mail and UUCP administrators.
X.TP
XUUCPMAP/Index
XThis index is used to decrease search time on the map about an order
Xof magnitude.
XThe search is done by either \fIlook\fP(1) or \fIgrep\fP(1), as above.
X.SH SEE ALSO
Xvnews(1), readnews(1), mail(1), sendmail(8), look(1)
!RoNnIe!RaYgUn!
echo x - uuwhere.man
sed -e 's/^X//' > uuwhere.man << '!RoNnIe!RaYgUn!'
X.TH UUW\HERE 1L 85/08/11
X.SH NAME
Xuuwhere \- annotate UUCP mail routes by host location
X.SH SYNOPSIS
X.B
XLIB/uuwhere
X[ -c ]
X[ infile ]
X.SH DESCRIPTION
XThe \fIuuwhere\fP command is used take a list of UUCP routes,
Xsuch as produced by \fIpathalias\fP, and make a similar list,
Xannotated by the geographical location of each host as found
Xin the UUCP map posted to USENET newsgroup mod.map.uucp.
XIt is ordinarily called with no arguments by \fIuuhosts\fP(1L),
Xand will update \fBWHERE\fP, taking routes from \fBPATHS\fP and locations
Xfrom \fBUUCPMAP/Index\fP, if either
X\fBPATHS\fP or \fBUUCPMAP/Index\fP is newer than \fBWHERE\fP.
XThe information in \fBWHERE\fP is displayed by \fIuuhosts\fP itself.
X.PP
XInput file names may be specified as arguments.
XThis also causes output to go to standard output instead of directly to
XInput file name \fI-\fP is taken to be standard input.
X\fBWHERE\fP.
X.TP
X\-\fBc
X\fIUuwhere\fP uses a \fIdbm\fP(3) database to store the location information
Xfrom \fBUUCPMAP/Index\fP before creating output.
XThis option causes \fIuuwhere\fP to recreate the database regardless
Xof the state of any input files.
X.SH FILES
X.TP
XWHERE
XThe place where the output of \fIuuwhere\fP is usually kept for use
Xby \fIuuhosts\fP.
X.TP
XPATHS
XThe default route list used as input by \fIuuwhere\fP.
XProduced by \fIuuhosts\fP.
X.TP
XUUCPMAP/Index
XThe source of the location information used by \fIuuwhere\fP.
XProduced by \fIpathalias\fP.
X.SH SEE ALSO
Xuuhosts(1), pathalias(1), dbm(3).
!RoNnIe!RaYgUn!
echo x - maps.ls
sed -e 's/^X//' > maps.ls << '!RoNnIe!RaYgUn!'
X/usr/spool/news/maps:
Xtotal 9
Xdr-xr-xr-x  5 root     news          512 Sep 17 09:10 .
Xdrwxrwxrwx 20 news     news         1024 Jan  6 10:06 ..
Xdr-xr-xr-x  2 root     news          512 Aug 10 11:07 bin
Xdrwxrwxr-x  2 root     news         4608 Jan  4 09:57 mod.map
Xdrwxrwxrwx  2 root     news         1024 Dec  6 18:12 tmp
X/usr/spool/news/maps/bin:
Xtotal 75
Xdr-xr-xr-x  2 root     news          512 Aug 10 11:07 .
Xdr-xr-xr-x  5 root     news          512 Sep 17 09:10 ..
X-r-xr-xr-x  1 root     news        16384 Jan  2 12:20 cat
X-r-xr-xr-x  1 root     news         8192 Jan  2 12:20 echo
X-r-xr-xr-x  1 root     news        23552 Jan  2 12:20 sed
X-r-xr-xr-x  1 root     news        26624 Jan  2 12:20 sh
!RoNnIe!RaYgUn!
echo x - Makefile
sed -e 's/^X//' > Makefile << '!RoNnIe!RaYgUn!'
X# @(#) Makefile 1.33 85/12/09
XSHELL=/bin/sh
X
X# Settable parameters.
X
X# Default pager for use if PAGER environment variable is not set.
XDEFPAGER=more	# BSD systems
X#DEFPAGER=pg	# AT&T systems
X#DEFPAGER=cat	# systems with paging in the kernel
X# Set this if you have look(1).
XLOOK=1
X# Set this to compress the map files.
XCOMPRESS=yes
X#COMPRESS=
X
X# BIN should be either /usr/local or /usr/local/bin
XBIN=/usr/local
XLIB=/usr/local/lib
X
X# Routing information produced by pathalias.
XPATHS=$(LIB)/nmail.paths
X
X# If you do not have dbm(3), i.e., -ldbm, set UUWHERE to nothing.
XUUWHERE=uuwhere
X# UUWHERE=
X# Munged by uuwhere for location information.
XWHERE=$(LIB)/nmail.where
X# TMP should be in the same directory as WHERE.
XTMP=$(LIB)/nmail.tmp
X# -ldbm DATABASE used by uuwhere.
XDATABASE=$(LIB)/uuindex
X
X# Most of the news parameter files and mapsh are in this directory.
XNEWS=$(LIB)/news
X# The maps from mod.map are under this directory.
XMAPS=/usr/spool/news/maps
X#MAPS=$(NEWS)/maps	# another possibility
X
X# The filename of the manual entry.
XUUHOSTSMAN=uuhosts.1
XUUWHEREMAN=uuwhere.1
XMAN=$(UUHOSTSMAN) $(UUWHEREMAN)
XMANSOURCES=uuhosts.man uuwhere.man
X# The manual directory for local entries.
XMANDIR=/usr/man/manl
X
X# This is a very local UT hack which is meaningless on your system.
XRUUHOSTS=uuhosts.CS.UTEXAS.EDU
X
X# The rest of the Makefile shouldn't need to be changed.
X
XUUCPMAPGROUP=mod.map
X# This can't be the same as UUCPMAPGROUP
XOLDUUCPMAPGROUP=mod.map.uucp
X# USENET spool directory containing articles from newsgroup $(UUCPMAPGROUP).
X# Must match $(UUCPMAPGROUP)!
XUUCPSPOOL=/usr/spool/news/mod/map
X# The place uuhosts stores the $(UUCPMAPGROUP) information for later retrieval.
XUUCPMAP=$(MAPS)/$(UUCPMAPGROUP)
X
XSOURCES=uuhosts.sh mapsh.c uuwhere.c $(MANSOURCES) maps.ls
XALL= uuhosts mapsh $(UUWHERE) $(MAN)
X
Xall: $(ALL)
X
Xuuhosts: Makefile uuhosts.sh
X	sed -e '/^DEFPAGER=/s%=.*%=$(DEFPAGER)%' \
X		-e '/^LOOK=/s%=.*%=$(LOOK)%' \
X		-e '/^COMPRESS=/s%=.*%=$(COMPRESS)%' \
X		-e '/^RUUHOSTS=/s%=.*%=$(RUUHOSTS)%' \
X		-e '/^UUCPMAPGROUP=/s%=.*%=$(UUCPMAPGROUP)%' \
X		-e '/^UUCPSPOOL=/s%=.*%=$(UUCPSPOOL)%' \
X		-e '/^BIN=/s%=.*%=$(BIN)%' \
X		-e '/^LIB=/s%=.*%=$(LIB)%' \
X		-e '/^PATHS=/s%=.*%=$(PATHS)%' \
X		-e '/^WHERE=/s%=.*%=$(WHERE)%'\
X		-e '/^NEWS=/s%=.*%=$(NEWS)%' \
X		-e '/^MAPS=/s%=.*%=$(MAPS)%'\
X		uuhosts.sh > uuhosts
X	chmod +x uuhosts
X
Xmapsh: Makefile mapsh.c
X	$(CC) -o mapsh -DMAPS=\"$(MAPS)\" mapsh.c
X
Xuuwhere: Makefile uuwhere.c
X	$(CC) -DUUCPINDEX=\"$(UUCPMAP)/Index\" \
X		-DPATHS=\"$(PATHS)\" \
X		-DWHERE=\"$(WHERE)\" \
X		-DTMP=\"$(TMP)\" \
X		-DDATABASE=\"$(DATABASE)\" \
X		uuwhere.c -ldbm -o uuwhere
X
Xwhere:	$(LIB)/uuwhere
X
X$(UUHOSTSMAN):	Makefile uuhosts.man
X	sed -e 's%UUCPMAPGROUP%$(UUCPMAPGROUP)%' \
X		-e 's%UUCPMAP%$(UUCPMAP)%' \
X		-e 's%DEFPAGER%$(DEFPAGER)%' \
X		-e 's%BIN%$(BIN)%' \
X		-e 's%LIB%$(LIB)%' \
X		-e 's%PATHS%$(PATHS)%' \
X		-e 's%WHERE%$(WHERE)%' \
X		-e 's%TMP%$(TMP)%' \
X		-e 's%DATABASE%$(DATABASE)%' \
X		-e 's%NEWS%$(NEWS)%' \
X		-e 's%MAPS%$(MAPS)%'\
X		uuhosts.man > $(UUHOSTSMAN)
X
X$(UUWHEREMAN):	Makefile uuwhere.man
X	sed -e 's%UUCPMAP%$(UUCPMAP)%' \
X		-e 's%BIN%$(BIN)%' \
X		-e 's%LIB%$(LIB)%' \
X		-e 's%PATHS%$(PATHS)%' \
X		-e 's%WHERE%$(WHERE)%' \
X		-e 's%TMP%$(TMP)%' \
X		-e 's%DATABASE%$(DATABASE)%' \
X		-e 's%NEWS%$(NEWS)%' \
X		-e 's%MAPS%$(MAPS)%'\
X		uuwhere.man > $(UUWHEREMAN)
X
Xinst_:
X
Xinst_uuwhere: $(UUWHERE)
X	-rm -f $(LIB)/uuwhere
X	cp uuwhere $(LIB)/uuwhere
X	chmod 555 $(LIB)/uuwhere
X	cp /dev/null $(WHERE)
X	-chmod 666 $(WHERE)
X	-rm -f $(MANDIR)/$(UUWHEREMAN)
X	-cp $(UUWHEREMAN) $(MANDIR)
X	-chmod 444 $(MANDIR)/$(UUWHEREMAN)
X
Xinstall: $(ALL) inst_$(UUWHERE) inst_most $(UUCPMAP)/path.local recover
X
Xinst_most:
X	-rm -f $(BIN)/uuhosts
X	cp uuhosts $(BIN)/uuhosts
X	chmod 555 $(BIN)/uuhosts
X	-rm -f $(MANDIR)/$(UUHOSTSMAN)
X	-cp $(UUHOSTSMAN) $(MANDIR)
X	-chmod 444 $(MANDIR)/$(UUHOSTSMAN)
X	@echo "Rest of installation has to be done as root."
X	cp mapsh $(NEWS)/mapsh
X	-strip $(NEWS)/mapsh
X	chown root $(NEWS)/mapsh
X	chgrp news $(NEWS)/mapsh
X	chmod 4750 $(NEWS)/mapsh
X	ls -lg $(NEWS)/mapsh
X	-mkdir $(MAPS)
X	-mkdir $(MAPS)/bin $(MAPS)/tmp $(UUCPMAP)
X	chgrp news $(MAPS) $(MAPS)/*
X	chmod 555 $(MAPS)
X	chmod 775 $(UUCPMAP)
X	chmod 777 $(MAPS)/tmp
X	chmod 555 $(MAPS)/bin
X	cp /bin/cat $(MAPS)/bin
X	cp /bin/echo $(MAPS)/bin
X	cp /bin/sed $(MAPS)/bin
X	cp /bin/sh $(MAPS)/bin
X	-strip $(MAPS)/bin/*
X	chgrp news $(MAPS)/bin/*
X	chmod 555 $(MAPS)/bin/*
X	@echo ''
X	@echo 'This is what the things just installed *should* look like:'
X	@cat maps.ls
X	@echo ''
X	@echo 'And here is what they actually *do* look like:'
X	ls -lga $(MAPS)
X	ls -lga $(MAPS)/bin
X	@echo ''
X
Xmaps.ls: Makefile uuhosts
X	rsh im4u echo $(MAPS): ';' ls -lga $(MAPS) ';' \
X		echo $(MAPS)/bin: ';' ls -lga $(MAPS)/bin \
X		< /dev/null > maps.ls
X
X$(UUCPMAP)/path.local:
X	-cd $(UUCPMAP); umask 002; \
X		cp /dev/null path.local; chgrp news path.local; \
X		cp Local path.local
X	@echo 'See "uuhosts -r README" about path.local.'
X
Xrecover:
X	@echo "Attempt to recover map data from a previous newsgroup ("$(OLDUUCPMAPGROUP)")."
X	@echo "If it fails, you probably don't have any old map data."
X	mkdir /tmp/$(OLDUUCPMAPGROUP)
X	-cd /tmp/$(OLDUUCPMAPGROUP); cd $(MAPS)/$(OLDUUCPMAPGROUP); \
X		mv * ../$(UUCPMAPGROUP); cd ..;  rmdir $(OLDUUCPMAPGROUP)
X	rmdir /tmp/$(OLDUUCPMAPGROUP)
X
Xclean:
X	rm -f $(ALL)
X	rm -f *.pag *.dir
X	rm -f *.o
X	rm -f *.shar
X
Xshar: uuhosts.shar
X
Xuuhosts.shar: README $(SOURCES) Makefile
X	shar README* $(SOURCES) Makefile > uuhosts.shar
!RoNnIe!RaYgUn!
exit

-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.

merlin@hqda-ai.ARPA (David S. Hayes) (05/17/88)

     I use this script from my crontab to update my maps.  (Note
that I have some things in non-standard places.)  This system does
keep both the news articles and the unpacked maps around, but I
don't regard that as a problem.  I run expire several times each
night (I know, get C news expire), and comp.mail.maps gets cleaned
out when it reaches 3 days old.

     The "make install" at the end runs pathalias, and formats the
results for smail.  I haven't had to touch my mail maps for about
6 months.  Have fun,

     	  David Hayes


#!/bin/sh
# This script will extract the new maps received in comp.mail.maps.
# It uses the file "Last_Maps_Extracted" to keep track of when it
# last updated the maps.  All articles in comp.mail.maps newer than
# that file are unshar-ed.
#
# If no files were produced by the unshar, then we quit.
# If there were files, we mail "news" a report of what was received.
# Then we move those maps to our path map directories MAP_U and
# MAP_D.  Finally, we build and install a new path file.

PATH=/usr/local/bin:/bin:/usr/bin

MAPNEWS=/usr/spool/news/comp/mail/maps
MAPTMP=/usr/tmp/getmaps
MAP_U=/usr/spool/uucp/map/u
MAP_D=/usr/spool/uucp/map/d

test -d $MAPTMP || mkdir $MAPTMP
rm -f $MAPTMP/*

NEWER=
if [ -f Last_Maps_Extracted ]; then
  NEWER="-newer Last_Maps_Extracted"
fi
FILES=`find $MAPNEWS -type f $NEWER -print`
for FILE in $FILES ; do
  ( cd $MAPTMP ; unshar $FILE )
done

NEWMAPS="`ls $MAPTMP`"
if [ "$NEWMAPS" = "" ]; then
  exit 0;
fi

( echo "The following maps were received:"
  ls -C $MAPTMP ) \
| /usr/ucb/mail -s "Usenet Maps Received" news

mv -f $MAPTMP/u.* $MAP_U
mv -f $MAPTMP/d.* $MAP_D
rmdir $MAPTMP

date > Last_Maps_Extracted

make install
exit 0

-- 
David S. Hayes, The Merlin of Avalon	PhoneNet:  (202) 694-6900
UUCP:  *!uunet!cos!hqda-ai!merlin	ARPA:  merlin@hqda-ai.arpa

davidsen@steinmetz.ge.com (William E. Davidsen Jr) (05/19/88)

In article <284@trwrc.RC.TRW.COM> agnew@trwrc.UUCP (Robert A. Agnew) writes:
| Has anyone devised a job to run in thier crontab that automatically
| copies maps from comp.mail.maps to thier pathalias map database
| account. This would relieve hundreds of people from countless

I do this on a net machine, to distribute to machines which is running
mail but not news. It could be hacked to do what you want with little
trouble. There is a tag file which is used in conjunction with the find
command to select what to move.

On the other end, there is a program which unshars, saves the original
file in compressed format, and updates the text copy to delete all of
the stuff following #, or the whole line if # in col 1. Another part
goes through and generates maps for several systems, using local, us,
na, or global sites, plus nets if desired. The result is then compressed
and sent to the system for which it's intended via uucp.

I suspect that I misunderstand the problem, since the whole thing I do
was hacked in about an hour using all shell scripts. I don't run it with
cron, but I certainly could.
-- 
	bill davidsen		(wedu@ge-crd.arpa)
  {uunet | philabs | seismo}!steinmetz!crdos1!davidsen
"Stupidity, like virtue, is its own reward" -me

jsq@longway.TIC.COM (John S. Quarterman) (05/22/88)

In article <736@fig.bbn.com> rsalz@bbn.com (Rich Salz) writes:
>Attached is uuhosts, which I believe is the best way to process the
>map data.  It's good for using as both the unpacker, and for an
>interactive lookups.  It's from the comp.sources.unix archives,
>way back pre-reorg....  You will want to change the name of the newsgroup.

During the reorganization, actually.

Before everyone asks:  there's no more recent version available,
since I've been too busy on other things.  I know it has problems
with domains in the maps.  I hope to get time to work on it this fall.

John S. Quarterman		tel: +1-512-320-9031
Texas Internet Consulting	fax: +1-512-320-5821
701 Brazos, Suite 500		jsq@longway.tic.com
Austin, TX 78701-3243		uunet!longway!jsq
U.S.A.				CompuServe: 76176,664