Bouncing mails & Java Mail API

M

Manish Hatwalne

If the Java mail is trying to send mail to non-existent mail ID say
(e-mail address removed) (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
 
G

Gordon Beaton

If the Java mail is trying to send mail to non-existent mail ID say
(e-mail address removed) (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?

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

--
 
R

Roedy Green

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.
 
M

Manish Hatwalne

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.
--

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

- Manish
 
M

Manish Hatwalne

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
 
N

Nigel Wade

Manish said:
If the Java mail is trying to send mail to non-existent mail ID say
(e-mail address removed) (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.
 
M

Michael Redlich

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

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.
 
A

Andrew Thompson

...
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top