On Wed, Dec 14, 2022 at 10:43:14AM -0500, Wietse Venema wrote: > > > query = update send_counts ... > > > > How exactly do you imagine integrating such a query into Postfix? > > > > [ Hint using this as a transport table may not do what you think > > it does. Transport lookups happen per-recipient and in both > > smtpd(8) and qmgr(8) where lookups happen each time a message > > enters the active queue (and before actual delivery). ] > > > > And is sending a small batch of messages and then stopping really a more > > effective approach to avoid problems due to lack of "reputation" with > > new new IPs? > > I suppose that the idea is to rate-limit traffic based on IP > reputation. Just using randmap to send 1% of a million could still > be too much if the deliveries happen in a short time. > > This would take a transport map whose response depends on how much > mail has been delivered (over an interval of time). The number of > queries is an estimator that may be off by a factor but that would > be OK if that factor is constant.
Perhaps, but I'd rather expect the operator to have a good idea of the expected full traffic rate, and if needed choose initial fractions that are less than 1% (the prototype Postgres RNG can easily be tuned for more fine-grained initial sampling, 0.1% or whatever). Counting messages feels too complex to me, but sure so long as one understands that transport queries over-estimate deliveries, whatever rocks one's boat. -- Viktor.