Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 alpha 4/3/85; site decuac.UUCP Path: utzoo!watmath!clyde!cbosgd!decuac!avolio From: avolio@decuac.UUCP (Frederick M. Avolio) Newsgroups: net.mail Subject: Re: colons in mail addresses (domains and UCB Mail) Message-ID: <511@decuac.UUCP> Date: Sat, 11-May-85 21:42:45 EDT Article-I.D.: decuac.511 Posted: Sat May 11 21:42:45 1985 Date-Received: Sun, 12-May-85 06:11:43 EDT References: <485@decuac.UUCP> <498@decuac.UUCP> <502@columbia.UUCP> <1801@topaz.ARPA> Organization: ULTRIX Applications Center, MD Lines: 99 Summary: Fix for UCB/mail's bad handling of addresses (domains) The original articles were relating to UCB mail and how it is too smart for its own good. The problem, in summary, is that ucb/mail tries to do address resolution based on assumptions which are probably not valid for your site. Chuck Hendrick shared some fixes he made. With domain addressing in mind, it becomes a big hassle when the mailer you are using garbles the address. I found this to be a very big problem when we switched over to domain-based address mail software. The following shows what happens... Using /usr/ucb/mail, I read my mbox and look at message #5. Please note the Mail heading fields From:, To:, and Cc: I removed the "Received-by lines to save space % mail -f "/usr/users/avolio/mbox": 5 messages & 5 Message 5: From mogwai!mogwai.UUCP!smith Fri May 10 18:01:09 1985 ~ Date: Fri, 10 May 85 16:52:37 edt From: smith@mogwai.UUCP (Jane Smith) Message-Id: <8505102052.AA08546@mogwai.UUCP> To: gang Subject: SUBJECT1 Cc: decuac!avolio, system, avolio@decuac.UUCP Status: RO Message follows... Note the local and non-local addresses and the "mixed notation" of paths in the Cc: line ABOVE Now I reply -- little r means to all on the list *except me* & r 5 To: mogwai:gang@uucp smith@mogwai.UUCP Subject: Re: News NEWS software Cc: avolio@decuac.UUCP mogwai:system@uucp ~q Interrupt & q Yuck, right? the "arpa-style" address for smith it got right. The local (on mogwai) addresses it screwed up. Why? Because 1) it doesn't handle dots the way we want and 2) it doesn't say "with regard to mogwai" the way we want. It *does* recognize decuac!avolio as *me* so it doesn't appear, but it does *not* recognize avolio@decuac.UUCP. Well I stayed up late and made changes to the code. I made the changes suggested by Chuck and a couple more. (I will not reproduce Chucks changes as they were previously posted. See references.) 1. I made all the changes Chuck suggested *with the exception of* tacking on a domain to the value of gethost after it is put into localhost. I left localhost with the value of gethost. This because I want "decuac!avolio", "avolio@decuac.UUCP", "avolio@decuac.DEC", all to be recognized as "me" and to be left off the address list. (BTW, Remember to take '.' off the list of metanet characters on line 59 of config.c.) 2. The only addition I made was a function called hostpart (takes a string and returns everything up to a NULL or a DOT). Then I replaced two strcmp's as follows > if (strcmp(np->nt_machine, hostpart(nbuf)) == 0) > if (!icequal(hostpart(cp), localhost)) Now, after these changes, I try the same example, this time with success. % mail -f "/usr/users/avolio/mbox": 5 messages & r 5 To: gang@mogwai.uucp smith@mogwai.UUCP Subject: Re: SUBJECT1 Cc: system@mogwai.uucp ~q Interrupt & q Notice that it correctly expands all of the addresses local to mogwai and it correctly leaves both "decuac!avolio" and "avolio@decuac.UUCP" off of the list of addressees. It works. -- Fred Avolio {decvax,seismo}!decuac!avolio 301/731-4100 x4227