Hi,
Looking at [1], connectionLimit is the configuration to use for James2
(confirmed by the src you pointed).
James3 allows to configure connectionLimit and connectionLimitPerIP.
Thx, Eric
[1] http://james.apache.org/server/2/smtp_configuration.html
On 26/11/2012 13:50, Hamster wrote:
Thank you Eric,
I think that in James2 I can use connectionLimit on incoming leg and
deliveryThreads on outgoing leg.
from SMTPServer.java:
if (connectionLimit != null) {
theHandlerPool = new
HardResourceLimitingPool(theHandlerFactory, 5,
connectionLimit.intValue());
if (getLogger().isDebugEnabled()) {
getLogger().debug("Using a bounded pool for SMTP
handlers with upper limit " + connectionLimit.intValue());
}
} else {
// NOTE: The maximum here is not a real maximum. The
handler pool will continue to
// provide handlers beyond this value.
theHandlerPool = new DefaultPool(theHandlerFactory, null, 5, 30);
getLogger().debug("Using an unbounded pool for SMTP handlers.");
}
and then maybe add message handler:
from SMTPHandler.java:
//handle messages
if(mode == MESSAGE_RECEIVED_MODE) {
try {
getLogger().debug("executing message handlers");
List messageHandlers = handlerChain.getMessageHandlers();
int count = messageHandlers.size();
for(int i =0; i < count; i++) {
((MessageHandler)messageHandlers.get(i)).onMessage(this);
//if the response is received, stop
processing of command handlers
if(mode == MESSAGE_ABORT_MODE) {
break;
}
}
which will be invoked before SendMailHandler which will do the
incoming email throttling.
Make sense?
Cheers
---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org
For additional commands, e-mail: server-user-h...@james.apache.org