You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Steve Short <St...@PostX.com> on 2002/02/15 19:17:44 UTC
Problem with Retries and Bounces
Hi,
this info first appeared as a reply in the 'spooling problem' thread in the
James Users list but no one commented on it there so I thought I'd post it
here.
I'm pretty certain that James is losing some attributes from the mail
message during the store/retrieve cycle. It seems to work ok the first time
round for each message, but the second time round it doesn't get a full copy
of the message. I changed the run() method of RemoteDelivery to dump out
parts of the message and this is what I get:
Started SMTP Server plain:25
Delivery thread after retrieve mail.From [0] = sshort@postx.com
Delivery thread after retrieve mail.To [0] =
null1001@XXXrhino.postx.com
Delivery thread after retrieve mail.Subject = Message form Perl
script
mailtest.pl
Delivery thread after store and retrieve mail.From = null
Delivery thread after store and retrieve mail.To = null
Delivery thread after store and retrieve mail.Subject = null
Delivery thread after 2nd store and retrieve mail.From = null
Delivery thread after 2nd store and retrieve mail.To = null
Delivery thread after 2nd store and retrieve mail.Subject = null
Here's the snippet of code I modified in the run() method of RemoteDelivery:
log(Thread.currentThread().getName() + " will process mail "+ key);
MailImpl mail = outgoing.retrieve(key);
dumpMessage("Delivery thread after retrieve mail", mail);
outgoing.store(mail);
MailImpl newMail = outgoing.retrieve(key);
dumpMessage("Delivery thread after store and retrieve
mail",newMail);
outgoing.store(mail);
MailImpl newMail2 = outgoing.retrieve(key);
dumpMessage("Delivery thread after 2nd store and retrieve mail",
newMail2);
I haven't got the full picture yet, but it looks like the combination of
the Mail wrapper classes that James uses do not fully preserve the object
state during the store / retrieve cycle. I can force things to work by added
a
call to mail.getMessage().saveChanges() after the first retrieve, but it
seems to
me that this is really a workaround to the root problem, but I am not sure
what
the correct solution it.
This consequence of this is that retries and bounces do not work and testing
confirms this.
Any comments, folks?
Regards
Steve
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>