Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!ames!hao!woods From: woods@hao.UUCP Newsgroups: comp.mail.uucp Subject: smail(8) questions Message-ID: <550@hao.UCAR.EDU> Date: Wed, 25-Feb-87 15:01:33 EST Article-I.D.: hao.550 Posted: Wed Feb 25 15:01:33 1987 Date-Received: Fri, 27-Feb-87 22:38:57 EST Organization: High Altitude Obs./NCAR, Boulder CO Lines: 73 Keywords: rmail vs. smail, local mailer interface, From lines I have finally gotten smail(8) installed (2.3), and running the way we want it to. To do so, I had to make a couple of modifications to the source. Somehow I feel that there must be a better way to get it to do what I want than this, but I could not find it. This question is intended for those who have looked at the source, as it mentions some specific source mods that I have made. However, the general discussion may be of interest to anyone running or considering running smail(8) on a machine that speaks both uucp and SMTP, as it has to do with gatewaying from uucp to and from a quite extensive SMTP-based network. A little background: hao is a backbone host on uucp/Usenet, and as such we pass a lot of traffic that both comes in and goes out over uucp. We also serve as a uucp gateway to our SMTP network (some of which is connected via a local Ethernet, some of which are remote sites connected via a TCP satellite hookup, and some of which are TCP over a "fuzzball" (I don't know exactly what a fuzzball is, but I know it connects to a high speed ground based network). All three of these types look like one big Ethernet with subnets. As far as the mail system is concerned, they are one fully-connected network. We pass netnews to a number of these sites by running uucp on top of TCP/IP using uucpd(8) protocols. Before I hear about NNTP, I should point out that we did it this way because it required zero time for software installation beyond netnews itself. We have no time for installing new transport systems and netnews protocols. So, here are the problems. First, all mail originating from the hao machine itself going out over uucp had a From line that looked something like From hao.UUCP!woods [date] remote from hao This resulted in mail being returned to hao!hao.UUCP!woods. While this is no big problem, it's a nuisance, so I changed the code in headers.c after the "case UUCP:" line, which is where it tacks the host name onto the front of the user name, to omit doing so if the hostname is "hao.UUCP". This seems kludgy, especially since I will have to change it again when our domain name officially changes to UCAR.EDU (which should happen sometime after the next mod.map posting comes out, which should have UCAR.EDU listed). However, the kludge does work, because now I get "From woods [date] remote from hao", which is what I want. Has anyone else seen this problem and/or have a better way around it? The second problem is that, since smail takes the place of rmail, any mail coming in for hao!host!user would never get passed to sendmail. This creates two problems: a minor one, in that mail coming in as a reply to a netnews article, which might be addressed to "hao!localhost!user", would get stuffed into the uucp queue, when in fact an SMTP connection to "localhost" exists. Since we don't connect to them until after hours, mail was unnecessarily delayed. A more major problem is that if "localhost" doesn't happen to be one of those netnews hosts, smail/rmail is unable to deliver it, even with RETRY, since those local hosts are not in our L.sys file. They do appear in the pathalias database, but they are "@" networks and rmail does not seem to get the mail there properly. To fix this, I changed main.c so that if it is called as "rmail", the -L flag (always call local mailer) is always set (handle=NONE). This works, because sendmail will route messages to smtphost!user via SMTP, and uucphost!user ends up getting passed back to smail (called as "smail" this time instead of "rmail", so that it will end up calling "uux uucphost!rmail" as it should). This is inefficient, because it requires a call to sendmail for EVERY message that comes in over uucp, most of which then require a second call to smail and could have been delivered by a simple uux call. I first tried defining RETRY to be a call to sendmail (the default is to call "smail -r" to do auto-routing). This worked when the address was valid, since uucphost!user would call uux directly, and etherhost!user would call uux, fail, and then call sendmail which would deliver it. Unfortunately, addresses like "nosuchhost!user" resulted in an infinite loop, since uux would fail, sendmail is called for RETRY but can't deliver it, so it calls smail, uux fails, sendmail is called, etc. The question then is: how can I set up smail so that it doesn't have to call sendmail for EVERY message that comes in over uucp, but also avoid infinite loops? Any hints and/or discussion is welcome. --Greg -- UUCP: {hplabs, seismo, nbires, noao}!hao!woods CSNET: woods@ncar.csnet ARPA: woods%ncar@CSNET-RELAY.ARPA INTERNET: woods@hao.ucar.edu