KamoCRM

Dovecot push publishes once per mailbox, EHR letters get a subsystem; four stale tests fixed

FixEmailService
Shipped
October 28, 2026 at 2:38 AM UTC
Author
Kamo
Commit
8f82320

Production: - DovecotPushService published every arrival, change and unread recount once per application spelling of the mailbox. That fan-out existed because NATS subjects were case-sensitive; since f58cd6f lower-cased every mailbox subject, all spellings land on the SAME subject, so each new message went out N times on email.inbox.<addr> (indexer and NEW_EMAIL work repeated), N change events, and N IMAP unread recounts. The casings now collapse to one per subject (first spelling wins; subscribers match the mailbox ignoring case). - NoReplySubsystem had no home for the canonical template ehr.patient_message (EHR R2-4), so it fell into OTHER_TEMPLATES and could not be switched off on its own. New EHR subsystem for the ehr. prefix. Stored by name in a string column, so adding a constant is safe. Tests: - DovecotPushServiceTest: expects one publish on the lower-cased subject, not one per casing. - StatusReasonAdviceTest: AliasController takes a MemberRepository since 9fbb615; the test config supplies one whose member 5 is in the caller's org. - MailSearchWiringTest: EmailController takes a SiMailDoNotContactGuard since 31ddbfe; registered as a mocked Docstor.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing