Gabriela Gavrailova

// Product Marketing Associate for Devs

Have you ever heard of a return-path? If you haven’t, maybe you are missing one thing that you can do to help your deliverability. The return-path is the one that will help you manage your bounces and clean your list. Let’s check it out in details.

What is a Return-Path?

We’ll start with the purely technical return-path explanation provided in the standard RFC documentation and then break it down and explain it in a more understandable language.

The return-path header (return-path header, in English) is an SMTP email source address (SMTP MAIL FROM, in English) used to process the bounces that occur in your emails.

It can also be called reverse path, sender, sender, MAIL DE, 5321-DE, sender, De_ and Errors a. This address receives information on all bounces. As much as we hate them, rebounds still happen and we must be aware of that. This can be tons of help for your your deliverability.

So this means that once the email is sent, the return-path is added to preserve the value of the SMTP MAIL FROM command. So, it is the mailbox provider (for example Mailjet, Google, Hotmail, Yahoo) that adds the return-path header.

When you look at the full header of your message (we know that you don’t usually do that, but you can try now just to see what we are talking about), you will see the return-path header somewhere at the top. In most cases it’s just above the Received header, which shows the public IP where the mail was sent from (in our case this would some of Mailjet’s IPs).

It is important to know that there should only be one return-path header. In the case there are more, this would indicate that something is wrong with the SMTP configuration and you need to dig deeper to check it.

Up until now, everything sounds so strange, right? Maybe knowing the main purpose of the return-path will enlighten you a bit.

What is the return-path for?

Return-path is used to process bounces. As an email service provider, it is a good idea to have a generic address that is handling those bounces. This should be an email that you will have access to, and therefore an email with your domain. Do you see where we’re going now?

Return-path is added once the email is sent, to preserve the value of the SMTP command MAIL FROM. Therefore, it is the email provider (e.g. Mailjet, Google, Hotmail, Yahoo) that adds the return-path header.

The return-path header must be present in all emails to track bounces. If the return-path header is not present and a bounce occurs, the email servers will be confused and will not know where to send the bounce notification. This means that you will not know the existence of the bounce, you will not be able to remove that address from your list and you will continue to send to that address, which can negatively affect your sender score.

In Mailjet, all emails pointing to an address in Mailjet’s SMTP environment will have a return-path address with a Mailjet domain. This means that everyone who receives your emails will be able to see the return-path that you use and that you are a Mailjet customer. For some people, this is no problem. However, if you wish you can customize your return path using a CNAME record.

Why should you customize your return-path?

The reason for customizing your return-path has to do with email authentication processes, or how the recipient’s server determines which emails to let through and which ones it rejects.

DMARC is an email validation system created to detect and prevent phishing. One of the many tasks the DMARC system performs is to check the concordance between the sender’s name and your return-path name.

With the increase in phishing attacks, ISPs have been trying to protect their reputation. Even trusted email providers are subjected to exhaustive controls.

There are many factors that can cause problems with deliverability, but one of them has an easy solution: clean up your email header and customize your return path. Each server has a different way of interpreting email headers to establish authenticity, but the more systematic the signals in your messages, the better.

It makes sense that the DE address and the return-path address have the same domain, doesn’t it? Many servers will reject an email claiming to come from a certain address if the message is not sent by a server that usually manages that address.

With Mailjet you can customize the return path to ensure that no one gets your reputation compromised through a CNAME record. To understand how it works, we must first see what CNAME is.

What is CNAME?

CNAME is the abbreviation for Canonical Name. CNAME records can be used to alias for a name. Any system hosting a site must have an IP address in order to be connected to the World Wide Web. The DNS resolves the name of your site to its IP address, although sometimes several names resolve it in the same IP address , and this is where the CNAME is useful.

For example, if you own mydomain.com and www.mydomain.com that points to the same site or application and are hosted on the same server, it would be very useful to create the following to avoid keeping two different records:

  • An A record for mydomain.com pointing to the server IP address;
  • A CNAME record for www.mydomain.com pointing to mydomain.com;

 

Then you will have mydomain.com, which points to the IP address of the server, and www.mydomain.com points to the same IP address of the server (mydomain.com). If it is necessary to modify the IP address, you only need to update it in one place since it will be replicated in the other.

However, the CNAME has some restrictions.

  • You should always point to another domain name and never directly to an IP address.
  • It cannot coexist with another record for the same name. You cannot have a CNAME and TXT record for www.midominio.com.
  • You can point to another CNAME record, although generally this setting is not recommended for performance reasons. If applicable, the CNAME record should aim as much as possible at the target name to avoid unnecessary performance demands.
  • You cannot put a CNAME record at the root domain level because the root domain is the Start Of Authority (SOA) of the DNS that must point to an IP address.
  • MX and NS records should never point to a CNAME alias.

A surprising novelty is that with the latest generation of DNS technology, the same CNAME record will be able to redirect to one of several names based on dynamic parameters. This will make it even easier to manage CNAME records.

A and CNAME records are sometimes confused, but they are two different and common ways of assigning a hostname to one or more IP addresses. There are important differences between these two records that need to be taken into account. Record A points to a specific IP (you want mydomain.com to point to server 189.1.147.13) and the CNAME record to point to another name instead of an IP (www.midominio.com points to mydomain.com).

Think of the CNAME record as an alias for the destination name that inherits its entire resolution string.

Some common uses of CNAME records are:

  • Provide a separate hostname for specific network services. Common examples are email or FTP that points that hostname to the root domain.
  • Many people use subdomains to manage their different services or clients linked to the primary domain (for example, company.namehost.com), and CNAME record to point to the client’s domain (www.empresa.com).
  • Register the same domain in several countries and have the country versions point to the main domain “.com”.
  • Point from several websites owned by the same organization to the main website.

How you can customize your return-path

Now that we know more about the CNAME record, let’s see how you need to configure it to be able to customize your return-path with Mailjet. We’ll use the first of the common examples: you use a CNAME record to have your own domain point to our domain in the return-path address.

The default return-path Mailjet uses is “bnc3.mailjet.com”. Since we must receive the bounce events, you cannot change it completely, because if you do we will not be able to receive the events.

Setting up the CNAME

To customize your return-path, you’ll need to do three simple steps: create a subdomain, create the CNAME record in your DNS zone, and contact us to activate the redirection.

Step 1

Create a subdomain in your main domain using the prefix “bnc3”. For example, with a main domain mydomain.com, you will have to create a subdomain bnc3.mydomain.com.

Step 2

You must access your DNS zone and create a CNAME record that looks like this:

bnc3.mydomain.com. IN CNAME bnc3.mailjet.com.

This will mean that your domain bnc3.mydomain.com will now point to bnc3.mailjet.com. Therefore, everyone will see bnc3.midominio.com in the email header, but it will actually point to our bnc3.mailjet.com and we will continue to receive bounce events and update your statistics.

Step 3

The final step would be to get in touch with us. To do this, you can open a ticket with our support team and provide us with the following information so that we can activate your personalized return route:

  1. The API key you want to activate the return-path.
  2. The CNAME record you configured: the screenshot or text version of the record will be perfect.

Please note that you can only have one active return-path per API key.

Once we have this information, we will do the necessary and our agents will get back to you with the good news that everything is ready. And there you go – you have your customized return-path.

Conclusion

Deliverability is very important to every sender and in this article, we have learned one more thing that can help you make it easier. The return-path is important for email providers to know where to send the bounces and where to deal with them. We’ve also learned why it’s best to customize it, what the CNAME record is, and how it works.

For more useful articles, don’t forget to follow us on Twitter and Facebook.