Skip to content

Check return address domain for incoming messages #67

@link2xt

Description

@link2xt

We do not check it currently because we are not supposed to send bounce messages, but it looks like it's wrong, bounce messages are still sent in case some delivery is to over quota user: chatmail/relay#873

This makes sense in a hindsight: when chatmail relay gets incoming message over SMTP and it cannot be delivered to one of the recipients, we cannot reject it immediately because SMTP returns only one error for the whole message. It is then delivered over LMTP to Dovecot, which returns success for some recipients and error for others. Postfix then generates bounce message with delivery failure, but the message as a whole is accepted over SMTP.

Since we are sending messages to MAIL FROM: address in some cases, we need to check for incoming messages that the address is the same as the From: header address. If not, I would not reject the message because some servers may send different MAIL FROM: for reasons like using SRS, but replace MAIL FROM: with <> so no bounce is sent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions