ListUnsubscribe

Capability: https://analytic.systems/jmap/unsubscribe

An extension to JMAP (RFC 8620 section 1.8) of the Blåmail mail service: what a message offers for getting off the mailing list it came from (the List-Unsubscribe field, RFC 2369; one-click unsubscription, RFC 8058), and asking for it. A client that has not named the capability in using sees nothing of it.

In the session object

The capability is in the session's capabilities object with an empty object as its value. Each mail account has it in its accountCapabilities, with one member:

maxPerMinute: UnsignedInt
How many one-click requests the account may have the server make in a minute.

ListUnsubscribe/get

Arguments: accountId; ids, the ids of Emails — a hundred at most. Response: accountId, list and notFound, as a standard /get has them. Each object of the list has:

id: Id
The id of the Email.
oneClick: Boolean
Whether the list can be asked with one click: the message keeps to RFC 8058 — an HTTPS URI, List-Unsubscribe-Post: List-Unsubscribe=One-Click, and a valid DKIM signature that covers both fields.
mail: Object|null
The message that asks the list by mail, from the first mailto URI of the field: to, subject, body.
link: String|null
The list's own page for it: the first https URI of the field.
preferred: String|null
"mail" or "link": which of the two the list names first (RFC 2369 section 2: "order of preference from left to right").
deliveredTo: String
The address the message came for, as people write it: whom the list knows the person as.
withheld: String|null
"junk" or "unauthenticated" if the message has such a field and nothing of it is offered — asking would only confirm the address to a sender who is not to be believed; otherwise null.
unsubscribed: Boolean
Whether the message is marked as one whose list was asked (the keyword $unsubscribed).
asked: Object|null
What was last asked from here: at (UTCDate), how ("oneClick" or "mail"), outcome ("done", "unconfirmed", "refused", "unreachable") and status (the HTTP status the list answered with, where it answered).

ListUnsubscribe/ask

Arguments: accountId, id (of an Email) and how. With "oneClick" the server makes the request of RFC 8058 section 3.1 itself — a POST of List-Unsubscribe=One-Click to the HTTPS URI, with no cookie, no credentials, nothing of the person's — once the person has said so: a client calls this for nothing else. With "mail" the client has sent the message of mail itself, as it sends any, and has it written down.

Response: accountId, id, outcome — "done", "unconfirmed", "refused" (with status), "unreachable", "tooMany" (more than maxPerMinute) or "notOffered" — and asked as above.