Skip to content

IMAP bounce fallback only recognises a subset of hard-bounce codes #122

Open

Description

@JuansesDev

What happens

When no RFC 3464 Final-Recipient is present, the poller falls back to scanning for a fixed code set: \b(550|551|553|554|521)\b. DSNs reporting other hard-bounce codes (552, 555 and others) yield no recipient, so no suppression is written. The \Seen flag is also applied to the whole unread set rather than only to the messages that produced a recipient.

Where

  • backend/internal/service/bounce_imap.go:175 — the fallback pattern, used at :193-214.
  • backend/internal/service/bounce_imap.go:164-167 — \Seen handling.

Impact

Hard bounces silently fail to suppress, so the same address is mailed again.

Proposed fix

Widen the fallback to 5\d\d (or document the exact codes), and flag only the messages that produced a recipient.

Acceptance

  • A DSN with a 552 code produces a suppression entry.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions