Using NIS aliases in Sendmail
The default configuration for sendmail on RedHat family systems is to not use NIS for aliases. You can't over-ride this behavior by tweaking
/etc/nsswitch.conf like you can on any sensible system, you have to modify the
AliasFile= parameter in your
/etc/mail/sendmail.cf:
# location of alias file
O AliasFile=/etc/aliases,nis:mail.aliases@YOUR-NIS-ZONE
If you are rolling from
sendmail.mc:
define(`ALIAS_FILE', `/etc/aliases:mail.aliases@YOUR-NIS-ZONE')dnl