Fix protocol-crossed credential checks blocking SMTP preflight despite successful Mail server test #99

Closed
opened 2026-09-07 16:02:03 +02:00 by zemion · 2 comments
Owner

Observed: synchronous Campaign send returns 422 claiming DNS/connectivity/TLS/auth preflight failed, despite successful Mail server connection test. No delivery attempts were recorded for the affected current build.

Root cause reproduced with isolated real SQLite Mail hierarchy: system policy forbids credential inheritance for BOTH SMTP and IMAP. Full campaign configuration explicitly selects both and summary validation succeeds. SMTP batch/single-send authorization constructs an SMTP-only selection, but the shared helper wrongly demands an IMAP credential too. It rejects before connection. IMAP append has the symmetric issue.

Scope: protocol-scoped runtime credential checks, preserving complete authoring/summary checks, selected-protocol authorization and revision-before-decryption. Campaign errors distinguish profile/credential policy from configuration and transport failures, with sanitized messages/audit codes. No-effect wording must be restricted to errors before batch entry succeeds. EN/DE owning-module documentation and isolated regressions included.

Recovery/retry/resume UI changes are explicitly postponed at user request; no live sending, policy changes, or campaign rebuilding authorized by this fix. Work is local/unpublished; verification in progress.

Observed: synchronous Campaign send returns 422 claiming DNS/connectivity/TLS/auth preflight failed, despite successful Mail server connection test. No delivery attempts were recorded for the affected current build. Root cause reproduced with isolated real SQLite Mail hierarchy: system policy forbids credential inheritance for BOTH SMTP and IMAP. Full campaign configuration explicitly selects both and summary validation succeeds. SMTP batch/single-send authorization constructs an SMTP-only selection, but the shared helper wrongly demands an IMAP credential too. It rejects before connection. IMAP append has the symmetric issue. Scope: protocol-scoped runtime credential checks, preserving complete authoring/summary checks, selected-protocol authorization and revision-before-decryption. Campaign errors distinguish profile/credential policy from configuration and transport failures, with sanitized messages/audit codes. No-effect wording must be restricted to errors before batch entry succeeds. EN/DE owning-module documentation and isolated regressions included. Recovery/retry/resume UI changes are explicitly postponed at user request; no live sending, policy changes, or campaign rebuilding authorized by this fix. Work is local/unpublished; verification in progress.
Author
Owner

Implemented locally and verified. Mail SMTP batch/single and IMAP append now apply credential-selection policy to their own protocol; full authoring/summary validation still checks both. Selected-protocol missing/inactive/wrong-server/wrong-tenant credentials and stale revisions remain blocked before decryption. Recipient policy remains enforced before connection. Campaign reports sanitized profile-policy/configuration/authentication/connectivity failures separately, and does not claim no delivery for a late batch-exit failure.

Verification: 97 targeted Campaign tests passed; Mail documented full unittest suite188/188 passed; 22 new real-SQLite hierarchy regression cases passed; Mail documentation9 tests passed. All72 manifests and whitespace checks passed. New hierarchy regression is wired into workspace focused checks. Broad focused gate still stops on unrelated expired institutional-governance fixture (tests/test_institutional_governance_journey.py:223). Mail pytest-all additionally exposes existing test_jmap_connection import/fixture collection error; the documented unittest suite is green.

Live bounded checks confirmed both explicit credential selections and the same SMTP server as the user test. A dedicated connection-only test using the exact campaign profile/server/credential/context returned ok=true and authenticated=true. No messages or recipients were submitted to this test. Current build inspection showed183not_queued,8skipped and0attempts. Development backend hot-reloaded the fix. No policies, credentials, campaign versions, review evidence or job states were changed by this fix. Existing rate4messages/minute was left untouched. Recovery/resume/retry UI work remains explicitly postponed. Changes are unpublished; keep this issue open until publication/acceptance.

