One-click unsubscribe (RFC 8058), explained

Two email headers let Gmail and Yahoo show their own Unsubscribe button. Done right, they cut spam complaints; done wrong, they unsubscribe people by accident.

The two headers

List-Unsubscribe: <https://example.com/u/TOKEN>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

When a user clicks the mailbox's Unsubscribe button, the provider sends an HTTP POST to that URL with the body List-Unsubscribe=One-Click. Your server must unsubscribe them without asking anything else.

The common bug: unsubscribing on GET

Security scanners and link previews open (GET) every URL in an email. If a GET unsubscribes, people get removed without clicking. The correct pattern: POST unsubscribes; GET shows a confirmation button. That is how NovaMail implements it.

Requirements

NovaMail adds both headers and a signed token to every campaign automatically; you can also place {{unsubscribe_url}} in your footer.