Thanks Viktor for your remarks:
- in my environment I do not have other FILTER rules.
- As far as I understood if an email has multiple recipients, and one
of them triggers check_recipient_mx_access all emails are routed
through the smtp relay specified by FILTER? If it is the case, it is
not a problem in my condition.

However I want to underline that is a temporary solution, until that
cloud provider responds to our ticket (that was opened about 10 days
ago) and tells us why emails are refused.

Il giorno gio 2 apr 2020 alle ore 10:42 Viktor Dukhovni
<[email protected]> ha scritto:
>
> On Thu, Apr 02, 2020 at 10:31:32AM +0200, [email protected] wrote:
>
> > Thanks Wietse, it worked!
>
> Do you have good reason to expect that this will never misroute
> multi-recipient email?  There's a difference between "it worked
> once" (in a simple test-case) and "it is reliable enough for
> production use".
>
> > > You can override the transport map with a FILTER command.
> > > However:
> > > - This works only for mail received with SMTP.
> > > - If a message has multiple recipients, the last FILTER command wins.
>       -------------------------------------------------------------------
>
> > > /etc/postfix/main.cf:
> > >     smtpd_recipient_restrictions =
> > >         # must go before permit_mynetworks
> > >         check_recipient_mx_access hash:/etc/postfix/rcpt_mx_access
> > >         permit_mynetworks
> > >         reject_unauth_destination
> > >
> > > /etc/postfix/rcpt_mx_access
> > >     123.456.123.456 FILTER smtp:[relayhost.com]
>
> The selected relayhost has to be appropriate for processing all
> recipients, not just the last one to match the FILTER rule.
>
> --
>     Viktor.

Reply via email to