Implemented locally and verified. Mail SMTP batch/single and IMAP append now apply credential-selection policy to their own protocol; full authoring/summary validation still checks both. Selected-protocol missing/inactive/wrong-server/wrong-tenant credentials and stale revisions remain blocked before decryption. Recipient policy remains enforced before connection. Campaign reports sanitized profile-policy/configuration/authentication/connectivity failures separately, and does not claim no delivery for a late batch-exit failure. Verification: 97 targeted Campaign tests passed; Mail documented full unittest suite188/188 passed; 22 new real-SQLite hierarchy regression cases passed; Mail documentation9 tests passed. All72 manifests and whitespace checks passed. New hierarchy regression is wired into workspace focused checks. Broad focused gate still stops on unrelated expired institutional-governance fixture (tests/test_institutional_governance_journey.py:223). Mail pytest-all additionally exposes existing test_jmap_connection import/fixture collection error; the documented unittest suite is green. Live bounded checks confirmed both explicit credential selections and the same SMTP server as the user test. A dedicated connection-only test using the exact campaign profile/server/credential/context returned ok=true and authenticated=true. No messages or recipients were submitted to this test. Current build inspection showed183not_queued,8skipped and0attempts. Development backend hot-reloaded the fix. No policies, credentials, campaign versions, review evidence or job states were changed by this fix. Existing rate4messages/minute was left untouched. Recovery/resume/retry UI work remains explicitly postponed. Changes are unpublished; keep this issue open until publication/acceptance.
Author
Owner

Reconciled 2026-09-08: implemented and published

This supersedes the earlier local/unpublished status. The owning fix is on remote main and the verified v0.1.28 tag (commit c51fc180fba7), included in the published 0.1.45 source/package composition.

Mail runtime authorization now checks the selected protocol without incorrectly requiring the other protocol credential; full authoring/summary checks and revision-before-decryption remain enforced. Mail test_campaign_protocol_authorization.py and Campaign test_mail_profile_boundary.py cover the symmetric SMTP/IMAP cases and sanitized pre-batch distinctions. Mail v0.1.27 contains the owning protocol fix. The recovery work postponed in this issue was subsequently requested and separately implemented under #100. No live sending was used in this audit.

The completed, unmodified release tools/checks/check-focused.sh run passed, including 213 browser conformance cases and the relevant backend suites. The audit matched current remote branches/tags and reviewed the original acceptance criteria and subsequent comments. Closing the implemented source/package scope. This is not a runtime deployment claim: Meta #52 and website #9 retain their independent runtime/public-site holds. No tag was moved.

<!-- govoplan-issue-reconciliation-20260908-published-fixes-v1 --> ## Reconciled 2026-09-08: implemented and published This supersedes the earlier local/unpublished status. The owning fix is on remote `main` and the verified [`v0.1.28` tag](https://git.add-ideas.de/GovOPlaN/govoplan-campaign/src/tag/v0.1.28) ([commit `c51fc180fba7`](https://git.add-ideas.de/GovOPlaN/govoplan-campaign/commit/c51fc180fba75441dbd19c25b02a3ddc37c81a5d)), included in the published [0.1.45 source/package composition](https://git.add-ideas.de/GovOPlaN/govoplan/src/commit/88b685ff5e689acf096bdfc7084bd108e801e86e/docs/releases/0.1.45.md). Mail runtime authorization now checks the selected protocol without incorrectly requiring the other protocol credential; full authoring/summary checks and revision-before-decryption remain enforced. Mail `test_campaign_protocol_authorization.py` and Campaign `test_mail_profile_boundary.py` cover the symmetric SMTP/IMAP cases and sanitized pre-batch distinctions. Mail v0.1.27 contains the owning protocol fix. The recovery work postponed in this issue was subsequently requested and separately implemented under #100. No live sending was used in this audit. The completed, unmodified release `tools/checks/check-focused.sh` run passed, including 213 browser conformance cases and the relevant backend suites. The audit matched current remote branches/tags and reviewed the original acceptance criteria and subsequent comments. Closing the implemented source/package scope. This is not a runtime deployment claim: [Meta #52](https://git.add-ideas.de/GovOPlaN/govoplan/issues/52) and [website #9](https://git.add-ideas.de/add-ideas/addideas-govoplan-website/issues/9) retain their independent runtime/public-site holds. No tag was moved.
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-campaign#99