Luc Pardon:
>
>
> On 26-07-18 17:19, Matus UHLAR - fantomas wrote:
> > Anyway, whole point of this discussion that working around problems by
> > violating RFC and re-sending hardly (5xx) refused mail through an ISP is
> > not
> > way to go.
>
> No, the "whole point" of the discussion is *not* that I want to work
> around just any 5xx problem.
>
> The only "problem" that I am trying to solve is how to detect that the
> other side is telling me to re-send through my ISP, so that I can oblige.
>
> With other types of 5xx, I would of course let the mail bounce as usual.
Conceivably, you could use the smtp_delivery_status_filter feature
to selectively replace 5xx responses with 4xx if the receiver does
not say things that look like 'user unknown'.
# Example for single-line server responses.
# If you add support for multiline replies, remember that the
# Postfix SMTP client uses the SMTP status from the last line.
if !/user unknown|unknown user|[^0-9]5\.1\.1[^0-9]/
/^5(.+)$/ 4$1
endif
Combined with smtp_fallback_relay=[mail.isp.com], this would punt
potentially resendable mail to the ISP.
Wietse