Date: Sun, 29 Sep 1996 00:10:08 -0400 (EDT) From: Bill Paul <wpaul@skynet.ctr.columbia.edu> To: ccote@gandalf.ec.camitel.com (Claude Cote) Cc: current@freebsd.org Subject: Re: Problems with mail-aliasing using NIS Message-ID: <199609290410.AAA09193@skynet.ctr.columbia.edu> In-Reply-To: <199609290322.XAA06124@gandalf.ec.camitel.com> from "Claude Cote" at Sep 28, 96 11:22:22 pm
next in thread | previous in thread | raw e-mail | index | archive | help
Of all the gin joints in all the towns in all the world, Claude Cote had to walk into mine and say: > Hi, > > I have some problems with mail-aliasing using NIS. Here's the setup: > > - All the machines on the network shared the same /var/mail via NFS > (but the mail is processed locally); > - The NIS master holds the real (complete) /etc/aliases file; > - I have commented out the keyword "aliases" in /var/yp/Makefile > so the map mail.aliases get created when I type 'make' in /var/yp; I think you mean 'I uncommented the "aliases" keyword.' Doesn't make sense the other way. > - On the client side, I changed the following line in /etc/sendmail.cf: > > # location of alias file > O AliasFile=/etc/aliases,nis:mail.aliases I think the syntax is right. Lord knows sendmail would have complained if it wasn't. :) > and run newaliases; > - I rebooted everyone to be sure... You don't need to reboot, just restart sendmail. This isn't Windoze, you know. > Now, if I add the alias "toto" and do a "mail toto" on the server, This is not a complete description. Who is 'toto' aliased to? How did you add it? > it's ok. But if I do a "mail toto" on the client I got the following > message: > > toto... User unknown > > Here's the output of "ypcat mail.aliases": > > # ypcat mail.aliases > root > @ > root > root > root > postmaster > root > root > root > root > root > root > ccote > > is it ok? No, it's not okay: you should have done ypcat -k mail.aliases so that we could see the 'key' part of the aliases map too (the left side of the aliases database). From what you've shown here, I can't tell if the 'toto' alias is actually there. > BTW, the NIS master server is running -current of last Monday (23 sep) > and the clients are running 2.2-960801-SNAP. All the others NIS databases > (passwd, group, hosts, ...) are working just fine. You must have compiled -current yourself: check that the latest /var/yp/Makefile was installed (it's in the source tree as /usr/src/usr.sbin/ypserv/Makefile.yp). I'm a little suspicious of the spurious '@' in the output you showed; this may have been the result of bugs in the mkaliases script. This script is no longer used, so if it's still on your system, erase it, and if your /var/yp/Makefile still calls it, then it needs to be updated. > I have checked all the manpages, FAQ and handbook (the NIS section is > empty) without success :-( > > Anybody have a clue? You say you 'added' the toto alias on the server, yet you don't say exactly how. This makes it very hard for me to tell if you did it correctly. Bear in mind that you must add aliases like this: - Edit /etc/aliases - cd /var/yp; make /var/yp/Makefile should do the rest for you. You can confirm this by doing a yp_mkdb -u /var/yp/<your.domain>/mail.aliases (which dumps out the actual map database) or ypcat -k mail.aliases (which shows you both the key and data parts of the mail.aliases map via ypserv). Since you say it works on the server, it sounds like you updated the standard aliases database on the server but didn't actually update the mail.aliases NIS map. -Bill -- ============================================================================= -Bill Paul (212) 854-6020 | System Manager, Master of Unix-Fu Work: wpaul@ctr.columbia.edu | Center for Telecommunications Research Home: wpaul@skynet.ctr.columbia.edu | Columbia University, New York City ============================================================================= "If you're ever in trouble, go to the CTR. Ask for Bill. He will help you." =============================================================================
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609290410.AAA09193>