Hi,
thanks go to these peaople:
Jean-Francois Fortin <Jean-Francois.Fortin@matrox.com>
Jochen Bern <bern@penthesilea.uni-trier.de>
Bill Hebert <bhebert@nuc.berkeley.edu>
Leo Crombach <lcrombach@tropel.com>
"Roger E. Felder Jr. - ITG NY" <raj@itginc.com>
ORIGINAL QUESTION:
------------------
Hi,
last weekend, I disabled our old NIS master (running SunOS 4.1.3) and moved the
NIS master functionality to a fully patched 2.5.1 machine, which is also our
mail server (running sendmail 8.9.1). All other machines (except for the one
remaining SunOS box) run the stock Solaris 2.5(.1) or 2.6 sendmail.
BTW: We don't use NIS+, simply NIS !
I tried to follow the procedure move the NIS mater funtionality as described in
H. Stern "Managing NFS and NIS", but somewhere in the middle, I got problems, so
I ended up with a complete reinstall of the NIS master - which was not a big
deal.
However, after setting up the slaves, I realized, that the server does not
manage a map "mail.aliases" (all sendmails complain every hour: Jun 8 15:03:43
astarte sendmail[3436]: NOQUEUE: SYSERR(root): Cannot bind to map mail.aliases
in domain TerraData: no such map in server's domain: Bad file number).
I know, that I can disable NIS for aliases in /etc/nsswitch.conf, but that is
not the way, that I want to go.
Not having a map shouldn't be a problem: simply add the neccessary rules to the
Makefile in /var/yp, do a make and reinintialize the slaves...
Of course the rules for the alias map are already included in the Makefile, but
when I do a make, I get the following error:
/var/yp/TerraData/mail.aliases: 75 aliases, longest 107 bytes, 1794 bytes total
/usr/lib/netsvc/yp/mkalias /var/yp/`domainname`/mail.aliases
/var/yp/`domainname`/mail.byaddr;
Unable to open input database /var/yp/TerraData/mail.aliases
make: *** [aliases.time] Error 1
A truss on the $(MKALIAS) shows clearly, that a file is missing:
open("/var/yp/TerraData/mail.aliases.pag", O_RDONLY) Err#2 ENOENT
After the make, I find 2 files in /var/yp/`domainname`:
-rw-r--r-- 1 root other 3612 Jun 8 15:37 mail.aliases
-rw-r--r-- 1 root other 40960 Jun 8 15:37 mail.aliases.db
This is the relevant part of the Makefile in /var/yp:
aliases.time: $(ALIASES)
@cp $(ALIASES) $(YPDBDIR)/$(DOM)/mail.aliases;
@/usr/lib/sendmail -bi -oA$(YPDBDIR)/$(DOM)/mail.aliases;
$(MKALIAS) $(YPDBDIR)/$(DOM)/mail.aliases $(YPDBDIR)/$(DOM)/mail.byaddr;
@rm $(YPDBDIR)/$(DOM)/mail.aliases;
@touch aliases.time;
@echo "updated aliases";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.aliases; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.byaddr; fi
@if [ ! $(NOPUSH) ]; then echo "pushed aliases"; fi
Looks like a conflict between sendmail 8.9.1 and NIS (which expects the old
Solaris sendmail) and a conflict between different database formats.
Unfortunately, the old sendmail does not understand the new /etc/sendmail.cf...
Any ideas, what is going wrong ? And how to fix it ??
SOLUTION:
---------
R.E. Felder suggested this:
1. $ALIASES should be /etc/mail/aliases.
2. Remove the line reading @/usr/lib/sendmail -bi
-oA$(YPDBDIR)/$(DOM)/mail.aliases;
from the aliases.time target
3. Double check to make sendmail.cf performs an autorebuild.
This will remove the conflict and get you going.
And Leo crombach suggested this:
I think your problem may be related to a bug (bug ID 1262695) with the
NSkit for Solaris. I did the same thing a couple of years ago and had to
modify the /var/yp/Makefile aliases section to contain the following lines:
#Adding the two lines beginning with $(MAKEDBM) based on bug ID 1262695
#lbc 5/21/97
aliases.time: $(ALIASES)
@cp $(ALIASES) $(YPDBDIR)/$(DOM)/mail.aliases;
@/usr/lib/sendmail -bi -oA$(YPDBDIR)/$(DOM)/mail.aliases;
$(MAKEDBM) -u $(YPDBDIR)/$(DOM)/mail.aliases >
$(YPDBDIR)/$(DOM)/mail.aliases.text;
$(MAKEDBM) $(YPDBDIR)/$(DOM)/mail.aliases.text
$(YPDBDIR)/$(DOM)/mail.aliases;
$(MKALIAS) $(YPDBDIR)/$(DOM)/mail.aliases $(YPDBDIR)/$(DOM)/mail.byaddr;
@rm $(YPDBDIR)/$(DOM)/mail.aliases;
@touch aliases.time;
@echo "updated aliases";
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.aliases; fi
@if [ ! $(NOPUSH) ]; then $(YPPUSH) -d $(DOM) mail.byaddr; fi
@if [ ! $(NOPUSH) ]; then echo "pushed aliases"; fi
Both suggestions did not help directly, but they pointed me into the right
direction: after all, I ended up running the old Solaris sendmail with it's old
configuration file instead of sendmail 8.9.1 for generating the alias map (it is
always good to keep copies of the old programs - you never know, if and when you
need them...)
Now /var/yp/Makefile looks like this:
@/usr/lib/sendmail.old -C/etc/mail/sendmail.cf.old -bi
-oA$(YPDBDIR)/$(DOM)/mail.aliases;
instead of this:
@/usr/lib/sendmail -C/etc/mail/sendmail.cf -bi
-oA$(YPDBDIR)/$(DOM)/mail.aliases;
This did the trick. That should not be a problem, because the old sendmail is
used only for building the alias map and for nothing else.
Furthermore, I have enabled the auto rebuild of the alias data base in
/etc/sendmail.cf, so I should always have an up-to-date alias list.
Of course, now I need to reinitialize the slaves servers to make them use the
"new" map (if my users give me time and let me work on the machines ;-).
Thank you all,
Stefan
,,,
(o o)
--------------------------------o0Oo-(_)-oO0o---------------------------------
Stefan Voss Phone: 0049 / (0)5130-9775-51
System and Network Administration Fax: 0049 / (0)5130-9775-10
TerraData Geophysical Services GmbH e-mail: s.voss@terradata.de
Zoellners Garten 1
D - 30900 Wedemark/Bissendorf, Germany
This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:21 CDT