Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!crdgw1!uunet!comp.vuw.ac.nz!asjl From: Andy.Linton@comp.vuw.ac.nz (Andy Linton) Newsgroups: comp.unix.aix Subject: Re: AIX sendmail problem Message-ID: <1991Mar28.031750.10185@comp.vuw.ac.nz> Date: 28 Mar 91 03:17:50 GMT References: <759@bcstec.boeing.com> Sender: news@comp.vuw.ac.nz (News Admin) Reply-To: Andy.Linton@comp.vuw.ac.nz Distribution: na Organization: Computer Science, Victoria University, Wellington, NewZealand Lines: 49 Nntp-Posting-Host: bats.comp.vuw.ac.nz Originator: asjl@bats.comp.vuw.ac.nz In article <759@bcstec.boeing.com>, ced@bcstec.uucp (Charles Derykus) writes: |> I note that sendmail on "777sup1" has apparently munched the |> "s" in its hostname as evidenced by the line: |> |> "777 up1.ca.boeing.com Sendmail AIX...." |> |> Other names with 3 initial digits suffer the same fate. This message occurs because of a bug in (feature of) the routine message() which lives in err.c in sendmail. This routine is used to print out messages from inside sendmail. The comment from the code follows: ** MESSAGE -- print message (not necessarily an error) ** ** Parameters: ** num -- the default ARPANET error number (in ascii) ** msg -- the message (printf fmt) -- if it begins ** with a digit, this number overrides num. ** a, b, c, d, e -- printf arguments ** ** Returns: ** none ** ** Side Effects: ** none. */ The comment about side effects is dubious (:-) The offending code is in another routine called fmtmsg() which is called by message. If the first three characters of the message are digits, they get used as the reply code and the fourth character is discarded. /* output the reply code */ if (isdigit(fmt[0]) && isdigit(fmt[1]) && isdigit(fmt[2])) { num = fmt; fmt += 4; } Try using a hostname with 2 leading digits to confirm. This is a bug which is exercised by the decision in rfc1123 to allow hostnames which start with a digit. Previously '777sup1.ca.boeing.com' would not have been a valid name and so the problem would not have arisen.