LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Enterprise (https://www.linuxquestions.org/questions/linux-enterprise-47/)
-   -   Sendmail ignoring NIS aliases (https://www.linuxquestions.org/questions/linux-enterprise-47/sendmail-ignoring-nis-aliases-453001/)

flgal3 06-08-2006 06:48 PM

Sendmail ignoring NIS aliases
 
I think I've tried everything from /etc/mail/service.switch to ALIAS_FILE=nis:mail.aliases.

Nothing seems to be helping sendmail on a Redhat WS 3 client use aliases defined in a NIS map.

The client is definitely bound to the NIS server and a ypcat -k of the aliases map lists out the proper aliases. Yet, the only way I can get sendmail to recognize any non-standard aliases is to edit the client's local /etc/aliases file.

I'd really rather not have to maintain this file on all the clients.

Any suggestions are greatly appreciated.

Thank you!!!

flgal3 06-16-2006 03:44 PM

Please - any suggestions are welcome
 
Come on people. I know somebody out there must know what I'm talking about here. I'll take any suggestion or idea you can give me. It seems other folks have certainly gotten this to work.

Thank you in advance!!!!:confused:

vimal 08-29-2007 08:36 AM

Hello there....


We can configure Sendmail to use different alias files, the service will be using '/etc/aliases' by default. You will have to define the 'ALIAS_FILE' directive in the sendmail config: file '/etc/mail/sendmail.mc'.

Your configuration file will have the default value set :

define(`ALIAS_FILE', `/etc/aliases')dnl

If you want Sendmail to use the NIS database, you will have to specify it in the following format :

1) Please edit your sendmail configuration file '/etc/mail/sendmail.mc' and change the default directive from

" define(`ALIAS_FILE', `/etc/aliases')dnl " to " define(`ALIAS_FILE',`nis:mail.aliases@nisdomainname')dnl ".

2) Rebuild the Sendmail database by issuing the command :

# make -C /etc/mail

3) Restart the Sendmail service by :

/etc/init.d/sendmail restart

4) Edit the '/etc/nsswitch.conf' file and change :

" aliases: files " to " aliases: nis files "


We had these settings done on a redhat machine which was configured as an NIS client.The user accounts and aliases were only present on the NIS server. As per the above configuration, Sendmail on the NIS client machine was configured to use the aliases from the NIS database of the NIS server. The setup worked fine...

Please feel free to contact me in case.

Regards,

Vimal Kumar

goldrnr 01-08-2010 08:04 AM

Quote:

Originally Posted by vimal (Post 2874590)
Hello there....

We can configure Sendmail to use different alias files, the service will be using '/etc/aliases' by default. You will have to define the 'ALIAS_FILE' directive in the sendmail config: file '/etc/mail/sendmail.mc'.

Your configuration file will have the default value set :

define(`ALIAS_FILE', `/etc/aliases')dnl

If you want Sendmail to use the NIS database, you will have to specify it in the following format :

1) Please edit your sendmail configuration file '/etc/mail/sendmail.mc' and change the default directive from

" define(`ALIAS_FILE', `/etc/aliases')dnl " to " define(`ALIAS_FILE',`nis:mail.aliases@nisdomainname')dnl ".

2) Rebuild the Sendmail database by issuing the command :

# make -C /etc/mail

3) Restart the Sendmail service by :

/etc/init.d/sendmail restart

4) Edit the '/etc/nsswitch.conf' file and change :

" aliases: files " to " aliases: nis files "


Please feel free to contact me in case.

Regards,

Vimal Kumar

--

Thanks alot for this information, this pointed me to finalizing our mailservers overhere.

actually I wanted to use both files and nis aliases, this I achieved
by:
define(`ALIAS_FILE', `nis:mail.aliases@asml.nl,/etc/aliases')dnl

perhaps it's even nicer to switch both nis and /etc/aliases to reflect
the default in nsswitch.conf (files nis)

regards,
Goldrnr


All times are GMT -5. The time now is 03:30 AM.