Adds tests/test_integration_send_scan.py: 7 harness-gated cases covering delivery and Message-ID correlation, scanner ingestion without a delivery claim, idempotency, resend, suppression, rejected requests never reaching the provider, and verification mail carrying no authorization. Fixes the reply heuristic, which matched against headers as well as body. The Received: trace that every MTA-handled message carries matched its "received" keyword, so ordinary mail was classified human_reply with a success.reply_received assessment at medium confidence -- the exact overclaim this repo exists to prevent. Hand-written fixtures have no Received headers, so only real scanned mail exposed it. The heuristic now takes the body alone; DSN detection still sees headers, which it needs. Regression test is offline. Fixes the provider reference: SMTPProvider set no Message-ID, so send() fell back to abs(hash((recipient, subject))) -- randomized per process and colliding for equal recipient/subject. Outgoing mail now carries a proper RFC 5322 Message-ID, returned as the reference, which is what makes send-to-scan correlation testable. Suite: 72 passed with the harness up, 62 passed + 10 skipped with it down. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
13 lines
542 B
Text
13 lines
542 B
Text
Received: from sender.example.test (sender.example.test [192.0.2.10])
|
|
by mx.example.test with ESMTP id ABC123
|
|
for <person@example.test>; Tue, 02 Jun 2026 10:00:00 +0000
|
|
Received: by sender.example.test with SMTP id XYZ789;
|
|
Tue, 02 Jun 2026 09:59:58 +0000
|
|
Message-ID: <transit-1@example.test>
|
|
Date: Tue, 02 Jun 2026 10:00:00 +0000
|
|
From: noreply@example.test
|
|
To: person@example.test
|
|
Subject: Your invitation
|
|
Content-Type: text/plain; charset="utf-8"
|
|
|
|
You have been invited. Continue securely at https://portal.example.test/invitations/inv-1
|