> Otherwise, use check_policy_service with custoim policy server
> that returns FILTER commands to route the message.
On Mon, Jul 21, 2025 at 02:59:40PM +0200, Matus UHLAR - fantomas via
Postfix-users wrote:
postfwd works as policy filter, so it can do that.
Note that in order to know number of recipients, you must call postfwd from
smtpd_data_restrictions or smtpd_end_of_data_restrictions
On 21.07.25 23:23, Viktor Dukhovni via Postfix-users wrote:
You left out the word "also", the policy service will need to be called
from smtpd_recipient_restrictions first, in order to count the
recipients, and then finally apply that count in the data phase.
This should not be needed, postfix provides recipient_count to policy
server in the latest phases.
Unless you want to count them yourself (e.g. skip some recipients)
Since this sounds like an MSA, one would typically have rules in place
that permit SASL authenticated users, ... and of course the recipient
counting would have to happen *before* these permits fire.
I think this only applies in the smtpd_recipient_restrictions phase.
A milter may be able to count recipients and add a header with the
recipient count that could be used with milter_header_checks. This
could be more reliable than careful staging/timing of policy service
callouts.
It would also have to be the case that none of the recipients are local,
the MSA would have to be essentially a null client, handing off *ALL*
mail to smarthost, since FILTER actions that select a remote SMTP server
would break that.
good point, messes up things together with "overrides content_filter" part
if OP uses content_filter
My advice is to try to avoid "clever" configurations of this sort.
--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Eagles may soar, but weasels don't get sucked into jet engines.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org