1

The mails sent are waiting in queue with the error below:

`(Host or domain name not found. Name service error for name=srvr1.com.my type=MX: Host not found, try again)`

However, I have defined the host entry for that domain in /etc/hosts.

0

Your entry in the hosts-file helpless in this case.
You must use the DNS-server(BIND, for example) and create MX-entry there.

| improve this answer | |
  • Is there any way to make it work with the hosts file? Because we do not have any dns in the environment – Girish Sunkara Apr 13 '18 at 10:54
  • No. The hosts file only resolves names to IPs. It doesn't support any type of DNS records. – Gintoki Apr 13 '18 at 11:30
0

For sending/relay emails for another email server lacking DNS, as the error message is complaining, you have got to define a postfix smarthost.

As such, configure relayhost in postfix.cf with the address of the destination email server, as in:

relayhost = my_email.server.fqdn 

You can use also an IP address instead of a name.

Lastly, restart postfix as in:

service postfix restart
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.