{"slug": "how-workspace-noreply-google-com-slipped-past-our-auto-reply-guard", "title": "How workspace-noreply@google.com slipped past our auto-reply guard", "summary": "A developer operating the wecanuseai.com AI tool directory found that their Cloudflare Email Worker's auto-reply guard let a Google Workspace price-change notice from workspace-noreply@google.com through, because the sender-pattern regex anchored noreply to the start of the local-part and the message carried none of the standard bulk or Auto-Submitted headers. The fix replaces the prefix-only anchor with token boundaries around [._+-] so prefixed and plus-tagged automated senders are caught while human addresses like founder@noreply-tools.com stay open. A second bug in answerFreeText was also corrected so suppressed automated mail is no longer mislabeled as a probable tool submission in triage notes.", "body_md": "Today our Cloudflare Email Worker on [wecanuseai.com](https://wecanuseai.com) read a Google Workspace price-change notice and invited Google to submit its billing page to our AI tool directory.\n\nInbound mail to `contact@wecanuseai.com` accepts plain emails from tool makers.\n\nWhen someone sends a link without a command verb, the Worker does not list the site without consent.\n\nInstead, it sends one reply with a link to `/submit`.\n\nTo avoid mail loops, `mayAutoReply` checks standard automated-mail signals before sending anything back.\n\nIt drops bounces (`Return-Path: <>`), mailing lists (` List-Id`, `List-Unsubscribe`), bulk headers (` Precedence: bulk|list|junk`), and RFC 3834 `Auto-Submitted` headers.\n\nMandatory billing notices carry none of those headers.\n\nGoogle wants every domain admin to read a December price change, so the message arrives as normal transactional mail from `Google Workspace <workspace-noreply@google.com>`.\n\n`noreply` at character zero\nWith no bulk or `Auto-Submitted` header present, loop protection fell back to our sender-address pattern:\n\n``` js\nconst NO_MAIL_ADDRESS = /^(mailer-daemon|postmaster|no-?reply|do-?not-?reply|bounce)@/;\n```\n\nThe leading `^` required `noreply` to start the local-part.\n\nAdding `workspace-` in front let `workspace-noreply@google.com` pass straight through.\n\nThe message body linked to `https://workspace.google.com/pricing`, so `submittedLink` matched that URL and queued an invitation to `/submit`.\n\nReplacing the prefix-only anchor with token boundaries around `[._+-]` catches prefixed and plus-tagged automated senders while keeping human addresses such as `founder@noreply-tools.com` and `reply@vendor.com` open:\n\n``` js\nconst NO_MAIL_ADDRESS = new RegExp(\n  String.raw`^(?:mailer-daemon|postmaster|bounce)@|` +\n    String.raw`(?:^|[._+-])(?:no-?reply|do-?not-?reply|auto-?reply)(?:[._+-][^@]*)?@`,\n  'i'\n);\n```\n\nYou can verify both patterns with Node:\n\n``` js\nnode -e '\nconst oldRe = /^(mailer-daemon|postmaster|no-?reply|do-?not-?reply|bounce)@/;\nconst newRe = /^(?:mailer-daemon|postmaster|bounce)@|(?:^|[._+-])(?:no-?reply|do-?not-?reply|auto-?reply)(?:[._+-][^@]*)?@/i;\nfor (const addr of [\n  \"workspace-noreply@google.com\",\n  \"billing-no-reply@vendor.com\",\n  \"noreply+status@vendor.com\",\n  \"team.do-not-reply@vendor.com\",\n  \"founder@noreply-tools.com\",\n  \"reply@vendor.com\",\n]) {\n  console.log(addr.padEnd(32), \"old:\", oldRe.test(addr), \"new:\", newRe.test(addr));\n}\n'\n```\n\nFixing the regex exposed a second bug four lines lower in `answerFreeText`:\n\n``` js\nconst link = submittedLink(body, mail.env);\nif (link && mayAutoReply(mail.message, mail.env)) {\n  return replyAndNote(mail, submissionReply(mail.env), 'sent submission form link');\n}\nreturn queueNote(\n  mail,\n  link\n    ? 'a probable tool submission, but auto-reply was suppressed for this message'\n    : 'no recognised request in the first few lines'\n);\n```\n\nEven when `mayAutoReply` returned `false`, `link` was already truthy whenever an automated alert included a help or pricing URL in its footer.\n\nEvery suppressed `noreply` notice with an external link still landed in our triage notes as `\"a probable tool submission\"`.\n\nChecking `canReply` first fixes both the outbound reply and the internal triage label:\n\n``` js\nconst canReply = mayAutoReply(mail.message, mail.env);\nif (canReply && submittedLink(body, mail.env)) {\n  return replyAndNote(mail, submissionReply(mail.env), 'sent submission form link');\n}\nreturn queueNote(\n  mail,\n  canReply\n    ? 'no recognised request in the first few lines'\n    : 'automated or no-reply mail (auto-reply suppressed)'\n);\n```\n\nAutomated vendor notices still forward to the inbox so we never miss a billing change, queue zero auto-replies, and record their real disposition.\n\nIf you run inbound email hooks on Cloudflare Workers, test what `vendor-noreply@` with a footer URL triggers.", "url": "https://wpnews.pro/news/how-workspace-noreply-google-com-slipped-past-our-auto-reply-guard", "canonical_source": "https://dev.to/melbinjp/how-workspace-noreplygooglecom-slipped-past-our-auto-reply-guard-7hn", "published_at": "2026-11-28 22:33:38+00:00", "updated_at": "2026-11-28 22:44:07.743410+00:00", "lang": "en", "topics": ["ai-agents", "developer-tools"], "entities": ["Cloudflare", "Google Workspace", "wecanuseai.com", "Google"], "also_reported_by": [], "takeaway": "Anchor no-reply detection on token boundaries around [._+-] rather than the start of the local-part, and check mayAutoReply before computing the submitted link so suppressed automated mail isn't mislabeled as a submission.", "recommendation": {"advice": "When filtering automated inbound mail, match no-reply tokens at [._+-] boundaries and evaluate your auto-reply guard before any link extraction, then test vendor-noreply@ addresses with footer URLs.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/how-workspace-noreply-google-com-slipped-past-our-auto-reply-guard", "markdown": "https://wpnews.pro/news/how-workspace-noreply-google-com-slipped-past-our-auto-reply-guard.md", "text": "https://wpnews.pro/news/how-workspace-noreply-google-com-slipped-past-our-auto-reply-guard.txt", "jsonld": "https://wpnews.pro/news/how-workspace-noreply-google-com-slipped-past-our-auto-reply-guard.jsonld"}}