james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Pangaro" <mpang...@lokitech.com>
Subject Patch to smtp handler
Date Sun, 25 Feb 2001 18:08:19 GMT
Hello again, everyone.
Just wanted to resubmit this patch to the SMTPHandler class. It effects a message limit size,
if configured in the configuration xml. I submitted this once before, and the patch was moved
to a second class SizeLimitedSMTPHandler due to issues surrounding performance. I'm sending
it back in hoping that it can actually make it in this time, and hoping that we can clear
up the issues around it.

First, the way that it's set up now, the only way the size limit is included is by deleting
the original SMTPHandler, renaming the SizeLimited one, and rebuilding, since the SizeLimited
version is never used. The patches to the SMTPServer were included, so the configuration is
loaded, but to no effect. This is definitely a downside to having two separate classes.

Second, the performance concerne centered around the James approach of delaying loading of
the MimeMessage until the last possible moment, since it could be large, and consume lots
of resources. To that end, I've embedded the getSize() call that loads the message in an if
statement, so that it'll only be loaded early if the size limit is in effect. That said, this
shouldn't really make much difference, since three lines later the message will be loaded
in order to be sent. Either way, with the if, the message won't be loaded any earlier unless

I guess there's not a big clamor for this feature, since nobody has lamented the fact that
it's not currently enabled, but since I wrote it, I figured I'd try and champion it. ;-)
Thanks for your consideration,
Matt Pangaro
Loki Technologies

p.s. There are a couple of lines that crept into the diff due to lingering tabs in the original.
I've left those in to purge the remaining tabs.

View raw message