Welcome to WebmasterWorld Guest from 18.208.159.25

Forum Moderators: phranque

Message Too Old, No Replies

We are really stuck on this one

Need help in the email segment of our application

     
1:52 pm on Jun 11, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 2, 2003
posts:398
votes: 0


We have created a secure ecommerce web site, complete with products catalog, MySQL database, admin console section ...etc.

We developed our application with JSP, using Tomcat as our application server. All of it runs great, except for the email segment.

Here is how it works: the client needs to register with us first. Once he inserted his desired user id and password, our application is supposed to send him an email. On the screen, it informs us that it did. Except we never get it! :-(

If we run our tests on another of our servers (a test server) its ok. Once we change it to the server where we want it to run, it fails to work. Of course we have changed the smtp to the right one and all... Would it have something to do with POP3 or SMTP or WHAT?

I am totally at a loss here. I think I am confronted with a problem that is so obvious, it could hit me on the head and I probably would'nt feel it...

Can anybody here help us with this?

1:55 pm on June 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 5, 2001
posts:2466
votes: 0


what mail software are you using to create the email.

is it on both servers?

Does the live mail server need password auth or is it a closed relay.

dave

4:56 pm on June 11, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 2, 2003
posts:398
votes: 0


Hi DaveN and thanks

Well we do get the error messages that "mail cannot be relayed" or something to that effect.

We don't use any mail program specifically, as we pretty much created all ourselves. You are right Dave when you are mentioning both servers. There does seem to be a "disconnect" in there somewhere.

We are both pulling our hair out on that one. Its the only thing left to solve before we can successfully deploy our application.

5:06 pm on June 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Oct 5, 2001
posts:2466
votes: 0


The live mail server doesn't know who you are, thats why you are getting the relay error, it's to stop people sp*mming through the server.

there are two options if the live server is your own allow relaying for the domain which is sending the mail usually by IP address.

if the software is clever enough then just use Auth.

Dave

5:08 pm on June 11, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Sept 12, 2002
posts:885
votes: 0


Check the configuration of the mail server. Most of them are configured to only relay mail for a certain block of IP addresses. Particularly if your test server is in a network zone that is behind a firewall, it is likely in a different block from your live server, and therefore treated differently by the mail server. If you are using a local SMTP server on the same machine as the web server, double-check its configuration - it might well be set not to relay at all.

error messages that "mail cannot be relayed" or something to that effect.

The exact error message can make a world of difference. You know that :)
6:03 pm on June 11, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 2, 2003
posts:398
votes: 0


Guys:- Here are the error messages we get all the time:

javax.mail.SendFailedException: Sending failed;
nested exception is:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
javax.mail.SendFailedException: 554 Relay access denied


If anybody can help us on this, I will owe you a beer at the next pub in London :-)

6:30 pm on June 11, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 2, 2003
posts:398
votes: 0


Does anybody know what an Exception: 554 is?
7:03 pm on June 11, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 9, 2002
posts:41
votes: 0


what's your email server? If you are using sendmail, you have to add yourdomain.com at Cw:

Orig: (/etc/sendmail.cf)
Cwlocalhost localhost.localdomain

change it to:
Cwlocalhost yourdomain.com

if Fw has been defined as:
Fw/etc/mail/local-host-names
(Redhat default configuration)

you may leave sendmail.cf unchange but add yourdomain.com into /etc/mail/local-host-names.

And, don't forget to restart sendmail.

7:41 pm on June 11, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:June 3, 2002
posts:169
votes: 0


I don't if that would help but here's a page from Sun's forums [forum.java.sun.com].

It basically says that error 554 is originating from the smtp mailserver for security reasons and "usually" the cause is the From field of an email is wrong (not part of the allowed domain).

hope that helps

mavherick

8:00 pm on June 11, 2003 (gmt 0)

Preferred Member

10+ Year Member

joined:Mar 2, 2003
posts:398
votes: 0


Thanks Maverick and Chatain

Chatain, just to make certain I understand you correctly here: basically, what your saying is I should add that line of code in sendmail and re-start it? That would clear my problem?

Currently, we are hosting a fairly large number of web sites on that particular server. None are having any mail problems. Then again, none are using (or trying to do) what we are using and doing...

I will ask my Linux expert here to do that and hopefully it will clear my problem and I'l be able to repay you with a few beers at the pub.

:-) I will let you know how it goes!

Thanks guys!