I'm pretty certain now 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] = [EMAIL PROTECTED]
Delivery thread after retrieve mail.To [0] = [EMAIL PROTECTED]
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 added:

                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);
                MailImpl newMail2 = outgoing.retrieve(key);
                dumpMessage("Delivery thread after 2nd store and retrieve
mail", newMail2);

This means retries don't work and it means bounces don't work.

Steve
System Architect
PostX Corporation


-----Original Message-----
From: Shal Jain [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 11:35 AM
To: James Users List
Subject: Re: spooling problem


Here's my scenario - (perhaps out of the norm)

I'm using JAMES to recieve email but not using JAMES to send email out
email is being sent out using my ISP as per the snippet below

    private final static String SMTPHOST = smtp.myisp.com;
    Properties props = System.getProperties();
    props.put("mail.host",SMTPHOST);
    props.put("mail.transport.protocol","smtp");


my mailet is configured in James as follows:

   <mailet match="HostIs=mail.abc.com,mail.xyz.com"  class="MsgFiler">
           <passThrough> false </passThrough>
            ... other params ...
    </mailet>


Now when James recieves an email directed to one of the hosts (currently
those are the only hosts it will receive for because of MX record
entries), the msgFiler mailet receives email and processes it.  Based on
certain conditions, the mailet will decide to
"forward" the message to other email addresses.  Here's where the issue
crops up.  If a recipient happens to belong to one of the domains being
intercepted by the mailet, the mail sits in the spool.  Again as noted above
James is not being used to send email,  so the mail message should go
directly via
the ISP.

Am I missing something here.







----- Original Message -----
From: "Steve Short" <[EMAIL PROTECTED]>
To: "'James Users List'" <[EMAIL PROTECTED]>
Sent: Thursday, February 14, 2002 12:24 PM
Subject: RE: spooling problem


> This could be related to a problem I'm investigating.  It all started for
me
> with bounced messages not working when using the RemoteDelivery mailet.
> What appears to be happening is that if the message does not get delivered
> first time, it is losing attributes, headers and recipient addresses, from
> address etc during the retry processing.
>
> I haven't got the full picture yet, but it looks like the bounce() method
in
> James is trying to pull recipient and sender information from the
> MimeMessage embedded within MailImpl object, but that the MimeMessage is
> actually an instance of MimeMessageWrapper.  MimeMessageWrapper uses lazy
> initialization of some of it's fields, e.g. headers and message and these
> lazy fields have not been populated when bounce() tries to use them.
>
> I think the same kind of thing is happening to retries so that the header
> and recipient info is being lost at some point.
>
> I'm not totally sure of all this - but it's as far as I have got so far.
>
> Cheers
> Steve
>
>
>
> -----Original Message-----
> From: Lucas Gonze [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, February 14, 2002 9:53 AM
> To: James Users List
> Subject: Re: spooling problem
>
>
> I suspect this the same bug I reported before -- that mails which don't
> get sent immediately never go out.
>
> On Thu, 14 Feb 2002, Shal Jain wrote:
>
> > Yes it does..
> > I'm not using James to send outbound emails.  Its being used strictly
for
> > processing inbound emails.
> > If I can process the email, it gets ghosted.  If I can't process the
email
> > then it gets sent to a local account 'unfiled@localhost'
> > In case of failure, the mail state is set to 'Error'.  The processing is
> > done via a custom mailet and the passthrough flag is set to false
> >
> > What I have noticed is that in certain cases (working on narrowing these
> > down), the email that's received in James, even though its processed
> > correctly by the
> > mailet, still hangs around in the spool.  If I manually clear out the
> spool
> > folder, emails seem to get processed.  However, if I let
> > the spool folder buildup, then James stops passing the email to my
mailet.
> > I then restart James, causing the emails to be processed
> > and then I manually clear the spool folder out again
> >
> > I'm digging through the mailet code but would appreciate any hints on
what
> > to look for
> >
> > ----- Original Message -----
> > From: "Serge Knystautas" <[EMAIL PROTECTED]>
> > To: "James Users List" <[EMAIL PROTECTED]>
> > Sent: Thursday, February 14, 2002 10:02 AM
> > Subject: Re: spooling problem
> >
> >
> > > All emails pass through the spool, so it's not a question of why
they're
> > > getting dumped to the spool but rather why they're not leaving the
> spool.
> > >
> > > I would guess that the threads of the spool manager are getting killed
> or
> > > hung, so eventually you run out of threads and messages just stay
there.
> > > I'm not sure what would be killing/hanging the threads.  Does
restarting
> > the
> > > server process those messages?
> > >
> > > Serge Knystautas
> > > Loki Technologies - Unstoppable Websites
> > > http://www.lokitech.com/
> > > ----- Original Message -----
> > > From: "Shal Jain" <[EMAIL PROTECTED]>
> > > To: "James Users List" <[EMAIL PROTECTED]>
> > > Sent: Wednesday, February 13, 2002 10:32 AM
> > > Subject: spooling problem
> > >
> > >
> > > > I'm running James ver. 2.0a1 with a custom mailet whose sole job is
to
> > > catch
> > > > all emails that come in and either process (set state to GHOST) or
> file
> > > them
> > > > into a james defined account.
> > > >
> > > > What I have noticed over the last couple of days is that after
> startup,
> > > any
> > > > email received to James gets processed right away
> > > > but after N hours of running, the mails start getting dumped to the
> > spool
> > > > directory.
> > > >
> > > > Any clues as to what would cause incoming mails to go to the spool
> > folder
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to