Postfix problem with nis
I'm getting this error via logcheck:
But I can't see, why I'm getting it.
warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
I'm running this commando:
And getting this:
sudo postconf | grep nis
But if I'm running this commando:
alias_maps = hash:/etc/aliases, nis:mail.aliases
I'm getting this:
cat /etc/postfix/main.cf | grep alias_maps
#alias_maps = hash:/etc/aliases
postfix runs with some defaults buit into it. i would open up your main.cf file and uncomment your alias_maps line to force it to override the default
Should it then just be set to
alias_maps = hash:/etc/aliases
Yes, but what should stand in /etc/aliases
it should hold local aliases. for example, on a typical linux system you will have many accounts on your system for things such as the apache service, samba service, ftp service. these on my centos system have been aliases to root so that all the mail goes to the same account. i was assuming that you already had an aliases file in your /etc directory that was put there by the distro. if not you will want to change the path to wherever it is.
even in a virtual domain environment you will probably still want this because then your local system can still receive mail to root from all of those local aliases.
in a virtual domain environment you will probably not have to touch this file. but if your system is hosting a local domain for email then this is where your aliases go.
you will also want to make sure your alias_database = hash:/etc/postfix/aliases points to a valid location.
the alias_maps file holds all the aliases in a format that other mail systems can read also ie.sendmail.
the alias_database location is the location that postfix actually reads the aliases from in its database format which gets created when you run "postalias /etc/aliases" from a command prompt. this command needs to be run every time you edit the /etc/aliases file to update the db file.
just type "find / -name aliases" if you are having trouble locating it. sorry to be long winded but also the reason to just get rid of the nis section before was also because i was assuming that since it was erroring out that you did not have an nis database setup, which postfix can also as well use for additional created aliases.