mail paths munger

John Pettitt jpp at specialix.co.uk
Wed Sep 13 02:06:31 AEST 1989


The enclosed file is a short script to edit the output
of pathalias.  The idea is it removes all paths that
pass through `smart-host'.

This is done to take advantage of MX mailers on `smart-host'.
It happens like this.  In my case `smart-host' is uunet.uu.net
if I build my paths using the world maps then from here to
say agate.berkeley.edu is uunet!mtxinu!ucbvax!agate.berkeley.edu.

As uunet is `smart-host' this path would be eliminated.  The result
of this is that uunet will do an MX lookup on agate.berkeley.edu
and deliver the mail via the internet saving time and money for
mtxinu and getting my mail accross faster.

It also takes my paths file from 800k to 200.

shar and enjoy.

# This is a shell archive.  Remove anything before this line
# then unpack it by saving it in a file and typing "sh file"
# (Files unpacked will be owned by you and have default permissions).
# This archive contains the following files:
#	./smartfold
#
if `test ! -s ./smartfold`
then
echo "writing ./smartfold"
cat > ./smartfold << '\Rogue\Monster\'
:
#
#	Fold lines with `smart-host' in them
#
#	Usage:
#	pathalias options | smartfold >paths
#
(cat >/tmp/sfold.$$)
#
SMART=`egrep smart-host /tmp/sfold.$$ |\
 sed -e "s/smart-host	//" -e "s/!%s.*//"`
#
sed -e "s/smart-host	$SMART/SMART-TOKEN/" </tmp/sfold.$$ |\
egrep -v "[	!]$SMART!" |\
sed -e "s/SMART-TOKEN/smart-host	$SMART/"
rm /tmp/sfold.$$
exit 0
\Rogue\Monster\
else
  echo "will not over write ./smartfold"
fi
echo "Finished archive 1 of 1"
# if you want to concatenate archives, remove anything after this line
exit
-- 
John Pettitt, Specialix, Giggs Hill Rd, Thames Ditton, Surrey, U.K., KT7 0TR
{backbone}!ukc!slxsys!jpp    jpp%slxinc at uunet.uu.net     jpp at specialix.co.uk
Tel: +44-1-941-2564       Fax: +44-1-941-4098         Telex: 918110 SPECIX G
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<



More information about the Alt.sources mailing list