[net.sources] sendmail and pathalias

israel@umcp-cs.UUCP (Bruce Israel) (10/20/85)

In article <371@mit-bug.UUCP> ucbvax!mit-bugs-bunny!dove writes:
>We have pathaliases working using some local nets.  Many addresses
>come out in the form "h2!h3!%s@h1".  I found a copy of uuroute.c which
>is designed to work from a database that returns a pure uucp address.
>
>Does anyone have code that works with sendmail to map an address
>through the database first, then go through the usual sendmail
>decisions about how to send to it.

What I did here at the Univ of Maryland was to add an extremely useful
feature to the sendmail source.  What it does is allow sendmail config
files to use translation tables from files as well as sets.  i.e. currently,
sendmail rules can match on words that are in a file.  My additions allow
the config file to get a translation from the file also.  For example,
you could define a rule that looks like:

R$+@$=U		$&2!$1

This rule would match on name@host where host was in the uucp-routing
class U, and use the path that the host expands to instead.  ($2 would
be the second item matched;  $&2 its translation).

We use this for automatic uucp routing.  Also, since we have a fairly large
local network with many users who do not have accounts on all machines, I
use this feature to translate name@local-host to name@other-host for
accounts and mailing lists that exist on the local network but not on the
current host.  This makes all machines look identical for mail purposes.
This could be done in the aliases file, but then /usr/lib/aliases would get
unwieldy and its more difficult to update that file on every host.

Another use I've found for it is to put domains that are relayed by a
particular site, and the site that relays them (or the path to the relay).
With this, we can handle CSNet, BITnet, MAILnet etc. and can be easily
extended without having to add loads of special purpose rules into
sendmail.cf.

I could post the diffs of the sendmail sources if people are interested.
Its not much in the way of actual differences.

Bruce
-- 

Bruce Israel

University of Maryland, Computer Science Dept.
{rlgvax,seismo}!umcp-cs!israel (Usenet)    israel@Maryland (Arpanet)