Title: Setting a Return-Path header is improper
Last modified: August 30, 2016

---

# Setting a Return-Path header is improper

 *  Resolved [Jason Hendriks](https://wordpress.org/support/users/jasonhendriks/)
 * (@jasonhendriks)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/return-path-header/)
 * Hi, I’m the developer for [Postman SMTP](https://wordpress.org/plugins/postman-smtp/).
   One of my users brought an [issue](https://wordpress.org/support/topic/problem-sending-mail-with-other-users?replies=20#post-7031662)
   to my attention when using Email Users. This plugin is causing server-side failures
   triggered by the Return-Path header that Email Users sets.
 * Note that the Return-Path header was the _trigger_, but not the _direct cause_
   of the failure, so no action needs to be taken by you. (The cause is the behaviour
   of `mail -> setReturnPath` in Zend_Mail) However, if I may quote [RFC 5321](https://tools.ietf.org/html/rfc5321):
 * > When the delivery SMTP server makes the “final delivery” of a message, it inserts
   > a return-path line at the beginning of the mail data. […] A message-originating
   > SMTP system SHOULD NOT send a message that already contains a Return-path header
   > field.
 * FYI, the fix I made to my plugin necessitates deleting the Return-Path header
   set by Email Users.
 * Jason
 * [https://wordpress.org/plugins/email-users/](https://wordpress.org/plugins/email-users/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/return-path-header/#post-6199158)
 * How did you fix this? Did you modify the plugin or use the **mailusers_manipulate_headers**
   filter? It will let you modify the headers to work with other plugins.
 * That is how the integration with wpMandrill works.
 *  Plugin Author [Mike Walsh](https://wordpress.org/support/users/mpwalsh8/)
 * (@mpwalsh8)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/return-path-header/#post-6199159)
 * If you end up creating a filter and want to send it to me, I will add it to the
   examples directory with the other plugin integration samples.
 *  Thread Starter [Jason Hendriks](https://wordpress.org/support/users/jasonhendriks/)
 * (@jasonhendriks)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/return-path-header/#post-6199160)
 * I fixed it directly in the Postman SMTP code – my feeling is _no_ plugin should
   be able to generate non-compliant email out of Postman.
 * I don’t know what wpMandrill does, but I doubt it’s correct.
 * According to [https://mandrill.zendesk.com/hc/en-us/articles/205582727-Can-I-customize-the-Return-Path-bounce-address-used-for-my-emails-](https://mandrill.zendesk.com/hc/en-us/articles/205582727-Can-I-customize-the-Return-Path-bounce-address-used-for-my-emails-)
   Mandrill, the service, expects:
    - the return_path_domain parameter (API)
    - X-MC-ReturnPathDomain (SMTP)
    - or via account settings under Settings > Sending Defaults > Return Path Domain
 * Each one of these methods is RFC-compliant and allows the Mandrill server, which
   makes final delivery, to insert the proper Return-Path header.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Setting a Return-Path header is improper’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/email-users_a0e0cf.svg)
 * [Email Users](https://wordpress.org/plugins/email-users/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/email-users/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/email-users/)
 * [Active Topics](https://wordpress.org/support/plugin/email-users/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/email-users/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/email-users/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Jason Hendriks](https://wordpress.org/support/users/jasonhendriks/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/return-path-header/#post-6199160)
 * Status: resolved