MAS-WP-0003-T06: lifetime cap on sent replies (300), discard Postfix bounces
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assistant: claude-code Assistant-Model: opus Assistant-Process: 252470@bnt-lap001 Assistant-Session: ad628c8f-4be2-4979-94c9-76c7ed6f8241
This commit is contained in:
parent
8559b70dbd
commit
d4585eb542
5 changed files with 54 additions and 5 deletions
|
|
@ -83,6 +83,17 @@ def test_canonical_lifecycle(env):
|
|||
assert len(svc.outbox()) == before and len(svc.quarantine()) == 1
|
||||
|
||||
|
||||
def test_send_cap_keeps_replies_in_outbox(env):
|
||||
svc, send, *_ = env
|
||||
sent = []
|
||||
svc.smtp, svc.max_sent = ("127.0.0.1", 25), 2
|
||||
svc._send = lambda *a: sent.append(a)
|
||||
for n in range(3):
|
||||
send(f"ticket!callback@{D}", f"request {n}")
|
||||
assert len(sent) == 2 and svc.send_cap_reached()
|
||||
assert [r["sent"] for r in svc.outbox()] == [1, 1, 0] # third recorded, not sent
|
||||
|
||||
|
||||
def test_no_auto_reply_to_automated_mail(env):
|
||||
svc, send, *_ = env
|
||||
send(f"ticket@{D}", "out of office", extra="Auto-Submitted: auto-replied\r\n")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue