Remove smtp_should_reject & discourse-smtp-fast-rejection

Continuing the discussion from Seeing smtp_should_reject "400 bad request" failures on bounce processing:

I’m making this topic to summarise some internal discussion we’ve had.

We’ve identified that the codepath in smtp_should_reject is not functioning correctly and causing mail to be rejected in situations where it should not be.

Specifically:

  • bounce messages (having a null envelope-from)
  • forwarded mail to mismatch (the fast-rejection check used the envelope-to, whereas Discourse uses the To/CC headers)

This has caused problems for self-hosters using this:

There’s no interest in maintaining this code so we’re looking to remove it entirely.

Discourse PR:

(this doesn’t remove the endpoint as people’s installs will be trying to hit it - it changes it to always say “do not reject”)

mail-receiver PR:

4 likes

Both of these fixes appear to work independently of each other (i.e. getting either one will solve the problem) and neither seem to require any effort by people self-hosting beyond updating as normal, is that correct?

This is correct; my motivation is I suspect that people may not update mail-receiver as often as Discourse so I’d like to ensure those people still get the fix.

2 likes