Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

servlet gets smtp relay denied error

jford

2003-12-29

Replies:

I have written a JavaMail servlet to mail documents at user request.
(User selects a document from the web page and enters an email address;
when the "Mail it now" button is clicked, the servlet is called and the
document sent as an attachment to an email message.)

The servlet is deployed as a Tomcat webapp, which is called by Apache
through mod_jk..

When I invoke it from a browser on the same network as the server, it
works as expected. An email is sent to the specified address, with the
attachment.

But when I invoke it from a browser outside of my network, the message
does not get sent.

Catalina.out shows the servlet throwing the following exceptions:

Transport exception: javax.mail.SendFailedException: Sending failed;
nested exception is:
    class javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
    class javax.mail.SendFailedException: 550 5.7.1
<a65ragtop@(protected)

The email address is correct and valid---I can send a test message and
receive it at that address.

The mail server is configured to deny relays for anybody not on the LAN,
but there is no relay request---the servlet runs on the same box as the
smtp server (which is, in fact, on the same box as my Apache, Tomcat
and DNS servers).

Why does it matter where the browser that sends the request resides?

Thanks for whatever help you can offer.

Jerry

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.