title: Linux mail or PHP mail() doesn't reach some addresses
body: <p>I'm trying to get my PHP scripts to send mail using mail() command, which I think uses the linux sendmail or mail command.</p>
  
  <p>I've tried both sending with the PHP mail() and linux command line mail command, but in both cases the mail gets sent, but it only reaches some emails. I've tested with 5 different domains and 3 of them receive the email while 2 of them don't. The mail's don't even go to spam, they just don't arrive at all.</p>
  
  <p>With PHP mail() I am using correct From address header and I can receiuve the mail in my gmail account. When I look at the "original" in Gmail, I can see that everything is okay (spf=pass, etc...)</p>
  
  <p>It just feels like it's some automatic rejection by some receiving servers. Can anyone point me in the right direction?</p>
  
  <p>UPDATE: I checked my MTA log file and I found these:</p>
  
  <pre><code>Nov 24 08:30:09 ranits postfix/pickup[8484]: 94861EC738: uid=33 from=&lt;www-data&gt;
  Nov 24 08:30:09 ranits postfix/cleanup[8555]: 94861EC738: message-id=&lt;20111124083009.94861EC738@mydomain&gt;
  Nov 24 08:30:09 ranits postfix/qmgr[7985]: 94861EC738: from=&lt;www-data@mydomain.eu&gt;, size=351, nrcpt=1 (queue active)
  Nov 24 08:30:09 ranits postfix/smtp[8631]: 94861EC738: to=&lt;name@mydomain.ee&gt;, relay=mh3.elkdata.ee[213.180.31.146]:25, delay=0.35, delays=0/0/0.35/0, dsn=5.5.2, status=bounced (host mh3.elkdata.ee[213.180.31.146] refused to talk to me: 504 5.5.2 &lt;mydomain&gt;: Helo command rejected: need fully-qualified hostname)
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Nov 24 08:28:10 ranits postfix/local[8558]: 69563EC738: to=&lt;myname@mydomain.eu&gt;, relay=local, delay=0.01, delays=0/0/0/0, dsn=5.1.1, status=bounced (unknown user: "myname")
  </code></pre>
  
  <p>(Of course I substituted real email and domain names for fake ones here)</p>