On Fri, Jan 30, 2009 at 09:20:02PM +0100, Martijn Brinkers wrote: > > You are solving the wrong problem. Your filter absorbs mail too fast, > > queues it and then pushes back. It is far better for the filter to take > > its time before responding to "." and thus to tie up Postfix connections > > while the filter is catching up. > > You are completely right, that's what happens. But that's something I > currently have to work with. That's why I want to add the throttling to > the part that accepts the email to make it accept email slower when the > filter queue size exceeds a certain limit.
The only way to slow down a sneder to match your processing speed, without introducing massive latency by forcing the sender to defer mail, is to respond slowly, not respond in the negative. So no 4XX codes, just take your time responding to SMTP commands, and the best way to do that is to be a proxy, but if you can dynamically adjust your response latency based on the filter's queue size, go for it. You can take up to 300s to respond to EHLO or up to 600 to respond to ".". You can also change the timers on the sending Postfix if you wish, but you must respond positively a bit sooner than the timer expires, because the sender's clock may have started running before you got the SMTP command. A 10% safety margin should be enough. You really should reconsider the filter design. -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majord...@postfix.org?body=unsubscribe%20postfix-users> If my response solves your problem, the best way to thank me is to not send an "it worked, thanks" follow-up. If you must respond, please put "It worked, thanks" in the "Subject" so I can delete these quickly.