Answers.Body: <p>Not sure what you mean by you use gmail for bounce processing. You can't control SPF records for @gmail.com addresses, and the error seems to indicate that's what it's looking for.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-09T01:19:16.553Z
Answers.LastActivityDate: 2016-05-09T01:19:16.553Z
Answers.UserDisplayName: Demerit
Answers.Body: <p>Demerit is correct, but I'll add a bit more detail and how you can fix it.</p>
  
  <p>Your CiviCRM sends emails as <code>bounces.stp@gmail.com</code> from <code>212.77.101.4</code>. The SPF records looked up are those for the sender's domain, <code>gmail.com</code>, which does not include your webserver's IP.</p>
  
  <p>Gmail treats this as a softfail, but nazwa.pl seems configured to treat failed SPF more strictly. Both are SPF fails.</p>
  
  <p>Unless you control <code>@gmail.com</code>, you can't fix this via SPF for that originating email. What you can do is send messages from your own domain, with working SPF configuration.</p>
  
  <p>To address this, change the originating email address (CiviCRM Menu > Administer > CiviMail > From Email Addresses) to eg <code>bounces@stpuk-org.pl</code>. </p>
  
  <p>This mailbox can in turn forward to your Gmail address, so CiviCRM can continue monitoring that mailbox for bounces.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-15T18:28:12.473Z
Answers.Text: This seemed to solve my issues. Thx
Answers.UserDisplayName: Marian Zastawny
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-05-09T04:17:21.783Z
Answers.LastActivityDate: 2016-05-09T04:17:21.783Z
Answers.UserDisplayName: Chris Burgess
Body: <p>CiviMail fails to deliver some emails to specific domain servers: @wp.pl. Each time I send a mailing I receive a bounce message which reads like this:</p>
  
  <pre><code>This is the mail system at host stpuk-org.nazwa.pl.
  
  I'm sorry to have to inform you that your message could not
  be delivered to one or more recipients. It's attached below.
  
  For further assistance, please send mail to postmaster.
  
  If you do so, please include this problem report. You can
  delete your own text from the attached returned message.
  
  The mail system
  
  &lt;xxx@wp.pl&gt;: host mx.wp.pl[212.77.101.4] said: 550 SPF Error:  Senders are
      required to provide correct SPF records. If you are
      a poczta.wp.pl user check SMTP configuration:
      http://poczta.wp.pl/autoryzacja/ (in reply to MAIL FROM command)
  
  Final-Recipient: rfc822; xxx@wp.pl
  Original-Recipient: rfc822;xxx@wp.pl
  Action: failed
  Status: 5.0.0
  Remote-MTA: dns; mx.wp.pl
  Diagnostic-Code: smtp; 550 SPF Error: Senders are required to provide
  correct SPF records. If you are a poczta.wp.pl user check SMTP 
  configuration: http://poczta.wp.pl/autoryzacja/
  </code></pre>
  
  <p>The original message header is:</p>
  
  <pre><code>Return-Path: &lt;bounces.stp+b.215.1467.3d8a9854510a5876@gmail.com&gt;
  Received: from mydomain.nazwa.pl (unknown [85.128.142.61])
      by stpuk-org.nazwa.pl (Postfix) with ESMTP id 2CE5F2411C0
      for &lt;xxx@wp.pl&gt;; Sun,  8 May 2016 23:28:11 +0200 (CEST)
  To: &lt;xxx@wp.pl&gt;
  Subject: =?utf-8?Q?=5BSzkic_CiviMail=5D_Og=C5=82oszenia_STP?=
  MIME-Version: 1.0
  Content-Type: multipart/alternative;
   boundary="=_7bef5881a1e24565cf35e4ad4b65e26c"
  Reply-To: =?utf-8?Q?Stowarzyszenie_Technik=C3=B3w_Polskich?=
   &lt;office@stpuk.org&gt;
  From: =?utf-8?Q?Stowarzyszenie_Technik=C3=B3w_Polskich?= &lt;office@stpuk.org&gt;
  List-Unsubscribe: &lt;mailto:bounces.stp+u.215.1467.3d8a9854510a5876@gmail.com&gt;
  job_id: 215
  Precedence: bulk
  X-CiviMail-Bounce: bounces.stp+b.215.1467.3d8a9854510a5876@gmail.com
  Date: Sun, 08 May 2016 23:28:11 +0200
  X-HTTP-Posting-URI: http://www.stpuk.org:80/civicrm/ajax/rest
  X-HTTP-Client: 92.1.74.193
  Message-Id: &lt;20160508212811.2CE5F2411C0@stpuk-org.nazwa.pl&gt;
  </code></pre>
  
  <p>I spent some time testing various approaches but without success. Few additional comments:</p>
  
  <ul>
  <li>Civimail is successful delivered to main providers such as gmail, yahoo</li>
  <li><p>For gmail I get a spf=softfail (txt below) but still delivers:</p>
  
  <p>(google.com: domain of transitioning bounces.stp+b.197.1415.436c299ebc4d880a@gmail.com does not designate 85.128.169.253 as permitted sender) client-ip=85.128.169.253</p></li>
  <li><p>My DNS configuration has spf: "v=spf1 ip4:85.128.169.253 ~all"</p></li>
  <li>I use Google apps to handle my mail, hosting to handle website and CiviCRM and gmail for bounce processing</li>
  </ul>
  
  <p>I believe I am missing something but I have no idea what.</p>
  
