Linux - EnterpriseThis forum is for all items relating to using Linux in the Enterprise.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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...
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)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.