title: How do I send mail to my google apps mail server from the webserver with the same name (using sendmail)?
body: <p>Mail for my domain is handled by google apps service, all required DNS MX records entered correctly. Also I have webserver that handles HTTP requests for the domain. And I can't send mail from that server to my mail domain, sendmail ignores MX records and always trying to deliver all messages for my domain locally.</p>
  
  <p>Looks like it consider domain name as local if it resolves to local ip address.</p>
  
  <p>This is a cut from the logs:</p>
  
  <pre><code>Feb  7 18:03:03 vds sendmail[4100]: n17I33c2004100: test@example.com... User unknown
  Feb  7 18:03:03 vds sendmail[4100]: n17I33c2004100: to=test@example.com, delay=00:00:00, mailer=local, pri=0, dsn=5.1.1, stat=User unknown
  Feb  7 18:03:03 vds sendmail[4100]: n17I33c2004100: from=root, size=36, class=0, nrcpts=1, msgid=&lt;200902071803.n17I33c2004100@vds.xxxxxx.com&gt;, relay=root@localhost
  </code></pre>