// how to fix
Return-Path, envelope sender and From: why they must match your domain
An email has two sender addresses: the visible From and a hidden one used for bounces. For DMARC, at least SPF or DKIM must pass for the From domain.
What it means
An email is a bit like a letter in an envelope. It has two sender addresses:
- The From address, printed on the letter. It is what the reader sees, for example
news@yourdomain.com. - The envelope sender, written on the envelope. It is used by servers, mostly to send back bounces (undelivered email notices). Once delivered, it is saved in the
Return-Pathheader. It is also called "MAIL FROM" or "bounce address".
They can be different. Newsletter tools often use their own envelope sender, such as bounce-123@mail.sendingtool.com, so they can process bounces for you.
Why it matters
- SPF checks the envelope sender, not the From. If the Return-Path is on the tool's domain, SPF passes for the tool, not for you.
- DMARC checks the From. It passes only if SPF passes for a domain that matches the From domain, or DKIM passes for a domain that matches it. This is called alignment.
- So with a tool's Return-Path and the tool's own DKIM signature, everything "passes", but DMARC fails for your domain.
How to check
- Send a test email: on the home page, copy your unique test address, send it a normal email from the mailbox or tool you want to check, then open the report. In the authentication section, compare the domain checked by SPF, the DKIM signing domain (
d=) and the From domain. The report shows whether each one is aligned. In the "Raw headers" section, look at theReturn-Pathline.
Return-Path: <bounce-123@mail.sendingtool.com> (not aligned) Return-Path: <bounces@mail.yourdomain.com> (aligned) From: News <news@yourdomain.com>
A subdomain of your domain, like mail.yourdomain.com, counts as aligned in the default "relaxed" mode.
How to fix it
- Set up DKIM with your own domain first. In each sending tool, look for "domain authentication" or "custom DKIM". Add the records it gives you. Aligned DKIM is enough for DMARC to pass, and it survives forwarding better than SPF.
- Set up a custom Return-Path if your tool offers it. It is often called "custom bounce domain", "custom MAIL FROM" or "return-path domain". You usually add a CNAME record such as
bounces.yourdomain.compointing to the tool. - For your own server, make sure the envelope sender uses your domain and that the server's IP address is in your SPF record.
- For website forms and scripts, set the envelope sender explicitly. Many web hosts use a default like
user@server123.host.com. In PHP mail, the-fparameter or the library's "Sender" setting controls it.
Check that it is fixed
DNS changes are not instant. Most are visible within a few minutes, but some providers take up to 24 to 48 hours.
Send a new test email from the home page through the same tool. The report should show DKIM passing and aligned for your domain, and ideally SPF aligned too, with DMARC passing.
Check that it is fixed
DNS changes can take from a few minutes to a few hours. Then send a new test email or scan your domain again.
Related guides
- No SPF record on your domainYour domain does not say which servers may send email for it. Add one TXT record and receivers can tell your real emails from fakes.
- SPF error: too many DNS lookups (permerror)SPF allows at most 10 DNS lookups. Above that, the whole record breaks and receivers treat it as invalid. Here is how to slim it down.
- Several SPF records on one domainA domain must have only one SPF record. With two or more, SPF breaks for every email. Merge them into a single line.
- SPF fails: the sending server is not authorizedYour domain has an SPF record, but the server that sent your email is not in it. Find which service sent the email and add it.
- No DMARC record on your domainDMARC tells receivers what to do with emails that fail SPF and DKIM, and sends you reports. Gmail and Yahoo require it for bulk senders. Start with a safe monitoring record.