On Mon, Nov 17, 2008 at 11:07:44AM -0500, Wietse Venema wrote: > > I don't want to force a retry at the client side, I want to force > > the client to stop reusing the connection and open a new one from > > time to time. Ideally after a max number of messages, if not possible > > after a TTL for the connection between the SMTP client and Postfix. > > Can you describe the PROBLEM, instead of the SOLUTION (limit > connection reuse)?
If the right solution is to indeed cause clients to re-establish connections, the most plausible way to do that would be to issue a "421" response to the "RSET" command after ".". If the client is a Postfix system trying to re-use connections, it will discard the cached connection, and open a new one. Other MTAs may (will) behave differently, but this is the most robust approach as responding 421 to "MAIL TO", ... will be taken as a transaction failure, and will more likely cause the client to defer mail. The current implementation of RSET is subject only to the "junk command limit", which limits the number of non-transaction commands *before* a transaction, but not the total number for the connection lifetime. The feature the OP is requesting (if it in fact solves a real problem and is not the result of poor problem analysis), requires new code to implement an optional connection-wide limit on "RSET" commands. Note, this feature used on servers, would defeat the "time-domain" connection re-use strategy in Postfix clients. Postfix switched from re-use counters to re-use timers, because counters lead to "slow-attractor" problems, where a very slow busy server attracts all the available connections. Servers forcing clients into counted re-use model risk the same phenomenon unless they are behind load-balancers that implement a "least-connection" load distribution strategy. The dynamic behaviour of SMTP under load is rather subtle, naive anti-abuse strategies can damage the infrastructure by forcing sub-optimal client-behaviour onto legitimate and abusive systems alike. -- 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:[EMAIL PROTECTED]> 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.