title: Google rejects mail sent by postfix (550-5.7.1)
body: <p>im having problems with using php mail() function to send email to google business apps (gmail). Other emails are working fine. I have nginx and postfix installed on Debian.</p>
  
  <p>I have added SPF record<br>
  TXT "v=spf1 include:_spf.google.com ~all"</p>
  
  <pre><code>/var/log/mail.log looks like this:
  
  Jan 13 16:58:12 pluto postfix/pickup[26804]: 42FD82169E: uid=33 from=&lt;www-data&gt;  
  Jan 13 16:58:12 pluto postfix/cleanup[26826]: 42FD82169E: message-id=&lt;20150113145812.42FD82169E@mydomain.com&gt;  
  Jan 13 16:58:12 pluto postfix/qmgr[26805]: 42FD82169E: from=&lt;www-data@info@mydomain.com&gt;, size=594, nrcpt=1 (queue active)  
  Jan 13 16:58:12 pluto postfix/smtp[26828]: 42FD82169E: to=&lt;recepient@mydomain.com&gt;, relay=aspmx.l.google.com[173.194.78.26]:25, delay=0.23, delays=0.06/0.01/0.06/0.11, dsn=5.7.1, status=bounced (host aspmx.l.google.com[173.194.78.26] said: 550-5.7.1 [83.136.252.16 12] Our system has detected that this message is 550-5.7.1 likely unsolicited mail. To reduce the amount of spam sent to Gmail, 550-5.7.1 this message has been blocked. Please visit 550-5.7.1 http://support.google.com/mail/bin/answer.py?hl=en&amp;answer=188131 for 550 5.7.1 more information. ey11si9440622wid.49 - gsmtp (in reply to end of DATA command))  
  Jan 13 16:58:12 pluto postfix/cleanup[26826]: 768962179F: message-id=&lt;20150113145812.768962179F@mydomain.com&gt;  
  Jan 13 16:58:12 pluto postfix/qmgr[26805]: 768962179F: from=, size=3127, nrcpt=1 (queue active)  
  Jan 13 16:58:12 pluto postfix/bounce[26829]: 42FD82169E: sender non-delivery notification: 768962179F  
  Jan 13 16:58:12 pluto postfix/qmgr[26805]: 42FD82169E: removed  
  Jan 13 16:58:12 pluto postfix/smtp[26828]: 768962179F: to=&lt;www-data@info@mydomain.com&gt;, relay=aspmx.l.google.com[173.194.78.26]:25, delay=0.09, delays=0.01/0/0.04/0.04, dsn=5.1.1, status=bounced (host aspmx.l.google.com[173.194.78.26] said: 550-5.1.1 The email account that you tried to reach does not exist. Please try 550-5.1.1 double-checking the recipient's email address for typos or 550-5.1.1 unnecessary spaces. Learn more at 550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 l10si41320730wjz.98 - gsmtp (in reply to RCPT TO command))  
  Jan 13 16:58:12 pluto postfix/qmgr[26805]: 768962179F: removed
  
  
  /etc/postfix/main.cf looks like this:
  
  myhostname = mydomain.com  
  smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)  
  biff = no  
  append_dot_mydomain = no  
  readme_directory = no  
  myorigin = /etc/mailname  
  mydestination =  
  relayhost =  
  mynetworks = 127.0.0.0/8 83.136.252.0/22 10.2.0.0/22 [::1]/128 [fe80::]/64  
  mailbox_command = procmail -a "$EXTENSION"  
  mailbox_size_limit = 0  
  recipient_delimiter = +  
  inet_interfaces = all  
  inet_protocols = ipv4  
  milter_protocol = 2  
  milter_default_action = accept
  </code></pre>