It's a warning, not an error. You eliminate it by removing
First, find out what setting is using NIS:
$ postconf | grep nis:
This outputs something like
alias_maps = hash:/etc/aliases nis:mail.aliases
alias_maps = hash:/etc/mail/aliases nis:mail.aliases
Then, disable NIS lookups (as root):
# postconf -e alias_maps=hash:/etc/aliases
# postconf -e alias_maps=hash:/etc/mail/aliases
The exact command depends on "postconf | grep nis:" output.
First thing you should do is to check if SMTP is up and running.
On mail server you can check this with this command...
Can you see SMTP? (Usually on port 25.)
If that is up then you are most likely dealing with a DNS problem (NIS lookups seem to indicate that anyway.)