Answers.Body: <p>Turns out it was a problem with exim, which was apparently changing the headers civi was sending.</p>
  
  <p>After working with our host they were able to adjust exim.conf to make it work.  Here's what they did which may or may not be completely correct, and may or may not solve others' problems, but it' a start</p>
  
  <p>At the very top of exim.conf add </p>
  
  <p>local_from_check=false
  untrusted_set_sender = true
  local_sender_retain = true</p>
  
  <p>Here's the reference: <a href="http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html" rel="nofollow">http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html</a></p>
  
  <p>"If local_from_check is set false, the From: header check is disabled, and no Sender: header is ever added. If, in addition, you want to retain Sender: header lines supplied by untrusted users, you must also set local_sender_retain to be true.</p>
  
  <p>These options affect only the header lines in the message. The envelope sender is still forced to be the login id at the qualify domain unless untrusted_set_sender permits the user to supply an envelope sender."</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-07-15T15:13:50.540Z
Answers.LastActivityDate: 2015-07-15T15:13:50.540Z
Answers.UserDisplayName: ASav
Answers.Body: <p>The header looks ok, it's probably your mail server that rewrites it. Can you try to switch to mail() instead of smtp or the other way around into your mail config on civicrm?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-19T16:09:37.113Z
Answers.Text: Thanks.  I will try that, but just to confirm ... in my old headers (where the mail bounced properly) it looked like 
  
  Return-Path: <ourbounce+u.2505.397854.8d11b042631c3439@ourserver.com>
  
  Is it supposed to be like that?  Or like info@ourorganization.com?
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-25T13:41:08.543Z
Answers.Text: I think I've tracked this down to exim.   This (
  http://www.exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html#SECID148)  suggests that we could put no_rewrite in the configuration.  
  
  This (http://www.exim.org/exim-html-3.20/doc/html/spec_48.html#SEC822) describes how to set up a rule, but I'd have to figure out how to implement.
  
  Finally, this (http://stackoverflow.com/questions/5303541/set-email-headers-so-bounced-emails-go-to-a-specific-address) talks about using return_path_remove = false but there are different opinions about this.
  
  Any help would be appreciated
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-25T14:05:56.227Z
Answers.Text: PS - I couldn't try switching to mail() because that errored on my server.  Our mail server is on a different box than the webserver.  Could that be why?
Answers.UserDisplayName: ASav
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-19T16:03:56.793Z
Answers.LastActivityDate: 2015-06-19T16:03:56.793Z
Answers.UserDisplayName: Xavier
Body: <p>Is there any reason that Civi would set unsubscribe and X-CiviMail-Bounce properly, but set return-path to reply-to instead? See the (modified) headers below. </p>
  
  <p>We changed mail servers not too long ago, and since then our bounces are suddenly going to our reply-to address rather than our bounce address. Host says this is being done by the client (ie civi), rather than the mailserver, but the timing is odd since it worked fine prior to change in mail server.</p>
  
  <p>I don't think we made other configuration changes that would account for this. </p>
  
  <p>Any help in debugging this would be much appreciated.</p>
  
  <p>Civi 4.2.6 Drupal 7.16 (yes we are planning to upgrade) </p>
  
  <hr>
  
  <p><strong>Headers</strong></p>
  
  <hr>
  
  <pre><code>Delivered-To: [someaddress@somewhere.com]
  Received: by [mailserverip] with SMTP id xxxx;
          Thu, 18 Jun 2015 06:29:50 -0700 (PDT)
  X-Received: by [receiving server] with SMTP id yyyyy;
          Thu, 18 Jun 2015 06:29:50 -0700 (PDT)
  **Return-Path: &lt;info@ourorganization.org&gt;**
  Received: from [ourmailserver] ([our mail server ip])
          by [receivingmailserver] with ESMTPS id [receiving mail servicer id]
          for[someaddress@somewhere.com]
          (version=TLSv1.2 cipher=xxxxx bits=128/128);
          Thu, 18 Jun 2015 06:29:50 -0700 (PDT)
  Received-SPF: pass (xxxxx) client-ip=xx.xx.xx.xxx;
  Authentication-Results: xxx;
         spf=pass (xxxxxxxxxxxx) smtp.mail=xxx
  Received: from [xx.xxx.xx.xxx] (helo=[ourwebserver])
      by [ourmailserver] with esmtpa (Exim 4.72)
      (envelope-from &lt;info@ourorganization.org&gt;)
      id 1Z5Zt7-0003cp-JQ
      for info@ourorganization.org; Thu, 18 Jun 2015 13:29:49 +0000
  Message-Id: &lt;E1Z5Zt7-0003cp-JQ@mailserver&gt;
  MIME-Version: 1.0
  Content-Type: multipart/alternative;
   boundary="=_abd6aac4c1ae6db13534624f06413403"
  Reply-To: "US" &lt;info@ourorganization.org&gt;
  From: "NY-BEST" &lt;info@ourorganization.org&gt;
  Subject: Next Week! Conference
  **List-Unsubscribe: &lt;mailto:ourbounce+u.2505.397854.8d11b042631c3439@ourserver.com&gt;**
  To: Admin User &lt;info@ny-best.org&gt;
  Precedence: bulk
  **X-CiviMail-Bounce: ourbounce+u.2505.397854.8d11b042631c3439@ourserver.com**
  Date: Thu, 18 Jun 2015 09:30:08 -0400
  </code></pre>
  
Tags: <civimail><configuration>
Title: Return-Path vs. unsubscribe and X-CiviMail-Bounce
ThreadText: # Return-Path vs. unsubscribe and X-CiviMail-Bounce
  
  (Asked by: username_0 on 2015-06-19)
  
  Is there any reason that Civi would set unsubscribe and X-CiviMail-Bounce properly, but set return-path to reply-to instead? See the (modified) headers below. 
  We changed mail servers not too long ago, and since then our bounces are suddenly going to our reply-to address rather than our bounce address. Host says this is being done by the client (ie civi), rather than the mailserver, but the timing is odd since it worked fine prior to change in mail server.
  I don't think we made other configuration changes that would account for this. 
  Any help in debugging this would be much appreciated.
  Civi 4.2.6 Drupal 7.16 (yes we are planning to upgrade) 
  
  Headers
  
  Delivered-To: [someaddress@somewhere.com]
  Received: by [mailserverip] with SMTP id xxxx;
          Thu, 18 Jun 2015 06:29:50 -0700 (PDT)
  X-Received: by [receiving server] with SMTP id yyyyy;
          Thu, 18 Jun 2015 06:29:50 -0700 (PDT)
  **Return-Path: **
  Received: from [ourmailserver] ([our mail server ip])
          by [receivingmailserver] with ESMTPS id [receiving mail servicer id]
          for[someaddress@somewhere.com]
          (version=TLSv1.2 cipher=xxxxx bits=128/128);
          Thu, 18 Jun 2015 06:29:50 -0700 (PDT)
  Received-SPF: pass (xxxxx) client-ip=xx.xx.xx.xxx;
  Authentication-Results: xxx;
         spf=pass (xxxxxxxxxxxx) smtp.mail=xxx
  Received: from [xx.xxx.xx.xxx] (helo=[ourwebserver])
      by [ourmailserver] with esmtpa (Exim 4.72)
      (envelope-from )
      id 1Z5Zt7-0003cp-JQ
      for info@ourorganization.org; Thu, 18 Jun 2015 13:29:49 +0000
  Message-Id: 
  MIME-Version: 1.0
  Content-Type: multipart/alternative;
   boundary="=_abd6aac4c1ae6db13534624f06413403"
  Reply-To: "US" 
  From: "NY-BEST" 
  Subject: Next Week! Conference
  **List-Unsubscribe: **
  To: Admin User 
  Precedence: bulk
  **X-CiviMail-Bounce: ourbounce+u.2505.397854.8d11b042631c3439@ourserver.com**
  Date: Thu, 18 Jun 2015 09:30:08 -0400
  
  **Tags:** civimail, configuration
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2015-07-15. Score: 1
  
  Turns out it was a problem with exim, which was apparently changing the headers civi was sending.
  
  After working with our host they were able to adjust exim.conf to make it work. Here's what they did which may or may not be completely correct, and may or may not solve others' problems, but it' a start
  
  At the very top of exim.conf add
  
  local\_from\_check=false
  untrusted\_set\_sender = true
  local\_sender\_retain = true
  
  Here's the reference: <http://www.exim.org/exim-html-current/doc/html/spec_html/ch-main_configuration.html>
  
  "If local\_from\_check is set false, the From: header check is disabled, and no Sender: header is ever added. If, in addition, you want to retain Sender: header lines supplied by untrusted users, you must also set local\_sender\_retain to be true.
  
  These options affect only the header lines in the message. The envelope sender is still forced to be the login id at the qualify domain unless untrusted\_set\_sender permits the user to supply an envelope sender."
  
  
  ---
  
  ### Answer by username_1 on 2015-06-19. Score: 0
  
  The header looks ok, it's probably your mail server that rewrites it. Can you try to switch to mail() instead of smtp or the other way around into your mail config on civicrm?
  
  > **Comments:**
  > **username_0**: Thanks.  I will try that, but just to confirm ... in my old headers (where the mail bounced properly) it looked like   Return-Path: <ourbounce+u.2505.397854.8d11b042631c3439@ourserver.com>  Is it supposed to be like that?  Or like info@ourorganization.com?  
  > **username_0**: I think I've tracked this down to exim.   This ( http://www.exim.org/exim-html-current/doc/html/spec_html/ch-address_rewriting.html#SECID148)  suggests that we could put no_rewrite in the configuration.    This (http://www.exim.org/exim-html-3.20/doc/html/spec_48.html#SEC822) describes how to set up a rule, but I'd have to figure out how to implement.  Finally, this (http://stackoverflow.com/questions/5303541/set-email-headers-so-bounced-emails-go-to-a-specific-address) talks about using return_path_remove = false but there are different opinions about this.  Any help would be appreciated  
  > **username_0**: PS - I couldn't try switching to mail() because that errored on my server.  Our mail server is on a different box than the webserver.  Could that be why?  
  
  ---
  
  