How to Customize the Return-Path Address

The Return-Path header is used to show where smtp events and bounce messages should be sent. By default, this address points to mandrillapp.com, but you can customize the address to point to your own domain instead.

Even if you use a custom Return Path domain, bounces are still handled by Mandrill. If you need to receive bounce details in your own application or to a specific email address, you can set up webhooks and Mandrill will send information to your webhook URL when these events occur. From there, you can process the events as needed in your application/database or use a bit of code to forward the bounce information along in a new email.

Add a Custom Return Path Domain

Before getting started, set up a CNAME record pointing your subdomain to mandrillapp.com. The domain must be a subdomain (like mail.yourdomain.com) and can't be a root domain (like yourdomain.com). Any valid tracking domain can be used as a Return Path domain, but we suggest creating a unique subdomain specifically for this purpose.

Save the Return Path Domain in Mandrill

  1. Go to Settings.
  2. Choose Tracking & Return Path Domains.
  3. Enter your subdomain and click Add.
  4. Click Test DNS Settings to verify the settings for the subdomain you've added.

Enable a Custom Return Path Domain

You can enable a custom return path domain on a per-message basis using the return_path_domain parameter (API), X-MC-ReturnPathDomain (SMTP), or globally for your account under on the Sending Defaults page. Global account settings apply for all emails by default, but if the API call or SMTP headers have different tracking options, this will override the default account setting.

Notes

Each DNS provider/host may handle the adding or editing of records differently, so your host's technical support or documentation is the best resource for any limitations or formatting specific to that provider.

Some DNS providers take longer than others to publish and push the record. If you're adding a completely new record, those often validate in several minutes. Changing records can take longer, but can vary based on your DNS provider and TTL for the record.

A Return Path domain may only be added to one Mandrill account. Addition to a different Mandrill account will result in an error. If you have a specific use-case for a Return Path domain being used across multiple Mandrill accounts, please get in touch with Mandrill support.