Unsubscribe
Leave mailing lists from the message header, and how Airpost picks and carries out the unsubscribe method.
When a message comes from a mailing list, Airpost shows an Unsubscribe link in the message header. Click it and the link changes to “Unsubscribing…”, then Unsubscribed. If it fails, you’ll see Unsubscribe failed and a Try again option.
You don’t need to open the sender’s website or find the tiny link at the bottom of the email. For most newsletters, the whole thing happens without leaving Airpost.
How it unsubscribes
Mailing lists declare how to leave them in a List-Unsubscribe header (RFC 2369). Airpost reads it and uses the best method the sender offers, in this order:
| Order | Method | What happens |
|---|---|---|
| 1 | One-click (RFC 8058) | The sender offers List-Unsubscribe-Post with an https link. The engine sends the unsubscribe request itself. Nothing opens. |
| 2 | Email (mailto:, RFC 6068) | The engine sends the unsubscribe email from your account. It goes out like any other mail and appears in Sent. |
| 3 | Web link | The sender’s unsubscribe page opens in your browser, where you may need to confirm. |
If a message has no List-Unsubscribe header but has an unsubscribe link in its body, Airpost shows the link and opens it in your browser.
Safety checks
Unsubscribe headers come from mail anyone can send, so the engine is careful with them:
- One-click requests only go to public hosts. The engine resolves the host, refuses it if any of its addresses is private or local (your router,
localhost, a machine on your network), and connects to the address it checked. It doesn’t go through a proxy and doesn’t follow redirects. - Timeouts. A one-click request gives up after 10 seconds to connect and 30 seconds in total.
- Unsubscribe emails are limited. A
mailto:link with more than five recipients is refused, since an unsubscribe goes to one list. Very long subjects and bodies in the link are refused too. - The body download happens first. Airpost stores the header when it downloads a message’s body. If you click Unsubscribe on a message whose body isn’t on your computer yet, the engine fetches it, then unsubscribes.
When it doesn’t work
| What you see | What to do |
|---|---|
| No Unsubscribe link | The message has no List-Unsubscribe header and no unsubscribe link in its body. Use a rule to move or trash mail from the sender. |
| Unsubscribe failed | The sender’s server didn’t accept the request, or your account couldn’t send the email. Click Try again, or open the message and use the link at its bottom. |
| Still getting mail | One-click and email unsubscribes are processed by the sender, which can take a few days. |
| A web page asks you to confirm | The sender only offers a web link. Airpost can’t confirm for you. |
From the CLI
airpost unsubscribe takes a message id and uses the same order. For a web-only list it prints the link for you to open.
# Find newsletters, then unsubscribe from one of them
airpost search 'from:news@example.com' -n 1
airpost show <thread-id>
airpost unsubscribe <message-id>
# Force one method
airpost unsubscribe <message-id> --method mailto
--method takes one-click, mailto or web.