When a message cannot be delivered, a receiving server sends a bounce (a non-delivery report) to the envelope sender, also known as the return path. Bounces were designed for humans: their layout differs between servers, their text is free-form, and when you sent one message to many recipients, the bounce may not say clearly which address failed. A program that tries to parse these reports has to cope with hundreds of formats, languages and quirks. Variable Envelope Return Path, or VERP, avoids the problem. Instead of using one return address for everything, you give each recipient their own, with the recipient encoded in it. When a bounce arrives at [email protected], you know immediately who it concerns, without reading the body. This guide explains how VERP works, how to implement it, its relationship to authentication and alignment, its limits, security considerations and alternatives. See Return-Path vs From for the basics.
How the envelope sender works
SMTP has two sender addresses. The envelope sender is given in the MAIL FROM command and is where bounces go. The header From is what the reader sees. They can differ, and for bulk and transactional mail they usually do. SPF checks the domain of the envelope sender, which is why a platform that sends for you normally uses its own domain or a subdomain of yours for the return path. A normal conversation looks like this:
MAIL FROM:<[email protected]>
RCPT TO:<[email protected]>
DATA
From: News <[email protected]>
To: [email protected]
...If the delivery fails, the bounce is sent to [email protected]. The part after the plus sign is the encoded recipient address: asha=example.net stands for [email protected], with the at sign replaced by an equals sign because the local part of an address cannot be ambiguous. Your bounce handler reads the recipient from the address of the incoming bounce.
Why VERP is reliable
| Problem with parsing | How VERP helps |
|---|---|
| Reports differ by vendor and language | You read the address the bounce was sent to, not the message body |
| Multi-recipient messages produce bounces that name only some recipients | Each recipient has a separate envelope, so each bounce is clearly attributed |
| Forwarded mail bounces report the forwarding target, not your recipient | The VERP address still names the original recipient you sent to |
| Auto-replies and challenge responses mimic bounces | They also go to the VERP address, so you can classify them together with the content |
| Parsing mistakes cause wrongly suppressed addresses | Attribution is exact, so suppression is accurate |
One catch: when mail is forwarded, the bounce reflects the final recipient, but the VERP address still tells you the first-hop recipient you sent to. That is what you want for list hygiene, since you need to suppress the address on your list, whichever mailbox ends the chain. See forwarding and authentication.
Implementation steps
- Choose a return-path domain or subdomain you control, for example
bounces.example.com. Publish an MX record for it pointing at the server that will receive bounces, and an SPF record for it covering the sending servers. See MX records. - Define the address format, such as
bounce+<encoded recipient>@bounces.example.com. Many systems also include a message or campaign ID:b+<campaign>.<recipient-id>@.... Avoid putting raw personal data when an opaque ID will do. - Set the envelope sender per message in your sending library. In SMTP this is the MAIL FROM address; in some APIs it is a separate field. Postfix supports VERP through a flag on the sendmail command and the
-Voption, and configuration parameters for the delimiters. - Receive and parse the bounce mailbox. A script reads incoming mail, extracts the local part, decodes the recipient, classifies the bounce (hard or soft, by status code in the report) and updates your list. See bounce codes and reading a bounce code.
- Apply policy. Suppress hard bounces at once; retry or count soft bounces. See suppression lists.
- Test with real failures: a nonexistent mailbox on a domain you control, and a full mailbox if available.
Alignment and authentication
SPF authenticates the domain of the envelope sender. For DMARC to pass using SPF, the envelope domain must align with the From domain: the same organisational domain in relaxed mode. Using bounces.example.com as the return-path domain with a From address at example.com aligns in relaxed mode. Many senders rely on DKIM for DMARC and treat SPF alignment as a bonus, but aligned bounce domains help and appear in some providers' reputation assessment. VERP affects only the local part, so alignment is not harmed. See custom return-path alignment and DMARC alignment.
Limits and costs
- More envelopes. Each recipient gets a separate SMTP transaction, which prevents sending one copy to many recipients at the same destination domain. For bulk senders that already send one message per recipient, there is no extra cost.
- Local part length. The local part may be at most 64 characters. Long recipient addresses can exceed it. Use an opaque short ID or a hash and keep a lookup table.
- Special characters need encoding. Use a scheme that handles plus signs, equals signs and uppercase letters.
- Catch-all mailbox required. The bounce domain must accept any local part. Handle the resulting spam and backscatter by validating that the address matches your format and signature.
- Some receivers rewrite or suppress bounces, so you cannot rely on all failures arriving as bounces. Combine with delivery events from your sending platform.
- Managed platforms often do this for you. If your provider provides bounce webhooks, you may not need your own VERP setup. See delivery event webhooks.
Security: sign the address
If the bounce address contains only the recipient, anyone can send a fake bounce to [email protected] and make you suppress the victim's address. To prevent that, add a keyed signature (HMAC) to the local part, check it on arrival and drop messages whose signature fails. Include a timestamp or message ID so that signatures expire. Likewise, do not treat any message at the bounce address as a bounce without checking that it is a genuine delivery status notification and that the status code indicates failure. Backscatter, the bounces your system sends for forged mail, is a separate issue: reject invalid mail during the SMTP session instead of accepting and bouncing later. See email spoofing.
VERP versus message-ID matching
| Approach | How | Strengths | Weaknesses |
|---|---|---|---|
| VERP | Recipient encoded in the envelope sender | Exact, independent of bounce format | Needs per-recipient envelopes and a catch-all domain |
| Message-ID or custom header matching | Find the original Message-ID in the bounce body and look up the message | No per-recipient envelope | Depends on the bounce quoting the original headers; fails for terse bounces. See Message-ID |
| Provider webhooks | The sending platform parses bounces and sends you events | Least effort | Depends on the provider; you rely on their classification |
| Parsing the report text | Heuristics and patterns | Works without any setup | Fragile and error-prone |
Many mature systems combine them: VERP for attribution, DSN status codes for classification, and webhooks for convenience. Choose according to how much control you need and who runs the mail server.
Get accurate bounce handling Our relay processes bounces and sends you structured events.
References and further reading
Frequently asked questions
What does VERP stand for?
Variable Envelope Return Path: a different envelope sender address for each recipient, with the recipient encoded in it.
Does VERP affect SPF and DMARC?
Only the local part changes, so SPF and alignment depend on the domain, which stays the same. Use a return-path domain aligned with your From domain.
Can anyone abuse a VERP address?
Yes, by sending fake bounces. Add an HMAC signature to the address and verify it.
Do I need VERP if my provider sends bounce webhooks?
Usually not. The provider performs the attribution for you.
Is there a length limit?
The local part of an address is limited to 64 characters, so use short IDs for long recipient addresses.