Centos – Sendmail – Relaying denied (state 14)

centossendmailsmtp

I have my sendmail.cf file configured to send local mail and to receive external mail to local users. So sending mail from the server to the external world works fine, but the other way around does not… I get an error e-mail saying:

Delivery to the following recipient failed permanently:

root@75.xxx.xxx.xxx

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 5.7.1 … Relaying denied (state 14).

Also I can't find logs in /var/log, all I see is this binary file in /var/log/mail/statistics

Thanks!

Best Answer

You probably don't have sendmail set up to accept mail for domain literals / IPs.

To see what sendmail has already discovered as a 'local' address, or what it thinks is local, do:

    echo '$=w' | sendmail -bt

And if you don't see your IP address in there, add it to /etc/mail/local-host-names:

    echo your.ip.addr.here >> /etc/mail/local-host-names

That should do it, given I've guessed the problem correctly from the info provided.