On Mon, Sep 14, 2009 at 11:24 AM, Milind Limaye <[email protected]> wrote: > Hi, > I am wondering whether it is possible to associate priority with a spool, so > that mails from higher priority spool should be delivered first before > delivering emails from lower priority spool. Or at least there would be less > number of threads for delivery of lower priority spool compared to higher > priority one.
this should be possible though you might need to contribute some code... > Here is brief background about the problem I am trying to solve > > - Few users are associated with a Mail Server > - But the Server may not be connected to the rest of the world all the time > - When Mail Server is not connected to the world, users on the server can > exchange emails between them. But during disconnected state, emails meant > for outside users will be queued > - When the server establishes connectivity with other hosts, queued emails > are tried for delivery. Usually this works as FIFO. > - But what I want is - there are certain set of users (say high priority > users), whose emails should not get blocked behind emails queued by lower > priority emails. > > I am new to James, so wondering whether James can support such multiple > priority queues/spools? james support multiple processing queues. mail can be directed onto them by mailets. take a look at the sample configuration to get a feel for how this works. i'm not sure whether the current code supports priority processing (hopefully someone with jump in with details if it does) > If so, can you provide some guidance about how to > achieve the same? the spooling code is contained in the spoolmanager module[1]. it seems reasonably self contained. after a look at the code, i can see a couple of ways that you might implement this feature now that 3.0 is committed to java 1.5. i'm a big fan of java.util.concurrent. so i'd probably just replace the current avalon based implementation with shiny, new high performance implementation based on java.util.concurrent. if you don't know that well then probably just prioritising the current avalon based code should work. i think we'd be interested in the implementation if you would like to contribute it ;-) - robert [1] james is available from http://svn.apache.org/repos/asf/james/server/trunk/ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
