Guide · SMTP and headers

List-ID vs. List-Unsubscribe: identify the newsletter, not the address

Use List-ID to recognize a mailing list across its messages. Use List-Unsubscribe to find a way to stop receiving them. RFC 2919 asks list owners to keep the List-ID the same when the list moves to another host, while an unsubscribe link may change and can carry a token for one subscription. So when you build a mailbox rule or check a migration, compare the identifier in List-ID, not the unsubscribe URL, the sender address or the subject.

Reading time
6 min

What List-ID identifies

A message from an announcement list might carry this header:

List-ID: Example Product Notes <product-notes.lists.example.org>

The value in angle brackets identifies the list: product-notes.lists.example.org. "Example Product Notes" is an optional description. RFC 2919 defines the field so that software can recognize a list's messages, for example by matching the identifier in a filter, independently of the host that delivers them (sections 1 and 3). A message must contain no more than one List-ID field (section 3).

The identifier looks like a host name in the list owner's domain, but RFC 2919 (section 2) says it may be completely independent of the domain name of the host that runs the list. Owners without a domain can use the special domain localhost for unmanaged identifiers: such an identifier must contain a randomly generated part, and should carry the month and year it was made (MMYYYY) as a subdomain of localhost (section 5).

To compare two values, RFC 2919 (section 6) defines a single operation: case-insensitive equality of the part in angle brackets, ignoring everything outside them. A rule that matches the whole raw header, description included, may break when the newsletter changes its display name. Two publications can also use similar descriptions with different identifiers, so match the full identifier, never a prefix such as "product".

What the unsubscribe headers do

List-Unsubscribe gives one or more URLs, each in angle brackets, for leaving the list: a mailto address, a web address, or both (RFC 2369, sections 2 and 3.2). The URLs are in order of preference from left to right, and a client should use the leftmost one it supports (section 2).

One-click unsubscribe (RFC 8058) adds a second field. Here is an illustrative excerpt with reserved example domains and an invented token; do not send it or use it as a live request:

List-ID: Example Product Notes <product-notes.lists.example.org>
List-Unsubscribe: <https://preferences.example.org/unsubscribe/example-token-a>
List-Unsubscribe-Post: List-Unsubscribe=One-Click

The message also needs a valid DKIM signature that covers both the List-Unsubscribe and List-Unsubscribe-Post fields (section 4). Without it, receivers should not offer one-click. A web link in List-Unsubscribe without the Post field is an ordinary RFC 2369 link, not one-click. For the sender's side in full, see one-click unsubscribe.

Make one-click safe

RFC 8058 exists because anti-spam software often fetches every URL in a message's header fields, and so triggered unsubscriptions nobody asked for (section 1). Its rules keep the POST safe:

RFC 8058 sets no rule for GET, but because of section 1 our advice is: on your own endpoint, unsubscribe only on that POST, never because something fetched the link with a GET, which is exactly what link-scanning software does. A GET can show a page where the reader confirms.

Treat real unsubscribe URLs as sensitive. Do not paste their tokens into public tickets, follow them to find out which list a message came from, or use a real subscriber's link as a migration test. For sender-side checks, use a subscription created for the test and confirm the result in the system you are allowed to use.

What stays the same after a migration

Say Example Product Notes moves to a new mail service and changes its public name. You collect two copies with a test subscription.

Before:
List-ID: Example Product Notes <product-notes.lists.example.org>
List-Unsubscribe: <https://preferences.example.org/unsubscribe/example-token-a>

After:
List-ID: Example Release Notes <PRODUCT-NOTES.LISTS.EXAMPLE.ORG>
List-Unsubscribe: <https://leave.example.net/preferences/example-token-b>
FieldChanged?What it means
List-ID identifierNo: only the description and letter caseA rule built on the bracketed value keeps recognizing the list.
List-UnsubscribeYes: new host and tokenExpected in a migration. It tells you nothing about whether the new flow ends the right subscription: test that separately.

If the new service sends <example-release-notes.service.example.net> instead, record it as a new list identity. RFC 2919 (section 4) says the list owner should avoid changing the identifier even when the host serving the list changes, and that mail clients should treat a different identifier as a different list. A deliberate split or a replacement publication can justify a new identity. If the new provider cannot keep your identifier, update your own filters and tell readers their rules may need changing too.

Nested lists and missing or extra fields

A list can be distributed through another list. A sublist that knows it is nested must not modify the parent's List-ID (RFC 2919, section 7), so a reader's copy names the parent publication, not every list it passed through. List software should not pass on a List-ID that arrived from an unexpected source, such as one a subscriber wrote into a message (sections 7 and 8).

That also means List-ID is only a label, not proof of who sent the message: RFC 2919 (section 8) says it should not be used as an indication of authenticity, and anyone can write any List-ID into a message. Use a List-ID rule to file or label mail, not to skip spam filtering or mark it as trusted. If a message has no List-ID, you have no list identifier from this field; that does not make it personal mail or mean the sender has no unsubscribe method. If it has more than one, log it as malformed instead of trusting whichever value your parser read first. Neither its presence nor its absence shows the sender's identity, the recipient's consent or inbox placement.

A migration checklist

  1. Save the bracketed List-ID value from a test message and note which list produced it.
  2. Ask the new provider whether it can keep that identifier. Check the original headers of a message sent through the final sending path: a dashboard preview can miss changes that relays make later.
  3. Compare identifiers case-insensitively, and check that the test copy has at most one List-ID field. If you run several lists, check that each has its own identifier.
  4. Check the unsubscribe headers and their DKIM signature, then try the unsubscribe action on a test subscription only. Confirm that it ended that subscription and that your own system suppressed the next send.
  5. Record any deliberate identity change and update your saved filters or migration notes.

Questions

Should a mailbox rule match List-ID or List-Unsubscribe?

List-ID, compared case-insensitively on the part in angle brackets (RFC 2919, section 6). Unsubscribe URLs can differ per subscriber and change with the provider.

Is a List-Unsubscribe link enough for one-click unsubscribe?

No. One-click also needs the List-Unsubscribe-Post field, an HTTPS URI and a DKIM signature covering both fields (RFC 8058, sections 3.1 and 4).

Can a message carry more than one List-ID?

No. RFC 2919 (section 3) allows no more than one List-ID field in a message.

Try it

Check a sending domain's DKIM record with the DKIM checker, or check an address with the free email checker.

Sources

How we wrote this: drafted by the email-validation.org team with the help of AI writing tools, from our product documentation and the sources linked in the text.

Get up to 500 free credits. No card needed.

New accounts get 500 free credits (100 when you sign up with a free email provider such as Gmail, Outlook or Yahoo, another personal mailbox such as a paid one like Fastmail or one from your internet provider, or an address from a relay or alias service). Try it on your own list before you buy.

Updated · Maintained by: Email Validation LLC