title: Postfix: loops back to myself error
body: <p>I've been trying to install a Postfix server for handling mail for my domain. I found some nice tutorial and I was able to create email address and server responds correctly with telnet (imap and pop3 included, I also charge the config in Gmail and works correctly).</p>
  
  <p>To handle POP3 and IMAP I have installed Courier</p>
  
  <p>The problem comes when I try to send e-mails to myself (with external email address), I receive the following error code:</p>
  
  <pre><code>Action: failed
  Status: 5.4.6
  Diagnostic-Code: X-Postfix; mail for (servername) loops back to
  myself
  </code></pre>
  
  <p>I reviewed my postfix mail.conf config, as in many webs they said that it could be because mydestination was not corectly configured. I have included the domain configuration and I still get the same error. (/etc/postfix/main.cf)</p>
  
  <pre><code>mydestination = mail.mydomain.com, domain.com, localhost
  </code></pre>
  
  <p>This is in a VPS, so the hostname is different to the domain name, I'm not sure if this can have any influence on the handling mail error.</p>
  
  <p>Could someone help me to find where can the error be?</p>
  
  <p>Thanks for your attention and your answers</p>