[comp.mail.sendmail] 5.61 wierdness on our machines

malc@tahoe.unr.edu (Malcolm L. Carlock) (07/07/89)

We are currently running an older version of sendmail here, which does
everything we need except for MX-handling.  Thus, I have been trying to
bring up sendmail 5.61 on two machines here, a Vax and a Tahoe, both
running BSD 4.3.  However, whenever I fire up 5.61, on either machine, I
see some seriously odd sendmail behavior.  To wit:

The two major problems:

- mail to user@host, where host is either a local ether host or a remote
  tcp host, fails with an "unknown host user@host" message.  This happens
  whether a name server is running or not.

- mail to local users (on the same machine), arrives with the headers
  looking like this:
  (I have indented the following text by a single tabstop)

	From malc Fri Jul  7 02:47:23 1989
	Ceived: by unrvax.unr.edu (5.61/smail2.5/10-13-87)
		id AA17962; Fri, 7 Jul 89 02:47:20 -0700
	Te: Fri, 7 Jul 89 02:47:20 -0700
	Om: 
	Ssage-`: <8907070947.AA17962@unrvax.unr.edu>
	`: 
	Bject: test
	Status: RO

I have tried running our current "old" sendmail in daemon mode, calling
the new sendmail as required.  Remote hosts are contacted correctly in
this case, and MX records are utilized (the big reason we are trying to
change over).  However, the headers arrive at the remote host munged as
shown above.  I've been wondering if the problem is in sendmail.cf, but
if it is, I'm stumped as to what it could be.  The current "old" sendmail
works fine with the .cf file we have now.

The libc.a on both machines has been updated based on the patches in
the bind 4.8 package.  However, the same 5.61 problems appeared using
the old version of libc.a as well.

The 4.3 machines I'm trying to bring 5.61 up on are a Vax 11/750 and
a Sperry 7000 (tahoe architecture).  5.61 produces the abovedescribed
oddities on both of these machines in precisely the same manner.  I did a
vanilla make depend/sendmail/install on both machines.

Any help in this matter would be greatly appreciated.


Malcolm Carlock

malc@unrvax.unr.edu
uunet!unrvax!malc

dws@cseg.uucp (David W. Summers) (07/07/89)

In article <2336@tahoe.unr.edu>, malc@tahoe.unr.edu (Malcolm L. Carlock) writes:
[...]
> 
> - mail to local users (on the same machine), arrives with the headers
>   looking like this:
>   (I have indented the following text by a single tabstop)
> 
> 	From malc Fri Jul  7 02:47:23 1989
> 	Ceived: by unrvax.unr.edu (5.61/smail2.5/10-13-87)
> 		id AA17962; Fri, 7 Jul 89 02:47:20 -0700
> 	Te: Fri, 7 Jul 89 02:47:20 -0700
> 	Om: 
> 	Ssage-`: <8907070947.AA17962@unrvax.unr.edu>
> 	`: 
> 	Bject: test
> 	Status: RO
> 

Malcom,
   I had the exact same problem with the headers when I tried converting over
to Xenix the other night.  I found the bug in the 'capitalize' function in
the 'util.c' file.  There is a reference to something like:

    *p++ = toupper(*s++);

   This doesn't work as the 'toupper' macro is implemented so as to use the
item inside the parenthesis twice, which produces the results you and I
obtained.  The change I made (that seems to work correctly) is:

   *p++ = toupper(*s);
   s++;

I think that the 'toupper' macro may be implemented differently on different
machines.  Maybe it is a function on the original machine instead of a 
macro.  Otherwise, I would suggest to implementors to never assume that macros
would correctly work on references with moving pointers.  (But you all
probably already knew that, didn't you!??? :-) :-)

- David Summers

David Summers               "Be Original!  Drink Dr. Pepper like everyone else!"
(dws@cseg.uucp)

David.W..Summers@livewire.FIDONET.ORG (David W. Summers) (07/08/89)

--  
David W. Summers - via FidoNet node 1:362/130.0
UUCP: ...!tiamat!livewire!David.W..Summers
INTERNET: David.W..Summers@livewire.FIDONET.ORG

malc@tahoe.unr.edu (Malcolm L. Carlock) (07/09/89)

-In article <2336@tahoe.unr.edu>, I wrote:
->[munged headers always, a la Bject, Om, Nder, etc.;
-> and "host unknown" for all off-host destinations]

In article <2736@cveg.uucp> dws@cseg.uucp (David W. Summers) writes:
- [in capitalize(), in utils.c, change
-   *p++ = toupper(*s++);
- to
-   *p++ = toupper(*s);
-   s++;
-
-I think that the 'toupper' macro may be implemented differently on different
-machines.

Sure enough, it's implemented as a macro in the 4.3 version we're using here.
Your fix did the trick.

I received a couple of suggestions via email concerning the "host unknown"
problem.  One suggestion:

-1) In ruleset 0, when you resolve an address, be sure to use the
-   fully qualified official domain name for the machine name (the
-   "$@" value).
-OR
-2) In the sendmail module "deliver.c", at about line 377 and again at
-   line 437, is code changing "_res.options".  (The lines are marked
-   with "/* XXX */")  Delete those two lines and recompile.  The lines
-   to be deleted are:
-   (at about line 377:
-      _res.options &= ~(RES_DEFNAMES | RES_DNSRCH);           /* XXX */
-   (at about line 437:
-   _res.options |= RES_DEFNAMES | RES_DNSRCH;      /* XXX */

I implemented the second solution, for the time being.

sendmail is working correctly now on both of the target machines.  Thanks (!)
to all who sent or posted replies.


Malcolm L. Carlock

malc@unrvax.unr.edu
uunet!unrvax!malc