Re: servlet gets smtp relay denied error
Thanks for the ideas, all are welcome :) See answers to your questions inline: Doug Parsons wrote: 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. I don't have first hand experience in this class, but I got a theory. One possible problem is that your mail server is not looking at the connection to determine if it is a relay but at the message. Have the servlet write out the text of the message to a file or console OR look at one of the messages sent from inhouse to see how the message is formed. Good idea. Will try it. Also does/can your mail server send a response to the address attempting the relay? That could help determine why the mail server thinks it's a relay. 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? Now for a real stretch, does your server have a public or private IP assigned or both? Both. Server sits behind a router/firewall, with a private IP, router has public IP and forwards mail, and http traffic to the server. If both, then consider that the request is being associated with the public IP when attached from outside and the private when from inside. If TC is using the public IP in the request to the mail server then is the mail server set to allow a relay from it's public IP? Not such a wild idea. You might be on to something here. Not currently configured to relay from the external address. Not sure that's what I want, either---isn't that a security hole? to relay from a public address? Will need to freshen up on sendmail before I take that step, but definitely worth pursuing. Thanks again. Jerry I know this might end up being a bunch of fertilizer, but no one had resonded and every now and then I get lucky. Good Luck Doug Parsons SCJP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet gets smtp relay denied error
Doug Parsons wrote: Now for a real stretch, does your server have a public or private IP assigned or both? If both, then consider that the request is being associated with the public IP when attached from outside and the private when from inside. If TC is using the public IP in the request to the mail server then is the mail server set to allow a relay from it's public IP? I know this might end up being a bunch of fertilizer, but no one had resonded and every now and then I get lucky. Doug: You got lucky---I added the external IP address to the sendmail relay_domains file, and boom...it works. Still would like some input from a sendmail guru as to the security issues involved in allowing relays from a public address, but, hey, it works. Thanks. Jerry Good Luck Doug Parsons SCJP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
servlet gets smtp relay denied error
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 [EMAIL PROTECTED]... Relaying denied 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: servlet gets smtp relay denied error
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. I don't have first hand experience in this class, but I got a theory. One possible problem is that your mail server is not looking at the connection to determine if it is a relay but at the message. Have the servlet write out the text of the message to a file or console OR look at one of the messages sent from inhouse to see how the message is formed. Also does/can your mail server send a response to the address attempting the relay? That could help determine why the mail server thinks it's a relay. 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? Now for a real stretch, does your server have a public or private IP assigned or both? If both, then consider that the request is being associated with the public IP when attached from outside and the private when from inside. If TC is using the public IP in the request to the mail server then is the mail server set to allow a relay from it's public IP? I know this might end up being a bunch of fertilizer, but no one had resonded and every now and then I get lucky. Good Luck Doug Parsons SCJP - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]