RFC 8058 one-click unsubscribe: handle POST, never GET
Anti-spam scanners at corporate domains can fetch the URLs in your List-Unsubscribe header, so an unsubscribe on GET removes real people without their consent. Under RFC 8058, accept the unsubscribe only on POST, include both List-* headers in the DKIM signature, and send them on recurring transactional mail too.
Sohail Hussain10 min readShort answer
- Make your List-Unsubscribe URL change state only on POST. A GET should show a confirmation page and nothing else, because mail security scanners fetch URLs and a GET handler counts that as a click.
- Put List-Unsubscribe and List-Unsubscribe-Post inside the DKIM signature (the h= tag), use an unguessable token in the URL, and add the headers to recurring mail that recipients treat as optional.
You may have seen business contacts "unsubscribe" seconds after delivery, with no human involved. Developers describe the same pattern on community forums: the endpoint unsubscribes on a plain GET, and anti-spam gateways at B2B domains fetch header URLs as part of scanning. Proofpoint and Barracuda are the names that come up most in those reports. I can't verify what any one gateway does internally, so treat the cause as a strong pattern, not a documented vendor behavior. The fix is the same either way.
Why scanners unsubscribe people on GET
A GET request is meant to be safe: fetching a URL should not change anything. Security gateways rely on that. To judge a message they may request links in the body and in headers, and follow redirects to see where a link ends. If GET /unsubscribe?token=... marks the contact as opted out, the scanner has just unsubscribed the recipient.
RFC 8058 exists partly because of this. The RFC's own security section notes that provoking GET requests through spam filter auto-fetches has been possible for a long time, and much easier due to spam filter auto-fetches. The real one-click mechanism is a POST sent by the mail client, not a URL fetch.
Several separate problems tend to show up together:
| Cause | Symptom | Fix |
|---|---|---|
| Endpoint unsubscribes on GET | Unsubscribes seconds after delivery, mostly at corporate domains | Act on POST only; GET shows a confirm page |
| Headers added after DKIM signing | Gmail or Yahoo don't show the Unsubscribe button | Add headers before the signer runs; include them in h= |
| Token is Base64 of the address | Anyone can decode the address or forge links | Use an opaque random ID or an HMAC |
| Recurring "transactional" mail has no header | Complaints with no way out | Add the header to optional recurring mail |
| Handler redirects the POST | One-click fails silently | Answer directly at the URL |
What RFC 8058 requires
The sender puts two headers in the message:
List-Unsubscribe: <https://example.com/unsubscribe/opaquepart>
List-Unsubscribe-Post: List-Unsubscribe=One-Click
Per the RFC, the List-Unsubscribe header field must contain one HTTPS URI, and it may also carry a mailto: entry. The List-Unsubscribe-Post header must contain the single key/value pair "List-Unsubscribe=One-Click". The mail client then POSTs that pair as the request body to the URL. The full text is at RFC 8058.
Three details are easy to miss:
- The POST request must not include cookies, HTTP authorization, or any other context information. Your handler cannot depend on a session.
- The sender must not return an HTTPS redirect, because redirected POSTs have historically failed.
- The target of the POST is the same as the one in the GET action for a manual unsubscription, so the same route can serve both.
Step-by-step: fix the endpoint
1. Split the route by method
- Keep one URL for the header and the body link.
- Make GET render a page with a "Confirm unsubscribe" button. It must not change any state.
- Make POST perform the unsubscribe and return a
2xxstatus. - Do not require a login, cookie or CSRF session on the POST; the RFC forbids sending them.
- Return the response directly at that URL, with no redirect.
- Make the handler idempotent: a second POST for an already-suppressed address should still return success.
- Log method, user agent and timestamp for every request, so you can tell a human click from a scanner later.
A minimal sketch in Express-style pseudocode:
app.get("/unsubscribe/:token", (req, res) => {
// Render a form that POSTs back to this URL. Change nothing here.
res.render("confirm-unsubscribe", { token: req.params.token });
});
app.post("/unsubscribe/:token", async (req, res) => {
const contact = await verifyToken(req.params.token);
if (!contact) return res.sendStatus(400);
await suppress(contact.id); // safe to repeat
res.sendStatus(200);
});
A scanner can send POST too
A gateway could in principle POST to the URL. As an extra check you can require the body to contain List-Unsubscribe=One-Click, which a plain URL fetch will not send. Your confirmation page's form then has to send the same field.
2. Don't build the token from the address
People on a community thread pointed out that a signed-looking token built from the address (for example Base64 of the email) is decodable by anyone who sees the link. That leaks the address and lets someone forge links for other recipients.
The RFC says the URI should include an opaque identifier or another hard-to-forge component, and that the server should verify that component is valid. Two sound approaches:
- A random identifier of at least 128 bits, stored server-side and mapped to the contact and list.
- An HMAC over contact ID, list ID and an expiry, using a secret that never leaves your server. Verify it on every request.
Keep the plain address out of the URL. If it must be there, treat your access logs as personal data.
3. Put both headers inside the DKIM signature
The RFC is explicit: the List-Unsubscribe and List-Unsubscribe-Post headers must be covered by the signature and included in the "h=" tag. It adds that if the signature is missing, the receiver should not offer one-click unsubscribe for that message. That is a common reason the Unsubscribe button never appears in Gmail.
DKIM-Signature: v=1; a=rsa-sha256; d=example.com; s=selector1;
h=from:to:subject:date:message-id:list-unsubscribe:list-unsubscribe-post;
bh=...; b=...
The usual trap is a pipeline that adds List-Unsubscribe after signing. The headers must exist before the signer runs. Paste a delivered message into the email header analyzer and check that both names appear in h=. If you need the basics, read what DKIM is.
4. Add the header to recurring mail people can opt out of
One thread described a template labeled transactional that drew complaints of about 0.4% and had no List-Unsubscribe header. That is one poster's number, so read it as an illustration, not a benchmark. Still, it lines up with how Google frames it: one-click unsubscribe is required only for marketing and promotional messages, and transactional messages are excluded. But recipients, not Google, determine the nature of the messages they receive.
Yahoo's FAQ gives similar advice. If you see high complaint rates for mail not legally required to have an unsubscribe link, including a one-click option may reduce delivery issues. A practical split (as of November 2026):
| Message type | Add the headers? |
|---|---|
| Password reset, receipt, security alert, OTP | No; the recipient needs it |
| Weekly digest, activity summary, tips | Yes |
| Product announcements, newsletters | Yes |
| Billing reminders that can't be turned off | Usually no; link to notification settings |
Google's guidance also says subscription and non-subscription mail should go out from different email addresses. See transactional vs marketing emails for where the line sits and the complaint rate glossary entry for how it is measured. Google's FAQ lists a spam rate greater than 0.3% among the conditions that remove delivery support, so a template with no exit is a real risk.
Gmail may still hide the button
Correct headers do not guarantee Gmail shows an Unsubscribe link. Google says the button appears only for messages that pass its automated eligibility checks, even when you add your own body link.
Check that it works
- Send a test message to a Gmail address and open Show original. Confirm both headers are present and DKIM shows
PASS. - Open the unsubscribe URL in a browser. You should see the confirmation page, and the contact must stay subscribed.
- Send the POST yourself and confirm the contact is suppressed:
curl -i -X POST \
-d "List-Unsubscribe=One-Click" \
"https://example.com/unsubscribe/opaquepart"
- Repeat the POST and confirm it still returns
2xx. - Confirm the endpoint does not redirect and works with no cookies.
- Watch your next sends to corporate domains. If unsubscribes still land within seconds of delivery and your logs show only GET requests, something upstream still handles GET (a CDN rule, an old route, a link tracker).
Checklist before you ship
- GET changes no state; POST does.
- No redirect on POST, no login or cookie required.
- Token is opaque or HMAC-signed, not derived from the address.
- Both headers are present before DKIM signing and listed in
h=. - The List-Unsubscribe header contains one HTTPS URL.
- Recurring optional mail carries the headers; true transactional mail does not.
- Requests are logged with method and user agent.
What this does not fix
A POST-only handler stops scanners from opting people out. It does not stop them from registering opens and clicks in your analytics. Treat engagement from corporate domains with suspicion, and filter known bot traffic where your tool allows it. For background on the header, see List-Unsubscribe.
A mailto: entry is optional. If you include one, monitor that mailbox and process the requests; otherwise leave it out. Note that Google says mailto links don't meet its one-click requirement, so the HTTPS URL is what counts.
If nothing works
If scanner-driven unsubscribes continue after the POST-only change, the cause is probably outside your code or inside your sending provider. Contact your ESP's support, or the security team at the affected recipient company if you have a contact there. Include:
- Three or four affected addresses (with permission) and the send timestamps.
- Your server log lines for the unsubscribe URL, showing method, user agent and source IP.
- The raw headers of one affected message, including the
DKIM-Signature. - What you already changed (POST-only, token format,
h=list).
Subject: Unsubscribes triggered by automated fetches after RFC 8058 change
Hello,
We changed our List-Unsubscribe endpoint to accept unsubscribes on POST only.
GET now returns a confirmation page and changes nothing. We still see
contacts at {recipient-domain} suppressed within seconds of delivery.
Attached: raw headers of message {message-id} (sent {timestamp} UTC), and
our server log lines for {unsubscribe-url} with method, user agent and IP.
DKIM h= includes list-unsubscribe and list-unsubscribe-post.
Can you confirm which component performs these requests, and whether any
header rewriting happens on your side before DKIM signing?
Thanks,
{your-name}
Common questions
Should GET ever unsubscribe someone?
No. A GET should render a page with a confirm button. People who click the body link get the page and confirm; scanners fetch it and change nothing.
Do I need List-Unsubscribe on password resets and receipts?
No. Google and Yahoo both exclude transactional mail from the one-click requirement. Add it to recurring mail that recipients experience as optional, such as digests and product updates.
Does one-click unsubscribe remove someone from everything I send?
Not by default. Google's FAQ says the recipient can be removed only from the mailing list associated with the message. Decide on your own policy and encode the list in the token.
How fast do I need to honor the request?
Google recommends fulfilling unsubscribe requests within 48 hours. With a POST handler that suppresses immediately, you meet that by default.
Explore: Email Compliance
Related Articles
Acceptable spam rate in Google Postmaster Tools: under 0.1%
An acceptable spam rate in Google Postmaster Tools is under 0.1%, and you should never reach 0.3%. The figure is based on user-reported spam in Gmail, not on how your list was built. An opt-in list showing 1% to 2% has a complaint problem that consent alone does not prevent.
Acceptable Unsubscribe Rate in Email Marketing (and Why It Looks High)
An acceptable unsubscribe rate is roughly 0.1% to 0.5% per send, and many healthy lists sit near 0.2%. A rate of 2% or more points to a content or list problem, or to bots and mail scanners triggering unsubscribe links that no human clicked.
ActiveCampaign "bad request" unsubscribe link: what to do
The error "bad request (unsubscribe link)" means the unsubscribe page rejected the URL it received. Often the link was cut, rewritten or altered before the click. Test a fresh send, compare the URL to the original, and give ActiveCampaign support the exact link and a timestamp if it still fails.
ActiveCampaign emails quarantined by Microsoft: unsubscribe link fix
If ActiveCampaign shows emails as sent but Microsoft 365 recipients never see them, the messages are probably quarantined after delivery. Confirm it in Microsoft 365 quarantine, move links onto a domain you own, authenticate with SPF, DKIM and DMARC, and ask recipients' admins to allow-list you.
Ready to supercharge your email marketing?
Start sending smarter emails with AI-powered campaigns. No credit card required.
Get Started Free