Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Sep 1996 02:24:27 -0400 (EDT)
From:      Claude Cote <ccote@gandalf.ec.camitel.com>
To:        wpaul@skynet.ctr.columbia.edu
Cc:        current@FreeBSD.org
Subject:   Re: Re: Problems with mail-aliasing using NIS
Message-ID:  <199609290624.CAA06931@gandalf.ec.camitel.com>

next in thread | raw e-mail | index | archive | help

Hi Bill,

I'm very grateful for your help. Sorry for my bad English... it
sometimes makes me write things I don't really mean %-} So this time,
I'll try to make things a little more explicit.

>>     - 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.

In fact, what I really mean is that I appended aliases to the rule
all, like this:

        all:  master.passwd passwd hosts group networks protocols rpc \
              services servers netid aliases

>>    - 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. :)

Undoubtedly :-)

> You don't need to reboot, just restart sendmail. This isn't Windoze,
> you know.

Hopefully!

I used to send signals, but since nothing was working, I decided to
reboot (to be sure that no esoteric forces was taking over the
machine ;-)

> This is not a complete description. Who is 'toto' aliased to? How did
> you add it?

I simply added the following line at the end of the original /etc/aliases:

toto: ccote

In French, toto means foobar... it's just a test. Obviously, ccote is
a valid user on the system.

> 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.

Oops! Here's the output of ypcat -k mail.aliases:

ingres root
@ @
bin root
postmaster root
webmaster root
mailer-daemon postmaster
nobody root
daemon root
toor root
games root
system root
uucp root
toto ccote

>> 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

I make a diff and it's the good one.

> /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.

Ok, I move mkaliases. But it doesn't appear in /var/yp/Makefile anyway.

Cut from /usr/src/usr.sbin/sendmail/RELEASE_NOTES:

        Check for @:@ entry in NIS maps before starting up to avoid  
                (but not prevent, sigh) race conditions.  This ought to
        ...
        Fix a problem that caused aliaswait to go into infinite recursion
                if the @:@ metasymbol wasn't found in the alias file.

> - Edit /etc/aliases
> - cd /var/yp; make
>

Here's the output of the above commands:

NIS Map update started on Sun Sep 29 01:29:22 EDT 1996 for domain gandalf
Updating mail.aliases...
/etc/aliases: 12 aliases, longest 10 bytes, 131 bytes total
Pushed mail.aliases map.
NIS Map update completed.

> /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).

The command ypcat -k mail.aliases give me the same result than above
and yp_mkdb -u /var/yp/gandalf/mail.aliases in addition outputs the
following lines:

YP_OUTPUT_FILE /var/yp/gandalf/mail.aliases
YP_MASTER_NAME gandalf.ec.camitel.com
YP_LAST_MODIFIED 843974963
YP_INPUT_FILE /etc/aliases

> 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.

The dates of /etc/aliases, /etc/aliases.db and /var/yp/gandalf/mail.aliases 
all correspond, so it seems that the files have been updated correctly...

Maybe something is missing on the client side? I will keep on working...

And again, thanks for your help, it's greatly appreciated,

Claude

> -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?199609290624.CAA06931>