You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Ke...@sunlife.com on 2002/10/22 18:59:24 UTC

Speed of email processing


Hello all!

I'm a pretty new user to James. I've got to build a pretty heavy mail based
application sometime next year for my company, and I'm beginning to use
James to evaluate it for this use. I'll be creating a totally custom
application that can send out e-mails to our customers from a variety of
groups in the company. It will have to catch bounces and manage them. Plus,
we want complete tracking/reporting of every thing that goes out. James
looks like what I need for all this - it looks great so far.

I'm using the "james-binary-2.1a1-2002-09-24.zip" that I downloaded last
week sometime. I'm writing JavaMail apps using jdk 1.3.1.

What I'm trying to do now is install James on my PC and develop a test bed
for our apps that I'll move onto a Solaris box when it's ready.
Specifically, I'm developing some JUnit tests for existing e-mail apps I
already have.

However, I'm having a couple issues:

I want to be able to write some emails using something like:

            Properties props = System.getProperties();
            props.put( "mail.transport.protocol", "smtp" );
            props.put( "mail.smtp.host", smtpServer );

            javax.mail.Session session = javax.mail.Session.getInstance( props, null );
            Message msg = new MimeMessage( session );

            msg.setRecipient( Message.RecipientType.TO, new InternetAddress("emailtestto@localhost") ) ;
            msg.setRecipient( Message.RecipientType.CC, new InternetAddress("emailtestcc@localhost") ) ;

            msg.setFrom (          new InternetAddress("emailtestto@localhost");
            msg.setSubject(      "Test Subject");
            msg.setText(            "This is a test");
            msg.setSentDate(  new java.util.Date() );

            Transport transport = session.getTransport( "smtp" );
            transport.addTransportListener( this );
            transport.connect();
            transport.send( msg );

I've added methods to implement the TransportListener interface. I copied these methods from another class that I know works corectly.

Here are the issues:

1. I don't seem to get 'callbacks' on the TransportListener interface methods. Not sure why -

2. Checking for new messages without opening the folder doesn't work. Is
this a supported feature that I may be implementing incorrectly? What's the
best way to determine if a new message is available for a user without
actually having to attempt to read a message (e.g., Message msg =
folder.getMessage(1); then throw an exception if a message isn't there...)


3. Messages to the 'cc' address dissapear. (I'm using file system mailboxes
on my machine to begin with - would move to SQLServer 2000 later likely).
When I send the first message, I can see in the smtp log they are accepted
correctly for the 'to' and 'cc' addresses - and I can see the files show up
in the users' directories. When I send the second message, the 'to'
addressee gets a second message in their directory, but the 'cc' user gets
the second message and their first one disappears. If I send 10 messages,
the 'to' would have ten messages, but the 'cc' would only have the 10th.
(I've done this.)  I don't have this problem if I use our Notes server as
the smtp host. The smtp log says all the messages are received correctly.



4. When I send a message and immediately attempt to read it, I read the
messages back only about 75% of the time. When it doesn't work, I can see
the messages in the user's directoy. It's as if I try to read too fast and
miss them. How long should it take for the messages to be procssed and
available for reading?



Thanks for any assistance. I've looked through the list archives for some
of these issues but haven't found what I was looking for. If I can get this
working correctly and get a stable environment then it's likely we'll be
building a relatively complex application on top of James in a few months.
Hopefully I'll be able to contribute at least some debugging then.



Thanks -

Kevin

























---------------------------------------------------------------------------
This e-mail message (including attachments, if any) is intended for the use
of the individual or entity to which it is addressed and may contain
information that is privileged, proprietary , confidential and exempt from
disclosure.  If you are not the intended recipient, you are notified that
any dissemination, distribution or copying of this communication is
strictly prohibited.  If you have received this communication in error,
please notify the sender and erase this e-mail message immediately.
---------------------------------------------------------------------------




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Speed of email processing

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
> > Messages to the 'cc' address dissapear.
> > If I send 10 messages, the 'to' would have ten messages,
> > but the 'cc' would only have the 10th.
> 
> I just tested this by sending to two accounts on my James server, 4 e-
> mails
> with a TO and a CC.  Each account received all 4 e-mails.  So I cannot
> reproduce this error.  Not saying that it doesn't exist, but I cannot
> reproduce it.  I use database storage.  Perhaps Peter or one of the
other
> folks who use the file system can see check it on their system.

I just ran a similar test.  It worked fine.

--Peter



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Speed of email processing

Posted by "Noel J. Bergman" <no...@devtech.com>.
> What I'm trying to do now is install James on my PC and develop a test bed
> for our apps that I'll move onto a Solaris box when it's ready.
> Specifically, I'm developing some JUnit tests for existing e-mail apps I
> already have.

I invite you to check the recent archives for the james-dev mailing list,
and subscribe.  One of the current topics is developing a test suite.

> 1. I don't seem to get 'callbacks' on the TransportListener
>    interface methods. Not sure why

That isn't in James, right?  This is a JavaMail question?

> 2. Checking for new messages without opening the folder doesn't work.

How are you checking for messages, and in what context (inside James or from
another app)?  James supports POP3 (IMAP is under construction) for mail
retrieval.

> What's the best way to determine if a new message is available for a user
without
> actually having to attempt to read a message

An MUA does this via features of the POP3 and IMAP protocols.

> Messages to the 'cc' address dissapear.
> If I send 10 messages, the 'to' would have ten messages,
> but the 'cc' would only have the 10th.

I just tested this by sending to two accounts on my James server, 4 e-mails
with a TO and a CC.  Each account received all 4 e-mails.  So I cannot
reproduce this error.  Not saying that it doesn't exist, but I cannot
reproduce it.  I use database storage.  Perhaps Peter or one of the other
folks who use the file system can see check it on their system.

> How long should it take for the messages to be procssed and
> available for reading?

I haven't timed it, and there is performance work being done now.  Plus, it
depends upon the complexity of your pipeline.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Speed of email processing

Posted by Danny Angus <da...@apache.org>.
Kevin,

As the old joke says, "if you want to get _there_ I wouldn't go from here sir"

> I want to be able to write some emails using something like:
> 
>             javax.mail.Session session = 
> javax.mail.Session.getInstance( props, null );
>             Message msg = new MimeMessage( session );
>             transport.send( msg );

Using James you wouldn't necessarily need to use JavaMail for sending (unless there are other pressures), just MimeMessage to create messages, check out jakarta-commons-sandbox-net, (.jar included in James/lib in current cvs) and jakarta-james/tests/EndToEnd.java (also only in cvs)

This shows how an app can deliver mail to James for further processing, You can then write Mailets to process the mail make distribution lists, logging whatever.

Or you could write a mailet, or a new service, which acts as a gateway between your app and James, accepting mail and inserting it into James spool (see fetchpop for example of how to wite a service to spool new messages).

> 3. Messages to the 'cc' address dissapear. (I'm using file system 
> mailboxes
> on my machine to begin with - would move to SQLServer 2000 later likely).
> When I send the first message, I can see in the smtp log they are accepted
> correctly for the 'to' and 'cc' addresses - and I can see the 
> files show up
> in the users' directories. When I send the second message, the 'to'
> addressee gets a second message in their directory, but the 'cc' user gets
> the second message and their first one disappears. If I send 10 messages,
> the 'to' would have ten messages, but the 'cc' would only have the 10th.
> (I've done this.)  I don't have this problem if I use our Notes server as
> the smtp host. The smtp log says all the messages are received correctly.

This issue may be because message ID's are being duplicated, but thats just a hunch, its not very clear where your app ends and where your use of James begins.

> 4. When I send a message and immediately attempt to read it, I read the
> messages back only about 75% of the time. When it doesn't work, I can see
> the messages in the user's directoy. It's as if I try to read too fast and
> miss them. How long should it take for the messages to be procssed and
> available for reading?

It can take a minute or two, or it can be very fast, James, in common with mail in general, makes no claims about delivery times.
We're currently looking at beefing up performance of connection handlers, and in the next cycle will be looking at the spoolmanager, so expect to see some improvements.

d.


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>