[object Object]

← back to Purelymail Fleet Viewer

add 211-domain receive-test runner + receive-test stage status

20fb3416c51db047cd54e816f5819b695a019653 · 2026-05-18 15:36:16 -0700 · SteveStudio2

Files touched

Diff

commit 20fb3416c51db047cd54e816f5819b695a019653
Author: SteveStudio2 <stevestudio2@SteveStacStudio.lan>
Date:   Mon May 18 15:36:16 2026 -0700

    add 211-domain receive-test runner + receive-test stage status
---
 .gitignore                   |  1 +
 data/remediation-status.json | 30 +++++++++----------
 run-receive-test.js          | 68 ++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 84 insertions(+), 15 deletions(-)

diff --git a/.gitignore b/.gitignore
index 1924158..43e7d3e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ tmp/
 dist/
 build/
 .next/
+data/receive-test-sends.jsonl
diff --git a/data/remediation-status.json b/data/remediation-status.json
index 5a7e7a8..4e20805 100644
--- a/data/remediation-status.json
+++ b/data/remediation-status.json
@@ -1,26 +1,26 @@
 {
-  "updatedAt": "2026-05-18T15:30:00Z",
-  "stage": "fix-running",
-  "stageLabel": "DNS-fix agent running — Fix A + Fix B",
+  "updatedAt": "2026-05-18T15:35:00Z",
+  "stage": "receive-test",
+  "stageLabel": "Fix A + B complete — receive test sending",
   "fixA": {
-    "status": "running",
+    "status": "done",
     "label": "Remove stale dual-SPF record on 32 GoDaddy domains",
-    "done": 0,
+    "done": 32,
     "total": 32,
-    "note": "Canary on roomsettings.com first, dig-verify, then batch 31"
+    "note": "32/32 fixed — canary roomsettings.com + 5-domain dig verified"
   },
   "fixB": {
-    "status": "running",
-    "label": "Add Purelymail catch-all routing rules — venturaclaw.com + venturaclaw.agentabrams.com",
-    "done": 0,
-    "total": 2
+    "status": "done",
+    "label": "Add Purelymail routing rules — venturaclaw.com + venturaclaw.agentabrams.com",
+    "done": 2,
+    "total": 2,
+    "note": "rules 90186 + 90187 created and verified"
   },
   "receiveTest": {
-    "status": "pending",
-    "label": "211-domain receive probe — UUID-tagged, gated behind Fix A+B",
-    "passed": 0,
-    "failed": 0,
+    "status": "running",
+    "label": "211-domain receive probe — tagged probe to each info@<domain>",
+    "done": 0,
     "total": 211,
-    "results": []
+    "note": "sending ~3s apart, then 4-min catch-all forwarding wait"
   }
 }
diff --git a/run-receive-test.js b/run-receive-test.js
new file mode 100644
index 0000000..907b9c7
--- /dev/null
+++ b/run-receive-test.js
@@ -0,0 +1,68 @@
+#!/usr/bin/env node
+/* Purelymail 211-domain receive test.
+ * Sends one tagged probe to each info@<domain> via George's /api/send (over tailnet),
+ * ~3s apart, logs every send, updates the viewer's status file live, then waits
+ * 4 min for catch-all forwarding before exiting.
+ *
+ *   GEORGE_ADMIN_PASS=... node run-receive-test.js
+ */
+'use strict';
+const fs = require('fs');
+const os = require('os');
+const path = require('path');
+
+const HEALTH = path.join(os.homedir(), 'Projects/email-deliverability-agent/output/domain-health.json');
+const STATUS = path.join(__dirname, 'data/remediation-status.json');
+const SENDS  = path.join(__dirname, 'data/receive-test-sends.jsonl');
+const RUNID_F= path.join(__dirname, 'data/receive-test-runid.txt');
+const GEORGE = 'http://100.107.67.67:9850/api/send';
+const PASS = process.env.GEORGE_ADMIN_PASS;
+if (!PASS) { console.error('GEORGE_ADMIN_PASS not set'); process.exit(1); }
+const AUTH = 'Basic ' + Buffer.from('admin:' + PASS).toString('base64');
+
+const runId = 'PMRCV-' + new Date().toISOString().replace(/[-:T.]/g, '').slice(0, 14);
+const domains = JSON.parse(fs.readFileSync(HEALTH, 'utf8')).domains.map(d => d.domain);
+fs.writeFileSync(SENDS, '');
+fs.writeFileSync(RUNID_F, runId);
+
+function patch(fields) {
+  try {
+    const s = JSON.parse(fs.readFileSync(STATUS, 'utf8'));
+    Object.assign(s.receiveTest, fields);
+    s.receiveTest.runId = runId;
+    s.updatedAt = new Date().toISOString();
+    fs.writeFileSync(STATUS, JSON.stringify(s, null, 2));
+  } catch (e) { /* non-fatal */ }
+}
+const sleep = ms => new Promise(r => setTimeout(r, ms));
+
+(async () => {
+  let sent = 0, okCount = 0;
+  for (const domain of domains) {
+    const subject = `PMRCV ${runId} ${domain}`;
+    const body = `<p>Purelymail receive probe. run=${runId} domain=${domain}. If this forwarded into the unified Gmail, ${domain}'s catch-all is working.</p>`;
+    let result;
+    try {
+      const res = await fetch(GEORGE, {
+        method: 'POST',
+        headers: { 'Content-Type': 'application/json', 'Authorization': AUTH },
+        body: JSON.stringify({ account: 'steve-office', to: 'info@' + domain, subject, body }),
+      });
+      const j = await res.json();
+      result = { domain, ok: !!j.success, messageId: j.messageId || null, error: j.error || null };
+    } catch (e) {
+      result = { domain, ok: false, messageId: null, error: String(e.message || e) };
+    }
+    if (result.ok) okCount++;
+    fs.appendFileSync(SENDS, JSON.stringify(result) + '\n');
+    sent++;
+    if (sent % 5 === 0 || sent === domains.length) {
+      patch({ done: sent, note: `sending — ${sent}/${domains.length} probes out (${okCount} accepted)` });
+    }
+    await sleep(3000);
+  }
+  patch({ done: sent, note: `${sent} probes sent (${okCount} accepted) — waiting 4 min for catch-all forwarding` });
+  await sleep(240000);
+  patch({ done: sent, note: `${sent} sent — forwarding window elapsed, ready for Gmail tabulation`, sendPhaseComplete: true });
+  console.log(`receive-test send phase complete: ${sent} sent, ${okCount} accepted, runId=${runId}`);
+})();

← c7b4ed0 bind viewer to 0.0.0.0 for tailnet access  ·  back to Purelymail Fleet Viewer  ·  receive test v2 — send from agentabrams to dodge Gmail self- 880c1c8 →