Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!sri-unix!teknowledge-vaxc!mkhaw
From: mkhaw@teknowledge-vaxc.ARPA (Mike Khaw)
Newsgroups: comp.unix.questions,comp.unix.wizards
Subject: sendmail alias strangeness
Message-ID: <19312@teknowledge-vaxc.ARPA>
Date: Wed, 2-Dec-87 21:15:27 EST
Article-I.D.: teknowle.19312
Posted: Wed Dec  2 21:15:27 1987
Date-Received: Sun, 6-Dec-87 07:36:57 EST
Organization: Teknowledge, Inc., Palo Alto CA
Lines: 45
Xref: mnetor comp.unix.questions:5179 comp.unix.wizards:5760

Today one of our systems people just added a number of aliases to
/usr/lib/aliases, ran newaliases, and all of a sudden sendmail no
longer recognizes some of the old mail aliases.  /usr/lib/sendmail -bv
thinks these aliases are OK, but if I try to telnet to port 25 to talk
to the smtp server and use "rcpt to:" it comes back with "User unknown".

I wrote the following short program, which verified that the "broken"
aliases are in fact in the aliases dbm file, and are what we think
they should be:

#include 
#include 

#define MAXKEY	20

main()
{
	datum	key,
		content;

	char	inbuf[MAXKEY + 1];

	dbminit("/usr/lib/aliases");

	while (printf("key? "), gets(inbuf) != NULL)
	  {
		key.dptr = inbuf;
		key.dsize = strlen(inbuf) + 1;
		content = fetch(key);
	        if (content.dptr == NULL)
			printf("oops\n");
		else
			printf("%s:\"%s\"\n", key.dptr, content.dptr);
	  }
}

What's going on?  (This is Ultrix 1.2 / VAX; sendmail identifies itself as
version 4.12/4.7)

Thanks,
Mike Khaw
-- 
internet:  mkhaw@teknowledge-vaxc.arpa
usenet:	   {uunet|sun|ucbvax|decwrl|uw-beaver}!mkhaw%teknowledge-vaxc.arpa
USnail:	   Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303