Skip to content

A refused recipient drops the message for the rest of the envelope #8640

Description

@hpk42

When chatmail clients are used with non-relay setups there is a severe problem: async-smtp aborts the transaction at the first refused RCPT TO. Core then treats a permanent refusal of a single recipient as a permanent failure for everyone: the chunk loop in send_msg_to_smtp stops, the message is marked failed, and never retried for anyone. A transient refusal blocks everyone just the same, but keeps retrying the whole envelope.

Note that chatmail relays accept all recipients, and later asynchronously send a DSN failure message which core processes, except for broadcast channels, where handle_ndn skips them.

Once async-smtp reports per-recipient status, core needs to deal with per- recipient status, dropping permanent failures and accepted recipients from the envelope, and keeping only the transient ones.

Observed 2026-08-29, #8621 (review) :

src/smtp.rs:206: SMTP failed to send: Permanent(Response { ...
  message: ["5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table"] }).
src/smtp.rs:239: Permanent error, message sending failed.

Unrelated but visible in the same log: on a send failure core loads the message to mark it failed, which for insert_into_smtp() tombstones (keyupdates, securejoin) always fails and logs Failed to load Msg#319115 to mark it as failed: Message Msg#319115 does not exist. at error!.

Activity

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 is not working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions