Today our Cloudflare Email Worker on wecanuseai.com read a Google Workspace price-change notice and invited Google to submit its billing page to our AI tool directory.
Inbound mail to contact@wecanuseai.com accepts plain emails from tool makers.
When someone sends a link without a command verb, the Worker does not list the site without consent.
Instead, it sends one reply with a link to /submit.
To avoid mail loops, mayAutoReply checks standard automated-mail signals before sending anything back.
It drops bounces (Return-Path: <>), mailing lists (List-Id, List-Unsubscribe), bulk headers (Precedence: bulk|list|junk), and RFC 3834 Auto-Submitted headers.
Mandatory billing notices carry none of those headers.
Google 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>.
Bug 1: anchoring noreply at character zero
With no bulk or Auto-Submitted header present, loop protection fell back to our sender-address pattern:
const NO_MAIL_ADDRESS = /^(mailer-daemon|postmaster|no-?reply|do-?not-?reply|bounce)@/; The leading ^ required noreply to start the local-part.
Adding workspace- in front let workspace-noreply@google.com pass straight through.
The message body linked to https://workspace.google.com/pricing, so submittedLink matched that URL and queued an invitation to /submit.
Replacing 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:
const NO_MAIL_ADDRESS = new RegExp( String.raw`^(?:mailer-daemon|postmaster|bounce)@|` + String.raw`(?:^|[._+-])(?:no-?reply|do-?not-?reply|auto-?reply)(?:[._+-][^@]*)?@`, 'i' ); You can verify both patterns with Node:
node -e ' const oldRe = /^(mailer-daemon|postmaster|no-?reply|do-?not-?reply|bounce)@/; const newRe = /^(?:mailer-daemon|postmaster|bounce)@|(?:^|[._+-])(?:no-?reply|do-?not-?reply|auto-?reply)(?:[._+-][^@]*)?@/i; for (const addr of [ "workspace-noreply@google.com", "billing-no-reply@vendor.com", "noreply+status@vendor.com", "team.do-not-reply@vendor.com", "founder@noreply-tools.com", "reply@vendor.com", ]) { console.log(addr.padEnd(32), "old:", oldRe.test(addr), "new:", newRe.test(addr)); } ' Bug 2: checking the link before sender eligibility
Fixing the regex exposed a second bug four lines lower in answerFreeText:
const link = submittedLink(body, mail.env); if (link && mayAutoReply(mail.message, mail.env)) { return replyAndNote(mail, submissionReply(mail.env), 'sent submission form link'); } return queueNote( mail, link ? 'a probable tool submission, but auto-reply was suppressed for this message' : 'no recognised request in the first few lines' ); Even when mayAutoReply returned false, link was already truthy whenever an automated alert included a help or pricing URL in its footer.
Every suppressed noreply notice with an external link still landed in our triage notes as "a probable tool submission".
Checking canReply first fixes both the outbound reply and the internal triage label:
const canReply = mayAutoReply(mail.message, mail.env); if (canReply && submittedLink(body, mail.env)) { return replyAndNote(mail, submissionReply(mail.env), 'sent submission form link'); } return queueNote( mail, canReply ? 'no recognised request in the first few lines' : 'automated or no-reply mail (auto-reply suppressed)' ); Automated vendor notices still forward to the inbox so we never miss a billing change, queue zero auto-replies, and record their real disposition.
If you run inbound email hooks on Cloudflare Workers, test what vendor-noreply@ with a footer URL triggers.


