Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!ucbvax!pasteur!ames!killer!ssbn!bill From: bill@ssbn.WLK.COM (Bill Kennedy) Newsgroups: comp.mail.misc Subject: Re: Automatic Updating of pathalias database Keywords: pathalias Message-ID: <203@ssbn.WLK.COM> Date: 16 May 88 12:26:20 GMT References: <284@trwrc.RC.TRW.COM> Reply-To: bill@ssbn.UUCP (Bill Kennedy) Followup-To: comp.mail.misc Distribution: na Organization: W.L. Kennedy Jr. and Associates, Pipe Creek, TX Lines: 46 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