Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

Bouncing mails & Java Mail API

Thread view: 
Manish Hatwalne - 18 Dec 2007 06:47 GMT
If the Java mail is trying to send mail to non-existent mail ID say
xyz@pqr.com (or one which has mailbox full) what will happen? Will it try
delivering that message for a specified time period? I am getting many error
messages from my SMTP server saying -  "SMTP; 550 Requested action not
taken: mailbox unavailable"

Is it something that needs to be tweaked at SMTP level or can I do something
to set Java mail API properties such that retry time is less. This problem
is slowing down my system with too many open connections. I am wondering
what I can do - though we do email ID validation, there is no way at the
moment to see if mailbox is really available or not. What can I do here?

Any pointers, help would be highly appreciated.

- Manish
Gordon Beaton - 18 Dec 2007 07:14 GMT
> If the Java mail is trying to send mail to non-existent mail ID say
> xyz@pqr.com (or one which has mailbox full) what will happen? Will it try
[quoted text clipped - 7 lines]
> what I can do - though we do email ID validation, there is no way at the
> moment to see if mailbox is really available or not. What can I do here?

Why are you maintaining open connections?

There is nothing more you can do, the mail has been sent and has
bounced. The 550 response means "do not try again". Read rfc2821
section 4.2.1.

There is no way to know in advance whether mail to a given address
will succeed.

/gordon

--
Roedy Green - 18 Dec 2007 07:42 GMT
On Tue, 18 Dec 2007 12:17:05 +0530, "Manish Hatwalne"
<manish@nospam.yahoo.com> wrote, quoted or indirectly quoted someone
who said :

>Will it try
>delivering that message for a specified time period?

It is a relay system.  JavaMail when you run your app makes a stab at
ending the mail to your mail server.  The mail server accepts mail
even if the recipient mailserver is down.  The mail server will try
over a period of days to deliver it.  If it fails it sends you a
bounce email.  However if the mailserver can tell right away it is
hopeless (e.g. no such domain) it can refuse to accept the email right
when you app first sends it.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Manish Hatwalne - 18 Dec 2007 10:25 GMT
> It is a relay system.  JavaMail when you run your app makes a stab at
> ending the mail to your mail server.  The mail server accepts mail
[quoted text clipped - 3 lines]
> hopeless (e.g. no such domain) it can refuse to accept the email right
> when you app first sends it.

Thanks Roedy Green!!
That's all i wanted to know, I know what to do now!

- Manish
Andrew Thompson - 18 Dec 2007 07:48 GMT
>If the Java mail ...I am getting many error
>messages from my SMTP server saying -  "SMTP; 550 Requested action not
>taken: mailbox unavailable"

Maybe you should not have been buying lists from
spamfest sources.  ..hmm?

Signature

Andrew Thompson
http://www.physci.org/

Manish Hatwalne - 18 Dec 2007 10:26 GMT
> Maybe you should not have been buying lists from
> spamfest sources.  ..hmm?

Huh???
It's the spam we are getting from automated BOTs. we don't send any mails on
our own unless the user initiates such request himself, this feature is for
referrals and it is being misused. I think I'd add CAPTCHA to take care of
this.

- Manish
Michael Redlich - 18 Dec 2007 17:07 GMT
> > Maybe you should not have been buying lists from
> > spamfest sources.  ..hmm?
[quoted text clipped - 8 lines]
>
> - Manish

Hi Manish:

Please don't take Andrew Thompson too much to heart.  Despite being
knowledgeable in Java, he is also seemingly an arrogant, nasty person
who thinks he knows it all.  I believe that he really hasn't found
himself yet, and beating up on other people is his way of getting his
kicks.  For example, he knows every person that multiposts and lets
them know about it.  Can you imagine the amount of time that
requires?  Man, I wish I had that kind of free time...

Sorry, Andrew - I am calling it the way I (and presumably others) see
it.  You can fire back at me if you wish.  Go ahead, take your best
shot...I'll probably get a kick outta your response...

Mike.
Andrew Thompson - 19 Dec 2007 02:00 GMT
> > Maybe you should not have been buying lists from
> > spamfest sources.  ..hmm?
..
> Huh???

My bad. *

> It's the spam we are getting from automated BOTs. we don't send any mails on
> our own unless the user initiates such request himself, this feature is for
> referrals and it is being misused. I think I'd add CAPTCHA to take care of
> this.

* When I started that reply, I had in mind to give
you a gentle 'prod' that you had not done/said
anything to justify that the addresses used were
in any way valid - and were 'rubbish'**.  It occured
that a 'good example' of bad addresses might be from
'purchased lists'.

Somehow, through my extremely poor communication
skills, that translated to an 'accusation' in my
actual words.

My apologies.

** Now I reread this thread it seems I completely
missed the point from the outset!

Glad you got it sorted, BTW.
Nigel Wade - 18 Dec 2007 11:35 GMT
> If the Java mail is trying to send mail to non-existent mail ID say
> xyz@pqr.com (or one which has mailbox full) what will happen? Will it try
> delivering that message for a specified time period?

JavaMail is a purely client system, it has no ability to "retry". Retrying is a
function of a mail transfer agent (MTA).

> I am getting many error  
> messages from my SMTP server saying -  "SMTP; 550 Requested action not
> taken: mailbox unavailable"

A 5xx return status is a permanent error. To retry sending the same message
would be a violation of the SMTP. Your mail server has done what it is supposed
to do, it has passed on the rejection to you so you know that your message
cannot be delivered. Because the failure was permanent your mail server will
not retry sending it. If you do somehow manage to keep resending the message
then you are likely to get yourself or your ISP blacklisted very quickly. If
your hacks get your ISP blacklisted you can assume what will happen to your
account with them.

> Is it something that needs to be tweaked at SMTP level or can I do something
> to set Java mail API properties such that retry time is less.

JavaMail doesn't retry. To have messages stored and forwarded you need a MTA.
That MTA should never retry a rejected message.

> This problem  
> is slowing down my system with too many open connections. I am wondering
> what I can do - though we do email ID validation, there is no way at the
> moment to see if mailbox is really available or not. What can I do here?

Why do you have an open connection? When you receive a 5xx notification the mail
server you were connected to has done its job, it's told you the mail cannot be
delivered, don't retry. Move onto the next recipient/message.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.