Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!seismo!rutgers!soliloquy.rutgers.edu!dpz
From: dpz@soliloquy.rutgers.edu (David P. Zimmerman)
Newsgroups: comp.mail.misc
Subject: UCB sendmail coexisting with Sun YP
Message-ID: <791@soliloquy.rutgers.edu>
Date: Fri, 10-Jul-87 12:30:18 EDT
Article-I.D.: soliloqu.791
Posted: Fri Jul 10 12:30:18 1987
Date-Received: Mon, 13-Jul-87 01:15:47 EDT
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 70
Keywords: yee hah


I have been trying to get sendmail to coexist peacefully with Sun's YP
service, and ran across something that I thought exceedingly weird.  I
am hoping someone can explain the meaning of it.

Some background: We use UCB sendmail in place of the Sun sendmail, and
have symbolic links from /usr/lib/aliases.{dir,pag} to their
counterparts down in /usr/etc/yp/domainname.  For the clients, slave
servers, and clients of the slave servers, we have MX records pointing
to the master server.

After modifying /usr/lib/aliases and doing a "make aliases" in
/etc/yp, the ypxfr would die with a "no local order number" message.
Likewise, the ypxfr_2perday mail.aliases call on the slave servers
would die, complaining that it couldn't find out who the master server
of the map was.  I understand why, but don't like any of it.

Following this is a diff of my changes to sendmail that seems to work
for both sendmail and YP, but I am not confident about it, seeing how
this scheme of mallocing an extra byte is used in many other places in
sendmail.  My problem is that /etc/yp/makedbm "corrects" the key
length (I call "makedbm -u | makedbm -" in /etc/yp/Makefile to get the
YP info in there).  Could someone explain that extra byte?  If it is
necessary, I think I can hack around it.  Thanks...

						dpz

***
alias.c.BEFOREDPZ   Wed Mar 25 21:54:24 1987
--- alias.c     Tue Jul  7 20:44:09 1987
***************
*** 137,143

        /* create a key for fetch */
        lhs.dptr = name;
!       lhs.dsize = strlen(name) + 1;
        rhs = fetch(lhs);
        return (rhs.dptr);
  # else DBM

--- 137,143 -----

        /* create a key for fetch */
        lhs.dptr = name;
!       lhs.dsize = strlen(name);
        rhs = fetch(lhs);
        return (rhs.dptr);
  # else DBM
***************
*** 488,495
                **  Insert alias into symbol table or DBM file
                */

!               lhssize = strlen(al.q_user) + 1;
!               rhssize = strlen(rhs) + 1;

  # ifdef DBM
                if (init)

--- 488,495 -----
                **  Insert alias into symbol table or DBM file
                */

!               lhssize = strlen(al.q_user);
!               rhssize = strlen(rhs);

  # ifdef DBM
                if (init)
-- 
David P. Zimmerman           rutgers!dpz           dpz@rutgers.edu