title: Gmail rejects emails, although PTR and SPF are set
body: <p>when sending email from my Ubuntu 18.04 server to Gmail, I am getting such bounce messages:</p>
  
  <pre><code>... while talking to gmail-smtp-in.l.google.com.:
  &gt;&gt;&gt; DATA
  &lt;&lt;&lt; 550-5.7.1 This message does not have authentication information or fails to pass
  &lt;&lt;&lt; 550-5.7.1 authentication checks. To best protect our users from spam, the
  &lt;&lt;&lt; 550-5.7.1 message has been blocked. Please visit
  &lt;&lt;&lt; 550-5.7.1  https://support.google.com/mail/answer/81126#authentication for more
  &lt;&lt;&lt; 550 5.7.1 information. z8si6596816wro.217 - gsmtp
  554 5.0.0 Service unavailable
  </code></pre>
  
  <p>I have checked the <a href="https://support.google.com/mail/answer/81126#authentication" rel="nofollow noreferrer">provided link</a> and wonder, what setting is missing:</p>
  
  <ul>
  <li>"Send from the same IP address"
  
  <ul>
  <li>I do (changed IP once 3 months ago, though).</li>
  </ul></li>
  <li>"Keep valid reverse DNS records your IP address that point to your domain".
  
  <ul>
  <li>I think I do. There's both a DNS and PTR record referring both ways <code>nabo.jaehnig.org</code> &lt;=>  <code>159.69.180.128</code></li>
  </ul></li>
  <li>"Choose the same address in the 'From:' header for every bulk message"
  
  <ul>
  <li>I do (I even don't send bulk messages, only single ones.)</li>
  </ul></li>
  </ul>
  
  <p>There are "Other recommendations"</p>
  
  <ul>
  <li>"Publish a SPF record."
  
  <ul>
  <li>I did. It says <code>v=spf1 include:_spf.google.com ~all</code></li>
  </ul></li>
  <li>"Publish a DMARC policy."
  
  <ul>
  <li>I did. It says <code>v=DMARC1; p=none; rua=mailto:postmaster@jaehnig.org</code></li>
  </ul></li>
  <li>"Sign messages with DKIM. We don't authenticate messages signed with keys that use fewer than 1024 bits."
  
  <ul>
  <li>I'm not doing this yet. Is it really crucial? I know another server also having no DKIM, and Gmail receives its messages.</li>
  </ul></li>
  </ul>
  
  <p>Also, looking at the checks provided by <a href="https://toolbox.googleapps.com/apps/checkmx/check?domain=nabo.jaehnig.org&amp;dkim_selector=" rel="nofollow noreferrer">toolbox.googleapps.com</a>, there are no critical issues (but interestingly, DMARC is not recognized).</p>
  
  <p>What would you try next?</p>