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 Stefano Bagnara <ap...@bago.org> on 2006/10/02 20:57:12 UTC

Re: getting error messages

Hi Mark,

unfortunately temporary errors are not recorded but only counted.
So you won't get any information about a repeated temporary error in a 
bounce.

Currently, you'll have to change RemoteDelivery and DSNBounce to get 
your expected behaviour.

Stefano

Mark Waschkowski wrote:
> Hi,
> 
> I would like to include the full error message that occurs if an email
> cannot be delivered. I have created a BounceMailet that inserts some data
> into my database and everything is working except for the actual error
> message. The error message I get is, wait for it...
> 
>   '6'
> 
> I thought this was interesting, so I checked out the source, and its this
> line in the RemoteDelivery class that sets that value:
> 
>   mail.setErrorMessage(retries + "");  (line 661)
> 
> Ok, so I'm set to 6 retries currently (going to change that to 3 right now)
> so that matches up. However, what I would really like to see is what is 
> seen
> in the logs, something like:
> 
> 30/09/06 13:52:13 INFO  James.Mailet: RemoteDelivery: Could not connect to
> SMTP host: 208.48.34.132, port: 25;
>  nested exception is:
>        java.net.ConnectException: connection to 208.48.34.132 timed out
> 30/09/06 13:52:13 INFO  James.Mailet: RemoteDelivery: Temporary exception
> delivering mail (Mail1159642077612-3-to-test.com:
> javax.mail.MessagingException: No mail server(s) available at this time.
>        at org.apache.james.transport.mailets.RemoteDelivery.deliver(
> RemoteDelivery.java:617)
>        at org.apache.james.transport.mailets.RemoteDelivery.run(
> RemoteDelivery.java:912)
>        at java.lang.Thread.run(Thread.java:595)
> 
> I can't see anywhere else in the RemoteDelivery class where the above error
> message is associated to the org.apache.mailet.Mail object that I'm working
> with in my BounceMailet, but it seems to me like I might be missing
> something because that seems like a natural thing to do. Or maybe there is
> some other way to get access to the error message (context or something),
> I'm not sure. Can anyone straighten me out here, or do I have to hack up
> RemoteDelivery to do this?
> 
> Thanks,
> 
> Mark
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: getting error messages

Posted by Mark Waschkowski <mw...@gmail.com>.
Hi Stefano,

Thanks for the information. Since I'm actually only interested in the final
error message (that the message actually got bounced), I'll guess I'll just
extend Bounce and put in my custom code in the service method, and then just
call super.service and let James continue like normal...

Thanks alot for your help, I feel like I may be able to add my own little
piece of code without feeling like I might be breaking something.

Best,

Mark

On 10/3/06, Stefano Bagnara <ap...@bago.org> wrote:
>
> Mark Waschkowski wrote:
> > Hi Stefano,
> >
> > Thanks for the response.
> >
> > I looked at the source and was hoping to look at the javadocs for it - I
> > guess I need to generate the javadocs from source eh? I can't seem to
> see
> > anywhere that has them done already...
>
> You can find apidocs and xrefs for 2.3.0RC3 here:
> http://james.apache.org/server/2.3.0/project-reports.html
>
> > This link online isn't working (bottom of
> > http://james.apache.org/server/2.2.0/index.html)
> > http://james.apache.org/server/2.2.0/FAQ.html
> >
> > So, if I was only interested in the final error, would best approach be
> to
> > extend Bounce and implement a custom Service method?
> >
> > Mark
>
> Maybe you also need to change RemoteDelivery: I don't remember if the
> temporary exception is appended to the message for this scenario.
>
> Stefano
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>

Re: getting error messages

Posted by Stefano Bagnara <ap...@bago.org>.
Mark Waschkowski wrote:
> Hi Stefano,
> 
> Thanks for the response.
> 
> I looked at the source and was hoping to look at the javadocs for it - I
> guess I need to generate the javadocs from source eh? I can't seem to see
> anywhere that has them done already...

You can find apidocs and xrefs for 2.3.0RC3 here:
http://james.apache.org/server/2.3.0/project-reports.html

> This link online isn't working (bottom of
> http://james.apache.org/server/2.2.0/index.html)
> http://james.apache.org/server/2.2.0/FAQ.html
> 
> So, if I was only interested in the final error, would best approach be to
> extend Bounce and implement a custom Service method?
> 
> Mark

Maybe you also need to change RemoteDelivery: I don't remember if the 
temporary exception is appended to the message for this scenario.

Stefano


---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


Re: getting error messages

Posted by Mark Waschkowski <mw...@gmail.com>.
Hi Stefano,

Thanks for the response.

I looked at the source and was hoping to look at the javadocs for it - I
guess I need to generate the javadocs from source eh? I can't seem to see
anywhere that has them done already...

This link online isn't working (bottom of
http://james.apache.org/server/2.2.0/index.html)
http://james.apache.org/server/2.2.0/FAQ.html

So, if I was only interested in the final error, would best approach be to
extend Bounce and implement a custom Service method?

Mark


On 10/2/06, Stefano Bagnara <ap...@bago.org> wrote:
>
> Hi Mark,
>
> unfortunately temporary errors are not recorded but only counted.
> So you won't get any information about a repeated temporary error in a
> bounce.
>
> Currently, you'll have to change RemoteDelivery and DSNBounce to get
> your expected behaviour.
>
> Stefano
>
> Mark Waschkowski wrote:
> > Hi,
> >
> > I would like to include the full error message that occurs if an email
> > cannot be delivered. I have created a BounceMailet that inserts some
> data
> > into my database and everything is working except for the actual error
> > message. The error message I get is, wait for it...
> >
> >   '6'
> >
> > I thought this was interesting, so I checked out the source, and its
> this
> > line in the RemoteDelivery class that sets that value:
> >
> >   mail.setErrorMessage(retries + "");  (line 661)
> >
> > Ok, so I'm set to 6 retries currently (going to change that to 3 right
> now)
> > so that matches up. However, what I would really like to see is what is
> > seen
> > in the logs, something like:
> >
> > 30/09/06 13:52:13 INFO  James.Mailet: RemoteDelivery: Could not connect
> to
> > SMTP host: 208.48.34.132, port: 25;
> >  nested exception is:
> >        java.net.ConnectException: connection to 208.48.34.132 timed out
> > 30/09/06 13:52:13 INFO  James.Mailet: RemoteDelivery: Temporary
> exception
> > delivering mail (Mail1159642077612-3-to-test.com:
> > javax.mail.MessagingException: No mail server(s) available at this time.
> >        at org.apache.james.transport.mailets.RemoteDelivery.deliver(
> > RemoteDelivery.java:617)
> >        at org.apache.james.transport.mailets.RemoteDelivery.run(
> > RemoteDelivery.java:912)
> >        at java.lang.Thread.run(Thread.java:595)
> >
> > I can't see anywhere else in the RemoteDelivery class where the above
> error
> > message is associated to the org.apache.mailet.Mail object that I'm
> working
> > with in my BounceMailet, but it seems to me like I might be missing
> > something because that seems like a natural thing to do. Or maybe there
> is
> > some other way to get access to the error message (context or
> something),
> > I'm not sure. Can anyone straighten me out here, or do I have to hack up
> > RemoteDelivery to do this?
> >
> > Thanks,
> >
> > Mark
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
> For additional commands, e-mail: server-user-help@james.apache.org
>
>