Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!mintaka!yale!think.com!zaphod.mps.ohio-state.edu!usc!elroy.jpl.nasa.gov!ncar!gatech!bloom-beacon!eru!hagbard!sunic!mcsun!ukc!mucs!cns!umaida!jf From: jf@ap.co.umist.ac.uk (John Forrest) Newsgroups: comp.mail.sendmail Subject: When to reverse domain addresses? Message-ID: <1990Nov16.155757@ap.co.umist.ac.uk> Date: 16 Nov 90 15:57:57 GMT Sender: usenet@cns.umist.ac.uk (News System) Reply-To: jf@ap.co.umist.ac.uk (John Forrest) Organization: UMIST Computation, Manchester, UK. Lines: 44 Neil Rickert has very kindly done some mods to the IDA cf file for me. The aim of this was to be able to conditionally reverse incomming mail addresses if required [remember, traditionally in the UK we do this backwards]. As an example, our relay might send us local names looking like "jf@uk.ac.umist.co.ap" which we reverse to give "jf@ap.co.umist.ac.uk". I suggested two specifications to him (depending on the required functionality locally). Spec 1 - Cope with incomming mail with reversed names. It after looking up the name in the various forms, the last element of the address is not a "top domain" (in CT?), and the first element of the address (after @) is, reverse and try again. Spec 2 - Allow local users to type mail reversed addresses. If after looking up the name in the various forms, the last element is not a "top domain", reverse and try again. He has implemented Spec 1, explaining that Spec 2 requires non-trivial modifications. We have so far not used the mods in anger, but they have worked in testing (both in -bt mode, and sample outgoing mail). However, we have suddenly realised that the function described is flawed, for the reasons several people here are finding out. Basically, consider: uk.ac.ucl.cs If we had this as an incomming mail, we would interpret this as being somewhere in Czechoslovakia, not as Computer Science at University College, London. Note we don't have direct access to the Internet, and our local name server contains (or will soon contain): *.cs. MX 0 ...... so we just assume anything in "cs." is to be relayed. Has anyone got a better algorithm that the above - really to detect whether the name is valid. The only things I can think of are: 1) Hardwire all the problem cases in one of the databases. 2) Let's give up sending reversed addresses around the UK. (please?) John Forrest Dept of Computation UMIST.