Custom return path: the envelope address that makes SPF count toward DMARC
Published Updated 10 min readBy the Rasket team
Written for developers, deliverability specialists and IT admins

A custom return path is a subdomain of your own domain used as the envelope sender, the SMTP MAIL FROM address that bounces are sent to. Your bounces need it to come back through your own domain: the return path decides whose DNS they route through and whose domain SPF passes for, and only a pass for your own domain counts toward DMARC. Without one, your sending service still processes the bounces, but on its domain.
You can see the problem in a DMARC aggregate report (RFC 9990). In this row, 412 messages passed SPF, but for bounces.esp.example, so the SPF alignment result is fail and the messages passed DMARC on DKIM alone. (RFC 9990 added pass as a disposition for mail that passes under an enforcing policy; under p=none, or from a reporter still on RFC 7489, the same row says none.)
<record>
<row>
<source_ip>192.0.2.25</source_ip>
<count>412</count>
<policy_evaluated>
<disposition>pass</disposition>
<dkim>pass</dkim>
<spf>fail</spf>
</policy_evaluated>
</row>
<identifiers>
<envelope_from>bounces.esp.example</envelope_from>
<header_from>acme.example</header_from>
</identifiers>
<auth_results>
<dkim>
<domain>acme.example</domain>
<selector>rasket</selector>
<result>pass</result>
</dkim>
<spf>
<domain>bounces.esp.example</domain>
<result>pass</result>
</spf>
</auth_results>
</record>One label under your domain, holding a CNAME or an MX and SPF TXT pair, turns that spf result into pass and moves your bounces into DNS you control.
What the return path is
When one mail server hands a message to another, it starts with an envelope: a MAIL FROM command naming where failure notices should go, then RCPT TO for each recipient, and only then the message itself. That MAIL FROM address is the return path. RFC 5321 calls it the reverse-path; people also say envelope sender, bounce address, or mail from domain for the part after the @.
S: 220 mx.example.com ESMTP
C: EHLO out.mail.example.net
S: 250 mx.example.com
C: MAIL FROM:<bounce+7f3a9c@rasket.acme.example>
S: 250 2.1.0 OK
C: RCPT TO:<ronald.williams@example.com>
S: 250 2.1.5 OK
C: DATA
S: 354 Go ahead
C: From: Acme <orders@acme.example>
C: To: ronald.williams@example.com
C: Subject: Your order 1042
C: Date: Sat, 17 Oct 2026 09:14:02 +0000
C: Message-ID: <7f3a9c@acme.example>
C:
C: Thanks for your order.
C: .
S: 250 2.0.0 Accepted
C: QUIT
S: 221 ByeThe envelope and the message disagree on purpose. The envelope address is unique per message, a variant of VERP (variable envelope return path, which classically encodes the recipient), so a bounce that comes back to it can be matched to the send that caused it without parsing any text. The From address is for the reader. When the receiving server delivers the message, it writes the envelope address into a Return-Path header (RFC 5321 §4.4), which is how you can see it later:
Return-Path: <bounce+7f3a9c@rasket.acme.example>
Authentication-Results: mx.example.com;
spf=pass smtp.mailfrom=rasket.acme.example;
dkim=pass header.d=acme.example header.s=rasket;
dmarc=pass header.from=acme.example
From: Acme <orders@acme.example>
To: ronald.williams@example.com
Subject: Your order 1042Because the receiver writes that header, a sender cannot set it: the API refuses a Return-Path header in a send request.
What happens when the message cannot be delivered
Most receiving servers refuse a bad recipient during the conversation itself, with a 550 reply the sending server sees at once. Some accept the message and send a delivery status notification later, sometimes hours later; that notice is an ordinary email addressed to the return path. The unique local part, bounce+7f3a9c above, tells the server that reads it which send it belongs to. Either way it becomes an email.bounced event, and a permanent bounce also adds the address to your suppressions; the events reference has the payload, and hard vs soft bounces covers which is which.
Header From vs envelope From
| Header From | Envelope From (return path) | |
|---|---|---|
| Set by | Your application, in the message | The sending server, before the message |
| Seen by | Every reader | Servers; readers only in the raw headers |
| Checked by | DMARC, as the domain everything must align with | SPF, which reads this domain's record |
| Where failures go | Nowhere; replies go here or to Reply-To | Bounces and delivery reports |
The row that matters is “Checked by”: SPF checks the envelope, and DMARC then requires the domain that passed to belong to the From domain’s organisation, which RFC 9989 (the DMARC standard that replaced RFC 7489 in May 2026) calls identifier alignment (more on alignment).
Why put it on your own subdomain
SPF that counts toward DMARC
In the report row above, SPF passed for bounces.esp.example, which shares no organisational domain with acme.example, so it could not align. With the return path at rasket.acme.example, SPF passes for a subdomain of your From domain, which aligns in DMARC’s default relaxed mode. The message now has two independent ways to pass.
Strict mode is the exception. A DMARC record with aspf=s requires the SPF domain to equal the From domain exactly, so a return path on any subdomain never aligns and DKIM, signed as acme.example, carries DMARC alone. Keep aspf relaxed (the default when the tag is absent) unless you have a reason to need strict.
Why two legs matter, and where they do not help
Aligned SPF matters most when DKIM fails on our side of the trip: a DNS change that drops or mistypes the DKIM record, or a key rotation done in the wrong order. Every message then fails DKIM, but mail that comes straight from us still passes aligned SPF, so DMARC keeps passing while you fix the record. Plain forwarding is different: the forwarder connects from its own address, so SPF fails there too. An intact DKIM signature still carries the verdict through; ARC (RFC 8617), a chain of signed results the forwarder adds, helps only with receivers that trust that forwarder.
Mailing lists resend with their own envelope sender, so your SPF does not apply to that hop at all, and a footer or subject tag breaks your DKIM signature too. With both legs gone, many lists rewrite the From address to their own domain. A custom return path does not fix list delivery; it fixes the direct path from us to the recipient, which is most of your mail.
Bounces that route through your DNS
A bounce notice is an email addressed to the return path, so whoever runs the mail exchanger for that domain receives it. On your own subdomain, the routing is in your zone: if you ever change providers, you control where late bounces for old messages go, and you can see the whole path in your own records.
The records at the return-path label
The return path needs records that make its domain receive bounces and pass SPF. We set the form when you add the domain, and the domain page shows which one, with the exact names and values (full record set).
- One CNAME. The label points at a host under
rasket.net, a domain we keep only for mail infrastructure, named for your domain’s region, such asus1.rasket.net. That host publishes exactly two records: the MX that receives your bounces and one SPF TXT for the shared servers we send through. Its include costs one DNS lookup, counted against this label’s own limit of ten, not your root record’s, because the record it includes lists addresses only. Receivers follow the alias and read both. We change them only when the servers behind them change, and the change reaches your label without a DNS edit, which is what the alias is for. - An MX and an SPF TXT. The same two records, published in your zone. The TXT has the shape
v=spf1 include:… ~all, with the include naming our sending servers; the domain page shows the exact value. Here you own the records, and a change on our side shows up as a record that no longer verifies. Either form verifies for either domain, so you can switch by publishing the other one.
Why the SPF record ends in ~all, not -all
This label is not used only for bounces: its SPF record is what authorises every message we send with your return path. On the CNAME form the record is ours, so there is nothing to edit. On the MX and TXT form, verification compares the TXT with the value we give, so a record edited to -all shows as a mismatch.
-all would not buy anything here. DMARC treats an SPF softfail and an SPF fail the same way, as not passing. And RFC 9989 §7.1 warns that a receiver checking SPF before DMARC may reject a -all failure outright, before an aligned DKIM signature gets a say, and that rejection never appears in your aggregate reports. The mail that fails SPF at this label is mostly mail relayed through a server we do not run, such as a plain forwarder, and for that mail DKIM should decide.
Receivers check that a return-path domain can receive mail before they trust it: a MAIL FROM domain with no MX and no address record is commonly refused, because a bounce sent there could never arrive (RFC 5321 §5.1 falls back to the address record when there is no MX). Both forms give the label an MX.
Your SPF record at acme.example is not touched. SPF is evaluated only at the return-path domain, so the root record keeps serving your office mail, spends none of its 10-lookup budget on us, and a mistake in one cannot break the other.
Before you publish
- Nothing else may live at the label: a CNAME shares its name with no other record. If something is already there, choose another label.
- Publish the CNAME as DNS only. A proxied record (Cloudflare’s orange cloud) answers with addresses instead of the alias, so receivers find no MX or SPF there, and the domain page reports the proxy.
- A TTL of 3600 seconds, or your host’s automatic setting, is fine for new records; before changing an existing one, lower its TTL to 300 a day ahead. Check the result with
dig +short CNAME rasket.acme.example, ordig MXanddig TXTfor the pair. - Most panels want the name relative to the zone:
rasketforacme.example,rasket.newsif you addednews.acme.example.
How Rasket picks the label
A new domain gets its return path at rasket, the first free label of rasket, rasketmail, rk, rasket1, rasket2. A label is free when nothing is published there, or only our own records. So acme.example gets rasket.acme.example, and news.acme.example gets rasket.news.acme.example. A zone with a wildcard record answers for every name, so no label can be checked; the domain then gets rasket, and you should look at what that name returns before publishing. Domains added before this default keep the label they were given.
To choose a label yourself, pass custom_return_path when you add the domain. It is a label, not a hostname: bounce makes the return path bounce.acme.example. If the domain you add is itself a subdomain, such as send.acme.example, the label goes under it: bounce.send.acme.example. A label where another service already publishes records is refused with 422 invalid_parameter and details.reason return_path_in_use.
# A request with no User-Agent is refused (403); curl sends its own, so name your integration.
curl -X POST https://api.rasket.com/domains \
-H "Authorization: Bearer $RASKET_API_KEY" \
-H "User-Agent: acme-billing/1.0" \
-H "Content-Type: application/json" \
-d '{ "name": "acme.example", "custom_return_path": "bounce" }'HTTP/1.1 201 Created
{
"object": "domain",
"id": "d9b2f1c4-…",
"name": "acme.example",
"status": "not_started",
"custom_return_path": "bounce",
"records": [
{ "record": "SPF", "name": "bounce", "type": "CNAME",
"status": "not_started", "value": "us1.rasket.net" }
]
}Until that row first verifies, mail goes out with our mail servers’ own return path, so SPF passes unaligned and DKIM carries DMARC. Once it has verified, we stop falling back: if the label’s records later disappear, sending from the domain fails instead of quietly losing aligned SPF. Another Rasket customer cannot use your return path, because a domain one team has verified is refused to every other team, and moving it needs a fresh DNS proof.
PATCH /domains/{id} with { "custom_return_path": "mail" } changes it later; the records move to the new label and are checked there. Leave the old records in place for a week. RFC 5321 §4.5.4.1 recommends that a server keep retrying a delivery for at least 4–5 days before it gives up (Postfix’s default is five), and the bounce it then sends goes to the old label; a week covers that plus the old records’ TTL.
When you stop using Rasket altogether, delete the domain and then its records, as the verification walkthrough lists. A leftover CNAME to a service you have left is how subdomain takeovers start. Ours points at a name in a zone we own, which nobody else can claim while we keep it registered, but a record for a service you have left still authorises mail you no longer send, so delete it. Once both legs pass, the next step is a stricter DMARC policy: moving DMARC from none to reject.
Check it on a real message
Send yourself a message and open its raw headers; the DMARC article shows where. In Authentication-Results, smtp.mailfrom should name your return-path subdomain and header.d your own domain, with dmarc=pass. If smtp.mailfrom shows your sending service’s domain, SPF is passing without aligning, and the return path is the fix.
Mail your staff send from their own mailboxes does not need this: their provider already uses your domain as the envelope sender. The split happens when an application sends through a service.
Frequently asked questions
Is the return path the same as the Reply-To address?
No. Reply-To is a header in the message that tells a mail client where a person's reply should go, and readers can see it. The return path is set in the SMTP envelope, readers never see it, and only servers send to it, with bounces and delivery reports. A message often carries both, on different domains.
Can the return path be my root domain?
Not with Rasket: it is always a label under the domain you add. The root's MX belongs to your mailbox provider, and pointing it at a bounce processor would take your staff mail with it. A label of its own gets its own MX and SPF, scoped to one job, without touching anything at the root.
What if I send through two services on the same domain?
Each service uses its own return-path label, so each receives the bounces for the mail it sent and publishes its own SPF there. They do not conflict. DKIM is the same: each signs with its own selector. Your root SPF record only needs the services whose envelope sender is the root itself.
Does SPF check anything besides the return path?
SPF can also check the HELO name the sending server introduces itself with, but DMARC relies only on the return-path check (RFC 9989, section 4.4.2). When the return path is empty, as on bounce notices, SPF checks postmaster at the HELO name instead (RFC 7208, section 2.4). For your own mail, the return path decides SPF alignment.
What happens if the return-path records are deleted later?
Once the label has verified, we stop falling back to our mail servers' own return path, so sending from that domain fails until the records are back, instead of carrying on with SPF quietly unaligned. Before the first verification, mail goes out with our own return path and DKIM carries DMARC.
Do I need a custom return path to meet Gmail's bulk sender rules?
Gmail and Yahoo ask bulk senders for SPF and DKIM, a DMARC record, and a From domain aligned with SPF or DKIM, and since May 2025 Outlook.com has required senders over 5,000 messages a day to pass both SPF and DKIM and publish DMARC aligned with at least one. An aligned DKIM signature meets the alignment rule on its own, so a custom return path is not required. It adds a second aligned result, which keeps DMARC passing if the DKIM record breaks.
Sources
- RFC 5321: Simple Mail Transfer Protocol, sections 4.4, 4.5.4.1 and 5.1 — IETF, read 2026-10-17
- RFC 7208: Sender Policy Framework (SPF), sections 2.3 and 2.4 — IETF, read 2026-10-17
- RFC 9989: Domain-Based Message Authentication, Reporting, and Conformance (DMARC) — IETF, read 2026-10-17
- RFC 8617: The Authenticated Received Chain (ARC) Protocol — IETF, read 2026-10-17
- Email sender guidelines — Google, read 2026-10-16
- RFC 9990: DMARC Aggregate Reporting — IETF, read 2026-10-17
- Sender best practices — Yahoo Sender Hub, read 2026-10-17
- Strengthening email ecosystem: Outlook's new requirements for high-volume senders — Microsoft Defender for Office 365 Blog (2 April 2025), read 2026-10-17
- Rasket docs: Domains (guide) — Rasket, read 2026-10-17
- Rasket docs: Domains API reference — Rasket, read 2026-10-17
Related
- Custom return path (MAIL FROM) — The return path, also called MAIL FROM or the envelope sender, is the address bounces come back to. It is set during the delivery conversation between servers…
- DMARC alignment — Alignment is the part of DMARC that asks whether the domain that passed authentication is the same one the reader sees. A DKIM signature or an SPF check can…
- Email domain verification, step by step — Which DNS records verify a sending domain, where each one goes, how long it normally takes, and what each status on the domain page tells you to do next.
- DKIM, SPF and DMARC explained: what to publish — What SPF, DKIM and DMARC each check, how to read the verdicts on a sent message, the records to publish, and what Gmail and Outlook.com require of senders.
- DMARC p=reject: move from p=none safely — Move DMARC from p=none to p=reject without losing mail: read aggregate reports, align every sender with DKIM, quarantine, then reject, and roll back fast.
- Domains — Add a domain, publish the generated record set and send from it. A 2048-bit DKIM key per domain, a custom return path, and verification that runs on its own.