Skip to content

SMTP 5xx errors outside RCPT are retried and never suppressed #123

Open

Description

@JuansesDev

What happens

Bounce classification runs only on the client.Rcpt error. A 5xx returned during Mail, Data, write or Close stays a generic error, which the broadcast worker treats as transient: it retries up to five times and never adds the recipient to the suppression list.

Where

  • backend/internal/service/email.go:1236-1241 — classifyBounce applied to the RCPT error only.
  • backend/internal/service/email.go:1232-1251 — the other phases return plain errors.
  • backend/internal/service/broadcast_worker.go:121-133 — transient handling.

Impact

Permanent failures are retried five times and never suppressed.

Proposed fix

Classify 5xx responses from the DATA phase too.

Acceptance

  • A 554 during DATA marks the send bounced, suppresses the recipient and does not retry.
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