Hi. for 1 and 2 check the source:
http://svn.apache.org/repos/asf/james/server/trunk/mailets-function/src/main/java/org/apache/james/transport/mailets/RemoteDelivery.java The inner class MultipleDelayFilter will show you howto implement such a logic. For 3 hopefully some other can jump in.. Bye, Norman Ps: I will cc the server-dev list which is usally the best list to ask such questions ;) 2009/8/10 冉兵 <[email protected]>: > Hi, Norman, > > That's what I thought I'd start with. Here is my plan: > > Keep a counter that tracks the number of mails sent to a domain. If a new > mail comes in and sending it would top the allowed limit, I add a delay to > it and put it back in the pool and wait for it to be presented to the mailet > again once the delay expires. > > So my questions are: > > 1. How to add a delay to a mail? Is there is code snippet that shows how to > manipulate the delays for a particular mail. > 2. How does James determine the next email in the pool to send to the > outbound process pipeline? > 3. Since I'm on the James trunk and using the Spring deployment, how do I > inject a bean to a mailet? > > Any quick pointers are appreciated! > > Bing > > > -------------------------------------------------- > From: "Norman Maurer" <[email protected]> > Sent: Monday, August 10, 2009 1:48 PM > To: "James Users List" <[email protected]> > Subject: Re: throttle > >> Hi, >> >> the easiest way would be to create your own RemoteDelivery Mailet. >> Just check the source code.. >> >> Bye, >> Norman >> >> 2009/8/10 冉兵 <[email protected]>: >>> >>> Hi, >>> >>> I'm thinking of adding outbound throttle to James. Since my company has >>> started using James as the company email server, we have found some sites >>> have a upper limit of emails they accept from my domain. I'd like to >>> throttle the outbound traffic based on the destination domain. >>> >>> Is there a related feature in James yet? What would be the cleanest way >>> to implement such a feature? I can work with the source code if I need. >>> >>> Any advice would be appreciated. >>> >>> Bing >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
