Article View: comp.mail.sendmail
Article #58Re: smail3 release 28 force-route
From: Alan P Barrett
Date: Wed, 04 Nov 1992 07:58
Date: Wed, 04 Nov 1992 07:58
71 lines
2876 bytes
2876 bytes
In article <Bx59A9.BIs@gator.rn.com>,
larry@gator.rn.com (Larry Snyder) writes:
> [Using smail3] how can I force the rerouting of all traffic based
> on my paths database?
I assume that "rerouting" refers to the practice of ignoring most or
all of the explicit routing information attached to an address that
arrives at your system. I consider rerouting to be Evil and Rude(TM),
but many others consider it to be necessary. Smail3 cannot do rerouting.
Rather than rerouting, I suggest that you try persuading your
neighbours to use partial routing. For example, if they want
to mail to foo!user, and their paths database says to route via
gator!baz!bar!somewhere!foo!user, then have them address the mail to
gator!foo!user. Then you can make some sensible decisions without
evil rerouting.
I use the attached "shorten" script as part of my map processing, and
I encourage my neighbours to do the same.
--apb
Alan Barrett, Dept. of Electronic Eng., Univ. of Natal, Durban, South Africa
RFC822: barrett@ee.und.ac.za Bang: m2xenix!undeed!barrett
# This is a shell archive. Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
#
# Wrapped by Alan P Barrett <barrett@undeed> on Wed Nov 4 09:27:31 1992
#
# This archive contains:
# shorten
#
LANG=""; export LANG
PATH=/bin:/usr/bin:$PATH; export PATH
echo x - shorten
sed 's/^@//' >shorten <<'@EOF'
#!/usr/bin/perl
# A filter to shorten pathalias output.
# A P Barrett <barrett@ee.und.ac.za> 16 September 1991.
#
# We assume that all the SMARTSITES can be trusted to be running
# with current versions of the maps, so that any path through any of
# the SMARTSITES can be shortened by deleting any explicit routing
# between the first smart site and the destination. Thus,
# destination dumb1!dumb2!smart1!dumb3!dumb4!destination!%s
# .des.tin.ation dumb1!dumb2!smart1!dumb3!dumb4!%s
# becomes
# destination dumb1!dumb2!smart1!destination!%s
# .des.tin.ation dumb1!dumb2!smart1!%s
# Set the list of smart sites.
# XXX - There should be a better way of doing this.
@@SMARTSITES = (
# adjust this list as appropriate.
uunet,
);
$smartmatch = join ("|",@SMARTSITES);
while (<>) {
s/^(\..*[\s!])(${smartmatch})!.*!/$1$2!/o;
s/^([^.].*[\s!])(${smartmatch})!.*!([^!]*![^!]*)$/$1$2!$3/o;
print;
}
@EOF
chmod 755 shorten
exit 0
Technical Details
Message-ID:
<1d7vqlINNo4q@daisy.ee.und.ac.za>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!olivea!charnel!psgrain!ee.und.ac.za!tplinfmReferences:
<Bx59A9.BIs@gator.rn.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!sun-barr!olivea!charnel!psgrain!ee.und.ac.za!tplinfm From: barrett@daisy.ee.und.ac.za (Alan P Barrett) Newsgroups: comp.mail.sendmail Subject: Re: smail3 release 28 force-route Message-ID: <1d7vqlINNo4q@daisy.ee.und.ac.za> Date: 4 Nov 92 07:58:13 GMT References: <Bx59A9.BIs@gator.rn.com> Organization: Dept. Elec. Eng., Univ. Natal, Durban, S. Africa Lines: 71 NNTP-Posting-Host: daisy.ee.und.ac.za