I configured sendmail to send mail with a Gmail smtp relay, following the instructions in this article.
But when I try to send mail, it gets rejected. The error message is:
The original message was received at Wed, 22 Aug 2012 13:24:35 +0800 from root@localhost
----- The following addresses had permanent fatal errors -----
user@example.com
(reason: 553 5.1.8 <user@example.com>... Domain of sender address root@[mymachinename] does not exist)
(expanded from: user@example.com)
----- Transcript of session follows -----
... while talking to [127.0.0.1]:
>>> DATA
<<< 553 5.1.8 <user@example.com>... Domain of sender address root@[mymachinename] does not exist
550 5.1.1 user@example.com... User unknown
<<< 503 5.0.0 Need RCPT (recipient)
I think it is related to DNS, but I don't know what to do with it.