Delivery issues

3 views
Skip to first unread message

mlohbihler

unread,
Apr 26, 2010, 12:10:34 PM4/26/10
to Java Email Server
Hi all,

I get a number of errors due to specific email content that ends up
killing off the delivery threads. Please note that i don't have a
complete understanding of the delivery architecture yet, so i may say
some curious things.

1)
com.ericdaugherty.mail.server.services.smtp.support.Utils.flattenAddresses:

If the addresses collection is empty (no idea why this happens, but it
does), the toAddresses builder is empty, and line 91 dies with this:

Exception in thread "Deliver Standard 4"
java.lang.StringIndexOutOfBoundsException: String index out of range:
-1
at
java.lang.AbstractStringBuilder.deleteCharAt(AbstractStringBuilder.java:
770)
at java.lang.StringBuilder.deleteCharAt(StringBuilder.java:
263)
at
com.ericdaugherty.mail.server.services.smtp.support.Utils.flattenAddresses(Utils.java:
91)
at
com.ericdaugherty.mail.server.persistence.smtp.IncrementalFileIOProccessor.saveIncrement(IncrementalFileIOProccessor.java:
339)
at
com.ericdaugherty.mail.server.persistence.smtp.IncrementalFileIOProccessor.save(IncrementalFileIOProccessor.java:
245)
at
com.ericdaugherty.mail.server.services.smtp.SMTPSenderStandard
$StandardDeliver.run(SMTPSenderStandard.java:300)
at com.ericdaugherty.mail.server.services.smtp.SenderPool
$FastThread.run(SenderPool.java:128)

I'm not sure of the correct way to handle this.

2) Line 161 of
com.ericdaugherty.mail.server.services.smtp.SMTPSenderStandard throws
an NPE if the result of getUser is null. This is caught as a throwable
later on and handled, so not really a big deal, but i'm not sure if
this is what is intended since an explicit check for null happen in
the getUser method itself. The problem is that the processing
continues, and then dies with problem 1).

3) Line 548 of
com.ericdaugherty.mail.server.services.smtp.SMTPSenderStandard dies if
failedAddresses has a length of zero due to the get(0) call.

I hope this information is useful. I haven't tried to correct the
problems myself yet, in hopes that those who know the architecture
better will declare them trivial. If more information is required,
please don't hesitate.

Regards,
Matthew

--
You received this message because you are subscribed to the Google Groups "Java Email Server" group.
To post to this group, send email to java-ema...@googlegroups.com.
To unsubscribe from this group, send email to java-email-ser...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/java-email-server?hl=en.

mlohbihler

unread,
Apr 26, 2010, 7:02:13 PM4/26/10
to Java Email Server
FYI, the exceptions were too much of a nuisance, and so fixes had to
be made, right or wrong. How should i submit these back? Is there an
SVN repo or something?

Andreas Kyrmegalos

unread,
Apr 27, 2010, 12:03:52 PM4/27/10
to Java Email Server
Hello Matthew,

thank you for taking the time to have a look
at the code. There is a project page over at
sourceforge.
http://sourceforge.net/projects/javaemailserver/

Select Develop, Tracker, Patch and submit
the code there.

May I ask that you post the logs so I can
have more info? I can't remember if the
toAddress collection can have a zero
length. Maybe it is the case when messages
are meant to be bounced.

I will do my best to have an update today.
You could also try to build the code from the
latest source. There's considerable coverage
in the AdditionalNotes on how to do that.
And I could just post an updated binary
distribution in the group.


Andreas

Andreas Kyrmegalos

unread,
Apr 27, 2010, 12:16:20 PM4/27/10
to Java Email Server
A copy of your mail.conf would also be
handy.

Andreas Kyrmegalos

unread,
Apr 27, 2010, 12:51:57 PM4/27/10
to Java Email Server
I believe I have corrected the issue. You could
try building from source or get the binary from
the group file page.

The issue you encountered had to do with
repopulating the message toAddress list
with partial failed addresses. An improper
iterator handle was being called in place of the
proper one. It should work now as advertised.

I will monitor the group for the rest of the day.
If the fix doesn't work do post the logs, I will
be more than happy to assist.

Andreas
Reply all
Reply to author
Forward
0 new messages