abrams@bnlux0.bnl.gov (The Ancient Programmer) (08/20/88)
We here at BNL have a VAX780 running an Ultrix system. It has sendmail, and has BITNET, INTERNET and UUCP connections. What would be the advantage, if any, of implementing smail on our system? -- INTERNET: abrams@bnlux0.bnl.gov BITNET: abrams@bnlux0.BITNET UUCP: ...philabs!sbcs!bnlux0!abrams
vixie@decwrl.dec.com (Paul Vixie) (08/22/88)
WARNING: this is very long and overly verbose. Skip to the summary at the
end if you want to know what I'm talking about without reading the
whole thing.
# What would be the advantage, if any, of implementing smail on our system?
Smail is linked functionally into your MTA by replacing or front-ending two
other components:
/bin/rmail
This is run whenever a mail message comes in over UUCP, with command
line arguments giving the "envelope recipients" of the message, and
the standard input set to the message text itself. As part of the
installation of Smail, you do something like this:
mv /bin/rmail /bin/rmail.old
ln /bin/smail /bin/rmail
This causes "smail" to be run for incoming mail messages, except that
it can check its argv[0] to see that it was actually executed as
"rmail". In this mode, it looks at the envelope recipients and tries
to see if they are destined for one of your direct UUCP neighbors.
(Wait. Does it do a lookup on /usr/lib/mail/paths here? I forget.)
If so, smail ("rmail") calls "uux" to queue the message up for the
"rmail" command on your UUCP neighbor. If not, it calls "sendmail",
which will either deliver the message locally (by calling /bin/mail)
or queue it up for some other mail transport, possibly UUCP but more
likely SMTP if it isn't local and it got that far.
This first link is basically a performance improvement, since the
sendmail program is very large and if pass-through UUCP mail can be
passed through without starting up sendmail, it's less work for your
system. If you don't replace "rmail" with a link to "smail", all
your incoming mail will go to sendmail, which is a performance hit
but causes no loss of function.
/bin/smail
This is run in sendmail.cf instead of running "uux" in the "Muucp"
or "Muux" or whatever you call your UUCP mailer. Its arguments and
options are a little different from uux, which is why the "smail"
kit comes with its own sendmail.cf. (You can just grab the relevant
lines from smail's sendmail.cf if you have a sendmail.cf of your own
that you like; this is often needless paranoia, since the sendmail.cf
that comes with smail does pretty much everything you could want.)
This gains you two things, one incredibly important, one merely
convenient. I'll list incredibly important one first, in great big
capital letters, since many people don't know it's even an issue:
SMAIL DOES NOT REWRITE THE HEADER SENDER ("From:" line)
Sendmail, unless hacked, cannot treat the "From:" line differently
than it treats the "From " line. (The "From:" line is in the headers,
and the "From " line is the first line of the message, neither a
header nor message text. We call the "From:" line the "header sender"
and the "From " line the "envelope sender". The "From " line is
often written as "the From_ line" to save on quote-marks).
Because sendmail treats the envelope sender and the header sender the
same way, it causes Bad Things to happen to mail as it is sent out
over UUCP. The envelope sender, you see, has to have the system's
UUCP name added to the front of it, in case the message has to be
returned to the sender. So if a message comes into site "decwrl"
with a From_ line of
From vixie!paul Sun Aug 21 22:03:00 PDT 1988
(please, nobody yell because the date is in the wrong format!)
It has to be changed to read:
From decwrl!vixie!paul Sun Aug 21 22:03:00 PDT 1988
But we don't want to do this to the "From:" header. Imagine:
From: paul@vixie.sf.ca.us (Paul Vixie)
becomes:
From: decwrl!paul@vixie.sf.ca.us (Paul Vixie)
This is wrong, for many reasons, which I will not detail here.
So, why is smail important? Because when you use smail, it can change
the envelope sender without mucking up the header sender. This is
the most important reason to use smail. I recommend installing smail
even if you have no better reason and don't use any other feature.
There is another feature, though. Automatic routing. Once you get
smail hooked into your sendmail.cf file, you tell your sendmail.cf
to send not just UUCP traffic, but all non-local traffic that you
can't think of a good reason to hand off to SMTP or BITNET or which-
ever.
So, with sendmail handing off all to smail non-local traffic it
can't deal with any other way, smail gets to look for a route to
anything that your system doesn't talk to directly. So you can
send mail to "decwrl!vixie" (or vixie@decwrl, but that's another
battle for another day) and even if (as is likely) your system
doesn't talk to "decwrl" directly, smail will poke around in its
routing database and discover that although you don't talk to
"decwrl", you do talk to "lll-winken" (or whatever) who talks to
"pacbell" (or "ames") who in turn talks to "decwrl". So the "uux"
command that smail runs for you (that's the point, remember: to
run a "uux" command) says something like
uux - -r -z (lll-winken!pacbell!decwrl!vixie)
You need a pathalias database for this. Ask in a separate note if
you need to know what this is and how to get one on your system.
Summary:
Sorry this is so long, I've had too much sugar tonight. But the
short version of the answer to "why should I install smail" is:
(1) to save CPU cycles on pass-through UUCP traffic (OPTIONAL)
(2) to make your system able to get mail to any registered UUCP
site as though you had a direct UUCP connection to them (OPTIONAL)
(3) to keep sendmail from destroying mail headers (VERY IMPORTANT)
There is no other easy way to accomplish (3). (1) and (2) are nice
to have but you can live without them, even if you install smail to
fix (3) but don't want (1) and (2).
--
Paul Vixie
Digital Equipment Corporation Work: vixie@dec.com Play: paul@vixie.UUCP
Western Research Laboratory uunet!decwrl!vixie uunet!vixie!paul
Palo Alto, California, USA +1 415 853 6600 +1 415 864 7013chad@anasaz.UUCP (Chad R. Larson) (08/23/88)
In article <605@bnlux0.bnl.gov> abrams@bnlux0.UUCP writes: > >...What would be the advantage, if any, of implementing smail >on our system? Actually, I've been following the flame war...um...spirited discussion that has been going on in this group for some time now. I am at a small, UUCP only site. I hoped just by listening I would get educated on domain mailings, smail, sendmail, Internet et al. Mostly, however, I've been getting confused. For example: It seems pretty obvious (but apparently only to me) that an explicit bang path should never be messed with. If a site foo doesn't have a direct connection to bar in the path "...!foo!bar!baz..." it should bounce the mail back to the originator, not try to figure out a way to baz. Otherwise, the sender will never know his chosen path is no good and he will not be encouraged to improve it. It seems equally obvious that given a domain address, even one of the pseudo ones (chad@dcfinc.UUCP) the site should take its best shot at an optimal path to the terminal address. Mail originators should be where the decision on what form of address to use is made. We UUCP sites would be good citizens if we used the pathalias database on all our originated mail, but don't all have access to it. Gateways should be the ones (and only ones) who translate paths from one style to another, as they are the ones who know both side's requirements best, and already accepted that responsibility when they agreed to be a gateway. [ A personal observation aside: It seems the whole froth is kicked up because of Internet requirements. We UUCP'ers got along just fine, and our mail went where we wanted it until accomodations for "that other" network were implemented. From where I sit and watch, it seems the Internet people are of the "do it my way or I'll take my ball and go home (pull the interconnection plug)" school of thinking. If I were intemperate, I'd say "Fine, write when you get work". In the meantime, the UUCP'ers say "Any network has to be able to accomodate me with my desktop computer running only whatever came out of the box", which seems patently silly given good public-domain software for them. They _do_ read the news, after all. ] Anyway, these comments are meant to be provocative, but not mean spirited and are not made in anything like anger. I'm just confused (bemused?). Since I suspect many are like me in that regard, could someone please offer a short course "UUCP in the 20th Century" or "Mail networks 101" explaining smail, sendmail, ARPA/UUCP gateways, annon FTP, and how it all is supposed to fit together? Why would I want to install smart mailer software on my machine? Which ones would I want? Post if you think your comments have widespread interest (or you want to drive the volume even higher), else e-mail me at the address below. Thanks, and excuse me while I go look for the Halon fire-extinguisher. -crl --------------- "I read the news today, oh boy!" --John Lennon =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | DCF, Inc. | UUCP: ...noao!mcdsun!nud!anasaz!dcfinc!chad | | 14623 North 49th Place | Ma Bell: (602) 953-1392 | | Scottsdale, AZ 85254 | Loran: N-33deg37min20sec W-111deg58min26sec | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | Disclaimer: These ARE the opinions of my employer! | =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
mouse@mcgill-vision.UUCP (der Mouse) (09/02/88)
In article <1196@anasaz.UUCP>, chad@anasaz.UUCP (Chad R. Larson) writes: > A personal observation aside: It seems the whole froth is kicked up > because of Internet requirements. We UUCP'ers got along just fine, > and our mail went where we wanted it until accomodations for "that > other" network were implemented. The Internet got along just fine, and its mail went where it was supposed to go, until all those silly other networks came along and barged into the act. To them, it no doubt seems the whole froth is kicked up because of those silly.... > ....UUCP'ers say[ing] "Any network has to be able to accomodate me > with my desktop computer running only whatever came out of the box", > which seems patently silly [...]. der Mouse old: mcgill-vision!mouse new: mouse@larry.mcrcim.mcgill.edu