Re: Bug: duplicate message ids

Chris Burdess <[email protected]> Thu, 26 Apr 2007 09:59:46 +0100
Newsgroups gmane.comp.java.classpath.extensions.javamail
Message-ID <[email protected]>
Boris Folgmann wrote:
> I'm using log4j-1.2.13 in a tomcat webapp. I've configured log4j to  
> send an email for errors of category ERROR and higher. Our old  
> configuration was
> SUN's javamail-1.3.1-2jpp and tomcat5-5.0.30-11jpp. The generated  
> message ids were of the format
>
> 30810565.1172372608329.JavaMail.tomcat4@<fqdn of the server>
>
> tomcat4 is the UNIX user of the tomcat5 installation. The numbers  
> were constantly changing, so we had no duplicate message ids.
>
> No we moved to a new system where we use classpathx-mail-1.1-1jpp  
> and tomcat55-5.5.17-4jpp. The format of the message ids is now
>
> 1677625.1177554343570.JavaMail.tomcat@<only hostname of the server>
>
> tomcat is the UNIX user of the tomcat55 installation. The numbers  
> are not constantly changing, so we have lots of duplicate message ids.
> The problem is, that my cyrus-imapd eliminates all mails with the  
> same message id, so we're losing a lot of mails here.
>
> As I don't know who creates these message ids I'm asking you if  
> that could be a javamail problem or a log4j problem.

It looks like it could be a JavaMail problem. The message-id is  
generated as a result of a call to the updateHeaders() method, and  
should be unique for each message instance.

I can update the algorithm to use the FQDN of the host, that's not a  
problem (although it means that GNU JavaMail will rely on Java 1.4 or  
later, I don't think that will be a problem for most people).

If the second number is not changing, that indicates a much more  
serious problem. Could you give an example of the code you're using  
to create and send the messages? You're not reusing MimeMessage  
object instances?

_______________________________________________
Classpathx-javamail mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpathx-javamail