Tags: <civimail><bounce>
Title: CiviMail not delivering to certain mail servers eg. wp.pl
ThreadText: # CiviMail not delivering to certain mail servers eg. wp.pl
  
  (Asked by: username_0 on 2016-05-08)
  
  CiviMail fails to deliver some emails to specific domain servers: @wp.pl. Each time I send a mailing I receive a bounce message which reads like this:
  
  ```
  This is the mail system at host stpuk-org.nazwa.pl.
  
  I'm sorry to have to inform you that your message could not
  be delivered to one or more recipients. It's attached below.
  
  For further assistance, please send mail to postmaster.
  
  If you do so, please include this problem report. You can
  delete your own text from the attached returned message.
  
  The mail system
  
  <xxx@wp.pl>: host mx.wp.pl[212.77.101.4] said: 550 SPF Error:  Senders are
      required to provide correct SPF records. If you are
      a poczta.wp.pl user check SMTP configuration:
      http://poczta.wp.pl/autoryzacja/ (in reply to MAIL FROM command)
  
  Final-Recipient: rfc822; xxx@wp.pl
  Original-Recipient: rfc822;xxx@wp.pl
  Action: failed
  Status: 5.0.0
  Remote-MTA: dns; mx.wp.pl
  Diagnostic-Code: smtp; 550 SPF Error: Senders are required to provide
  correct SPF records. If you are a poczta.wp.pl user check SMTP 
  configuration: http://poczta.wp.pl/autoryzacja/
  
  ```
  
  The original message header is:
  
  ```
  Return-Path: <bounces.stp+b.215.1467.3d8a9854510a5876@gmail.com>
  Received: from mydomain.nazwa.pl (unknown [85.128.142.61])
      by stpuk-org.nazwa.pl (Postfix) with ESMTP id 2CE5F2411C0
      for <xxx@wp.pl>; Sun,  8 May 2016 23:28:11 +0200 (CEST)
  To: <xxx@wp.pl>
  Subject: =?utf-8?Q?=5BSzkic_CiviMail=5D_Og=C5=82oszenia_STP?=
  MIME-Version: 1.0
  Content-Type: multipart/alternative;
   boundary="=_7bef5881a1e24565cf35e4ad4b65e26c"
  Reply-To: =?utf-8?Q?Stowarzyszenie_Technik=C3=B3w_Polskich?=
   <office@stpuk.org>
  From: =?utf-8?Q?Stowarzyszenie_Technik=C3=B3w_Polskich?= <office@stpuk.org>
  List-Unsubscribe: <mailto:bounces.stp+u.215.1467.3d8a9854510a5876@gmail.com>
  job_id: 215
  Precedence: bulk
  X-CiviMail-Bounce: bounces.stp+b.215.1467.3d8a9854510a5876@gmail.com
  Date: Sun, 08 May 2016 23:28:11 +0200
  X-HTTP-Posting-URI: http://www.stpuk.org:80/civicrm/ajax/rest
  X-HTTP-Client: 92.1.74.193
  Message-Id: <20160508212811.2CE5F2411C0@stpuk-org.nazwa.pl>
  
  ```
  
  I spent some time testing various approaches but without success. Few additional comments:
  
  * Civimail is successful delivered to main providers such as gmail, yahoo
  * For gmail I get a spf=softfail (txt below) but still delivers:
  
    (google.com: domain of transitioning bounces.stp+b.197.1415.436c299ebc4d880a@gmail.com does not designate 85.128.169.253 as permitted sender) client-ip=85.128.169.253
  * My DNS configuration has spf: "v=spf1 ip4:85.128.169.253 ~all"
  * I use Google apps to handle my mail, hosting to handle website and CiviCRM and gmail for bounce processing
  
  I believe I am missing something but I have no idea what.
  
  **Tags:** civimail, bounce
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2016-05-09. Score: 3 | Accepted answer
  
  username_1 is correct, but I'll add a bit more detail and how you can fix it.
  
  Your CiviCRM sends emails as `bounces.stp@gmail.com` from `212.77.101.4`. The SPF records looked up are those for the sender's domain, `gmail.com`, which does not include your webserver's IP.
  
  Gmail treats this as a softfail, but nazwa.pl seems configured to treat failed SPF more strictly. Both are SPF fails.
  
  Unless you control `@gmail.com`, you can't fix this via SPF for that originating email. What you can do is send messages from your own domain, with working SPF configuration.
  
  To address this, change the originating email address (CiviCRM Menu > Administer > CiviMail > From Email Addresses) to eg `bounces@stpuk-org.pl`.
  
  This mailbox can in turn forward to your Gmail address, so CiviCRM can continue monitoring that mailbox for bounces.
  
  > **Comments:**
  > **username_0**: This seemed to solve my issues. Thx  
  
  ---
  
  ### Answer by username_1 on 2016-05-09. Score: 0
  
  Not sure what you mean by you use gmail for bounce processing. You can't control SPF records for @gmail.com addresses, and the error seems to indicate that's what it's looking for.
  
  
  ---
  
  