title: DKIM : Signature header exists but is not valid
body: <p>I have configured Postfix with SPF and DKIM but all emails are marked as spam.</p>
  
  <p>Here is my domain.db (I use bind9) :</p>
  
  <pre><code>...
  mail._domainkey IN      TXT     ( "v=DKIM1; k=rsa; p=ABCD" )
  </code></pre>
  
  <p>I verify with :</p>
  
  <pre><code>host -t TXT mail._domainkey.domain.com
  </code></pre>
  
  <p>I receive (OK) :</p>
  
  <pre><code>mail._domainkey.domain.com descriptive text "v=DKIM1\; k=rsa\; " "p=ABCD"
  </code></pre>
  
  <p>I've checked also what could be the problem on <a href="http://email-tester.com" rel="noreferrer">email-tester.com</a>, and I get 10/10, DKIM seems also correctly installed.</p>
  
  <p>But when I check the content of an email, I see : </p>
  
  <pre><code>...
  dkim:pass
  dkim:pass
  SPF:pass
  ...
  X-Spam-Report: 
  * -0.0 NO_RELAYS Informational: message was not relayed via SMTP
  * -0.0 NO_RECEIVED Informational: message has no Received headers
  *  0.0 T_DKIM_INVALID DKIM-Signature header exists but is not valid
  
  X-Spam-Status: No, score=0.0 required=5.0 tests=NO_RECEIVED,NO_RELAYS,
  T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0
  </code></pre>
  
  <p>Any idea ?</p>
  
  <p>----- UPDATE -------</p>
  
  <p>After adding in master.cf :</p>
  
  <pre><code>-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
  </code></pre>
  
  <p>Here is the new email content :</p>
  
  <pre><code>...
  dkim:pass   (now there is only one: OK)
  spf:pass 
  ...
  X-Spam-Report: 
  * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP
  
  X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham
  autolearn_force=no version=3.4.0
  </code></pre>
  
  <p>which seems better, but the email is still marked as spam, grrr</p>