Jamie McClelland via Postfix-users:
> On 1/20/26 4:44 PM, Wietse Venema via Postfix-users wrote:
> > Jamie McClelland via Postfix-users:
> >> Thank you for the quick response pointing me in a different direction.
> >> Since I've already written the TCP tables program that rate limits how I
> >> want, do you see any problems with this modified approach that uses TCP
> >> Tables?
> >
> > Postfix transport_maps are used for sender and recipient address
> > validation, before the SMTP server accept a message.
> >
> >> /etc/postfix/main.cf:
> >> smtpd_recipient_restrictions =
> >> ...
> >> check_recipient_mx_address tcp:127.0.0.1:1234
> >> ...
> >
> > check_recipient_mx_access?
>
> Whoops! Yes, I meant check_recipient_mx_access. I've updated the rest of
> this message to fix that typo.
>
> > Note that the query is made once per recipient, so multi-recipient
> > messages will result in over-counting.
>
> We generally set default_destination_recipient_limit to 1, so I am
> assuming that:
>
> 1. an email has two recipients
> 2. both have the same domain name
> 3. one lookup returns DUNNO, and will be delivered via the instance that
> received it
> 4. the other returns FILTER smtp:[somewhere.else], so would be delivered
> via somehwere.else
>
> Is that correct?
Unfortunately, no. Postfix remembers only the last FILTER action,
so if a message has multiple recipients then the last FILTER action
takes effect for all recipients.
I should have prefixed my workaround with the disclaimer that a
FILTER-based solution assumes that Postfix receives single-recipient
messages. That is a very common use case.
With _destination_recipient_limit=1, a transport_map based
approach will be better for multi-recipient messages.
Wietse
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]