[comp.mail.sendmail] Need help with SMAIL 3.x

itkin@mrspoc.Transact.COM (Steven M. List) (05/14/91)

I admit that I'm not a wizard with Smail.  It works wonderfully and I'm
exceptionally glad that we've got it.  Now I have a small challenge -
I've moved a user from one host to another.  All within our own little
domain.  At some point the old host will go away.  So...

I'm trying to figure out how to have mail that arrives for:

    user@host1.Transact.COM

go to:

    user@host2.Transact.COM

without first going to the original host and being forwarded (either by
alias or .forward).

Eventually, I want to redirect ALL mail that is addressed to the original
host to an alternate host.  Basically, what I want to be able to do is:

    Intercept ALL mail for our domain on the main receiving host (mrspoc),
    strip off the host address information, and then send it to the 
    appropriate place either based on the aliases file or some other 
    mechanism. 

I've read about Smail's Routers and Transports and Directors and Methods
and I just don't think I've got it all.  Can anyone help me get this
set up?

Thanks!

Steven

P.S.  The version of SMAIL we have is "/\=-/\ Smail3.1.17.5 #17.6"
-- 
 +----------------------------------------------------------------------------+
 :                Steven List @ Transact Software, Inc. :^>~                  :
 :           Chairman, Unify User Group of Northern California                :
 :                         itkin@Transact.COM                                 :

lyndon@cs.athabascau.ca (Lyndon Nerenberg) (05/15/91)

itkin@mrspoc.Transact.COM (Steven M. List) writes:

>I'm trying to figure out how to have mail that arrives for:
>    user@host1.Transact.COM
>go to:
>    user@host2.Transact.COM
>without first going to the original host and being forwarded (either by
>alias or .forward).

If it's only for a few users, you're better off accepting the extra hop
and just using an alias. You could do it with some hairy processing in
routers and directors, but the hit on the gateway would be significantly
higher than if you just used aliases.

>Eventually, I want to redirect ALL mail that is addressed to the original
>host to an alternate host.  Basically, what I want to be able to do is:

This is much easier. To alias hosts, just add an entry at the TOP
of the routers file that does a pathalias lookup on a file containing
your host aliases. Something like this will do it:

host_alias:
		driver = pathalias,
		always,			# Override any other routes
		transport = smtp;	# ... or whatever

		file = host-aliases,	# in smail ${LIBDIR}
		proto = lsearch

Then, in the file ${LIBDIR}/host-aliases, add this line:

host1.transact.com	host2.transact.com!%s

This will redirect all mail for host1 to host2.

Given your description in the posting, it sounds to me like what you
really want to do is hide all (or most) of your machines under your
domain name. This is a good way to do things, since it simplifies
your mailer administration tasks a *lot*. Here's how we do it ...

We have a number of hosts under the cs.athabascau.ca domain. Once
machine (aupair.cs) is the gateway for this sub-domain. We have an
MX record for cs.athabascau.ca that points at aupair. We also have
MX records for all (well, most) of the rest of the machines in the
cs sub-domain that point to aupair. These machines are also configured
to punt any mail for a "local" user to the gateway (aupair). The result
is that no matter what machine you send e-mail from, if it is for a
user in the cs sub-domain, it gets forwarded to the gateway.

On the gateway we maintain a master alias file for all users with
accounts in the sub-domain. These aliases point to the actual machine
the user reads their mail on. Of course, a little bit of magic is
used :-)  If you look at the smail(5) man page, you will see that
there is a director called "real-user." In our alias file, we enter
each user as follows:

lyndon:		real-lyndon@<machine>.cs.athabascau.ca

The non-gateway machines will perform local delivery to an address
of real-<user>, although this is not (was not :-) known to our users,
bypassing any .forward file they might have installed (preventing
forwarding loops). We also do things like mount the gateway machines
/usr/spool/mail on a lot of our hosts via NFS. For those hosts, even
the real-user driver is disabled, and all "local" mail goes to the
gateway for local delivery.

Having done all of that, we have an environment where most, if not
all, hosts are equivelent as far as local e-mail delivery is
concerned. This lets us perform the final step. On all the machines
following this model, we set the visible_name attribute to
cs.athabascau.ca. Therefore, all mail originating from any of these
hosts shows the same return address in the From: header. Any replies
to this mail will automatically be sent to the gateway (modulo certain
braindead System V UA's) for processing. Also, the users are told to
specify "user@cs.athabascau.ca" as their e-mail address, regardless
of what machine they are on. The result is centralized control of e-mail
with very little administrative burden on the administrators (or users).

[ I hope this description is reasonably clear. I wrote it in a big
  hurry as I'm late for a meeting. If there is enough interest, I
  can shar up our config files and post them. ]

[ Also, note that followups are directed to comp.mail.misc. This
  has nothing to do with Elm ... ]

-- 
    Lyndon Nerenberg  VE6BBM / Computing Services / Athabasca University
           atha!cs.athabascau.ca!lyndon || lyndon@cs.athabascau.ca
                    Packet: ve6bbm@ve6bbm.ab.can.noam
      The only thing open about OSF is their mouth.  --Chuck Musciano