On Thu, Apr 10, 2025 at 10:27:24AM +0200, Gioele Pannetto via Postfix-users 
wrote:

> On 09/04/25 16:28, Viktor Dukhovni via Postfix-users wrote:
> > > For this use case a post-queue milter is more suitable. By the way, are 
> > > you
> > > referring to non_smtpd_milters?
> > 
> > No, you'd actually need to arrange a "content_filter"-style internal
> > delivery, but not actually have any sort of SMTP proxy in the middle,
> > but just deliver the message to a re-injection port where a second
> > Postfix smtpd(8) would run the desired milter(s).
> > 
> > You'd then probably not enable any milters on the first hop, in
> > either smtpd or cleanup, and in particular therefore use separate
> > cleanup services for the two stages.
> 
> I was able to resolve my issue using the content-filter.
> You've been very helpful.

You're welcome.  With the content_filter approach, you also get
low client-to-server latency, and get better control of the
concurrency required to handle the anticipated load.

So you may want to tune the "scan_destination_concurrency_limit",
(assuming your content_filter transport is "scan:[127.0.0.1]:<port>" and
the associated smtp(8) delivery agent entry is called "scan" in
master.cf).  Throughput ~ concurrency/latency, so once you have a fair
idea of the typical milter latency, and the required throughput, set the
concurrency accordingly to avoid excessive CPU load or memory footprint.

If the milter can work with multiple recipients, set a high
"scan_destination_recipient_limit" (say 1000), if the milter requires
single-recipient deliveries, be aware that a single incoming
multi-recipient message will be scanned many times, and consider
setting a lower smtpd_recipient_limit (RFC5321 requires at least
100, so that'd be a reasonable reduction from the default 1000).

The 800-lb gorilla email providers often impose lower limits despite the
RFC, but I wouldn't recommend that.  A lower limit undress "stress" may
be reasonable, but only if you feel that's needed.

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to