To allow relaying of messages addressed to HOSTNAME.COM add the hostname to /etc/mail/access, e.g:
HOSTNAME.COM
/etc/mail/access
TO:HOSTNAME.COM RELAY
then run make.
make