Skip to content

Email subscription lifecycle: one-click unsubscribe + double opt-in #10

Closed

Description

@alloevil

Background

The daily digest email rendered by scripts/main.py contains no unsubscribe link (grep for unsubscribe: zero hits). The only way out is buried in the GAS welcome email: "reply to this email with unsubscribe" — handled manually. There is also no confirmation step, so anyone can subscribe someone else's address.

The GAS endpoint (scripts/subscribe_handler.gs) already handles subscribe writes; adding an unsubscribe action is an extension of the existing handler, not new infrastructure.

User story

As a subscriber, I want a one-click unsubscribe at the bottom of every digest, so that when I no longer want it I don't have to mark it as spam.

Why now

Spam reports poison the sending domain's deliverability for all remaining subscribers. Gmail and Yahoo have required one-click unsubscribe for bulk senders since 2024 — this is a deliverability floor, not a nice-to-have.

Acceptance criteria

  • Every digest email contains an unsubscribe link handled by the GAS endpoint: it removes the address from subscribers and shows a confirmation page.
  • The List-Unsubscribe header (and List-Unsubscribe-Post for one-click) is set on outgoing digests.
  • New subscriptions trigger a confirmation email; the address only becomes active after the confirmation link is clicked.

Effort: M.

Activity

  1. added
    enhancement
    roadmap
    on Aug 21, 2026
  2. alloevil commented on Aug 21, 2026

    @alloevil
    OwnerAuthor

    代码侧已完成并合入 main(b774dd6)。注意:GAS 端需要手动重新部署才实际生效:

    1. 把最新的 scripts/subscribe_handler.gs 粘贴到 Apps Script 项目;
    2. 脚本属性添加 UNSUBSCRIBE_SECRET(随机长字符串)和 GITHUB_TOKEN;
    3. 仓库 Actions secrets 添加同一个 UNSUBSCRIBE_SECRET;
    4. 重新部署 Web App(部署 → 管理部署 → 编辑 → 新版本)。

    部署步骤详见 README「Deploy the subscribe/unsubscribe endpoint」一节。在 GAS 重新部署之前,digest 里的退订链接会指向旧端点并返回无效操作。

  3. alloevil commented on Aug 21, 2026

    @alloevil
    OwnerAuthor

    Reverted in 3a66d26 by owner decision: the new flow requires redeploying the GAS web app, which isn't worth it for now. The deployed (legacy) GAS version stays authoritative; repo script restored to match it. Reopening to keep the idea on the roadmap for whenever a GAS redeploy is convenient.

  4. alloevil commented on Sep 16, 2026

    @alloevil
    OwnerAuthor

    Closing by owner decision: the code landed in b774dd6 and was reverted in 3a66d26 because the flow requires redeploying the GAS web app, which the owner judged not worth it right now. The deployed legacy GAS version stays authoritative and the repo script matches it. The redeploy checklist stays in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementroadmap

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions