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 Cesar Bonadio <bo...@picture.com.br> on 2004/01/29 19:30:51 UTC

Message that locks james

Hello

Last week we found that our james server was using a lot of CPU
after several days trying to identify the problem we found a 
japanese message that was causing the problem. We have a custom mailet
that includes a SPAM string in the subject of the message, whem
we try to do that in this message the thread starts eating all the CPU
and locks the problem occours whem I try to get the subject line whith
getSubject()

I have created a little program that simulates the problem 

 
import javax.mail.internet.MimeMessage;
import java.io.*;
import javax.mail.*;
import javax.*;
import javax.mail.internet.*;
import javax.activation.*;
import java.util.Properties;
import java.util.Date;
                                                                                                                                             
class ts {
  public static void main (String[] args) throws Exception {
    Properties properties = System.getProperties();
    Session session = Session.getInstance(properties, null);
    FileInputStream fis = new FileInputStream("badmsg.txt");
    MimeMessage c = new MimeMessage(session, fis);
    System.out.println("Hello");
    String teste = c.getSubject();
    System.out.println("MSG:"+ teste );
                                                                                                                                             
  }
                                                                                                                                             
}


you can create a file named badmsg.txt with the following attached test
message 



Any idea how to solve this 

We are using Linux with 
java version "1.4.2-rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build
Blackdown-1.4.2-rc1)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-rc1, mixed mode)