[comp.mail.misc] Training MMDF to use pathalias data

sean@utodaycom (Sean Fulton) (11/16/90)

I had a bit of trouble figuring out how to train MMDF (shipped with my
SCO Unix 3.2.2) to use pathalias data. Everything kept getting dumped
to my ``badhost'' connection, which happened to be UUNET and happens
to cost money (hey, we're cheap, I admit it).

I finally figured it out, got it working, and figured I'd share this
recipe with anyone else who is interested. If you have any better
suggestions or ideas, please post or mail. I've seen a bunch of people
bitching about MMDF (SCO's implementation), and, having solved this
problem, I really can't see why.

At any rate, here it is. I make no gurantees, so don't blame me if you
lose mail. Also, I am not associated with SCO, nor do I endorse
their products.

-------v-------v------v--CUT HERE--v-----v--------v--------v


To configure MMDF so that it will route according to pathalias data,
you'll need a copy of the supplemental manual pages SCO recently
posted to sco-list describing examples of various MMDF configurations.
The pertinent example here is:

	fred--(UUCP)--barney

	Although the ``badhosts'' option should also be installed for
those connected to UUNET or a smart mail handler.

	You will also need a copy of the pathalias output,
specifically:

site	path!to!site!%s			cost

	1) Strip the cost off the pathalias data and if ``site''
includes leading dots (.site), strip them off as well. Put this in a
file called uucp.1

	2) Configure your system according to SCO instructions for
connecting UUCP sites. If you install the ``badhosts'' option, you'll
want to make sure everything meant for pathalias doesn't get dumped on
your smart host. 

	3) In the file ~/table/uucp.chn, put:

	mysite	mysite!%s
	mysite.UUCP	mysite!%s
	neighbor1.UUCP	neighbor1!%s

	... etc.
	There is a tool in ~/table/tools that will make this file
using your /usr/lib/uucp/Systems file, you can use this. 

	4) Move ~/table/uucp.chn to ~/table/uucp.top

	5) Edit the file ~/root.dom NOT THE WAY SCO TELLS YOU!
	Their example shows com, edu, mil, etc., all getting routed to
uunet.UU.NET. Instead, list each of the domains they give you as
examples with *your site* as the handler. IE:

com	mysite.UUCP
mil	mysite.UUCP
gov	mysite.UUCP
edu	mysite.UUCP

	Use your wisdom here. What happens is that when deliver gets a
message to ``user@site.com'', it immediately looks in ~/table/root.dom
to figure out where to send it. If you uncomment the example SCO gives
you, all this stuff will go to uunet.UU.NET, and never reach your
pathalias data.

	6) cp ~/table/uucp.top ~/table/uucp.chn
	   cat uucp.1 >>~/table/uucp.chn
	   ~/table/dbmbuild

	You're done!

	Once you have the initial setup running, you can write a
script for cron (su mmmdf) that will cut your pathalias data, move
uucp.chn uucp.old, then do item #6 above weekly, nightly or whatever.

	THe important thing to remember is that submit will look in
root.dom for the trailing domain name, then use the right-hand-side
method to get there. When it sees ``mysite.UUCP'' sees that it's a
uucp job and runs over to uucp.chn for appropriate routing.

-- 
Sean Fulton					sean@utoday.com
UNIX Today!					(516) 562-5430
 /* The opinions expressed above are not those of my employer */

david@twg.com (David S. Herron) (11/21/90)

Note that I wrote a program ages ago (process-uucp?) which is in
both the MMDF source & in comp.sources.unix whose purpose is to
process pathalias output into UUCP channel & domain tables.  A problem
is that, since it was written on a BSD machine, it uses longish file
names and ((*^*&^*&^) SCO strictly enforces the 14 character limit.
But the version of process-uucp (renamed to some other name) that
SCO provides doesn't (or so I hear) correct this problem :-(.

A simple hack, which I will do when/if I have the time, is to fix
it so you specify tables as "table-name:file-name" on the command
line.  This is good in two ways -- so that you can avoid long file
names, and so that the admin gets to specify file-name's mnemonic
to him/her as opposed to being mnemonic to *me*.  If someone wants
to save me the effort, please be my guest ;-)  (Just make sure that
I get a copy of the results..)


-- 
<- David Herron, an MMDF & WIN/MHS guy, <david@twg.com>
<- Formerly: David Herron -- NonResident E-Mail Hack <david@ms.uky.edu>
<-
<- Use the force Wes!