Skip to content

LMTP connection failures return 554 instead of 450 (regression in 0.9.5) #872

Open

Description

@josharian

When we bounce our LMTP server, maddy now (as of 0.9.5) rejects RCPT with:

554 5.0.0 Internal server error

Previously, it returned a temporary error, so senders retried:

450 4.4.2 Network I/O error

The result is that we are losing some inbound emails.

Agent says:

fd6d880 changed attemptConnect in internal/smtpconn/smtpconn.go to wrap dial errors as fmt.Errorf("dialer: %w", err). wrapClientErr checks for *net.OpError with a plain type switch, so it no longer recognizes the wrapped error and falls through to the default case, which ends up as a 554. Reverting that line restores the 450. Using errors.As in wrapClientErr would also work and would keep the extra context.

Thanks!

Activity

  1. added a commit that references this issue on Oct 23, 2026
    faa1390
  2. moved this from Triage to TODO in Maddy Mail Server Task Trackeron Oct 29, 2026
  3. moved this from TODO to In Progress in Maddy Mail Server Task Trackeron Oct 29, 2026
  4. moved this from In Progress to Review in Maddy Mail Server Task Trackeron Oct 29, 2026
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

    bugSomething isn't working.

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions