You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Benoit Doreau <be...@inexbee.com> on 2002/08/07 16:03:26 UTC

Connect errors when sending emails to Hotmail.com

Hi all,

We have a problem when sending emails to Hotmail addresses. About three
times over four, the SMTP connection is refused on the IP address that has
been sent back by the DNS server.

At first glance, it seems that Hotmail is using a kind of DNS based load
distribution system. Each time you ask your DNS what are the MX records for
hotmail.com, you get a different list of servers. The servers sent back by
the DNS remain available for a limited time only. It seems that when JAMES
attempts to create a connection, it is either too early or too late, and the
server is unavailable.

You can reproduce the  problem using a console (Screen copy below).
First, do an MX lookup on "hotmail.com"
Then, try to open an SMTP connection on one of the IP

You will see that it works fine about one time over 4 which is about the
average success rate we have with MET.
We have set retry parameters so that we have many retries in a short time,
but this not a good solution as it means that we will potentially loose
important messages because a server other than hotmail is unavailable for
one or two hours.

Has anybody encountered the problem, and is there a solution to it ?


Thanks,
Benoit Doreau


------------------- DNS lookup for hotmail ---------------------------
> hotmail.com
Server:  ns3.wanadoo.fr
Address:  193.252.19.3

Non-authoritative answer:
hotmail.com     MX preference = 5, mail exchanger = mx09.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx10.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx11.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx12.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx13.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx14.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx15.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx01.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx02.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx04.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx05.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx06.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx07.hotmail.com
hotmail.com     MX preference = 5, mail exchanger = mx08.hotmail.com

hotmail.com     nameserver = ns1.hotmail.com
hotmail.com     nameserver = ns2.hotmail.com
hotmail.com     nameserver = ns3.hotmail.com
hotmail.com     nameserver = ns4.hotmail.com
mx09.hotmail.com        internet address = 64.4.49.71
mx10.hotmail.com        internet address = 64.4.49.135
mx11.hotmail.com        internet address = 64.4.49.199
mx12.hotmail.com        internet address = 64.4.50.7
mx13.hotmail.com        internet address = 64.4.50.71
mx14.hotmail.com        internet address = 65.54.232.7
mx15.hotmail.com        internet address = 65.54.232.71
----------------------------------------------------------------------

------------------- SMTP connections attempts ------------------------

C:\>telnet 64.4.49.7 25
Connecting To 64.4.49.7...Could not open a connection to host on port 25 :
Conne
ct failed

C:\>telnet 64.4.49.7 25
Connecting To 64.4.49.7...Could not open a connection to host on port 25 :
Conne
ct failed

C:\>telnet 64.4.49.7 25
Connecting To 64.4.49.7...Could not open a connection to host on port 25 :
Conne
ct failed

C:\>telnet 64.4.49.7 25
220-HotMail (NO UCE) ESMTP server ready at Wed, 07 Aug 2002 06:56:20 -0700
220 ESMTP spoken here

----------------------------------------------------------------------


Re: Connect errors when sending emails to Hotmail.com

Posted by Hontvari Jozsef <ho...@solware.com>.
I have checked James source 2.0a3 and 2.1a1(?), it seems to be it is working
as expected: if it cannot connect to a server then it looks for the next one
specified in the MX records. But this requires from James to correctly
determine wheter the problem is permanent or temporary. This is also working
corretly in the case of hotmail, I have checked my log.

So sending to hotmail can fail, but only if you cannot connect to any of the
14 hotmail server - which is very unlikely I hope.

> See mailets/RemoteDelivery.java, specifically the deliver method.

Tx, you were right, I mistakenly thought DNS handling occured in a lower
level.

----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Sent: Wednesday, August 07, 2002 9:28 PM
Subject: RE: Connect errors when sending emails to Hotmail.com


> > I cannot rely on James to retry sending, I must turn off retrying
because
> of
> > the large number of bounces (about 50%, our list is pretty old ...
>
> There is a difference between a retry because the connection could not be
> made, and a retry because there was a (permanent) delivery error reported
by
> the SMTP server.
>
> > I am checking the actual behaviour in the source code, but until now, I
> > couldn't find the actual class which is sending
>
> See mailets/RemoteDelivery.java, specifically the deliver method.
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Connect errors when sending emails to Hotmail.com

Posted by "Noel J. Bergman" <no...@devtech.com>.
> I cannot rely on James to retry sending, I must turn off retrying because
of
> the large number of bounces (about 50%, our list is pretty old ...

There is a difference between a retry because the connection could not be
made, and a retry because there was a (permanent) delivery error reported by
the SMTP server.

> I am checking the actual behaviour in the source code, but until now, I
> couldn't find the actual class which is sending

See mailets/RemoteDelivery.java, specifically the deliver method.

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Connect errors when sending emails to Hotmail.com

Posted by Hontvari Jozsef <ho...@solware.com>.
That is a big problem for me too, thanks Benoit for the notification. I
cannot rely on James to retry sending, I must turn off retrying because of
the large number of bounces (about 50%, our list is pretty old, there are
members who subscribed a year ago and this is the first time we are sending
a newsletter).

The expected behaviour from an smtp server is to follow the MX records in
priority order. If it cannot connect to the first mail server of the domain
then it must connect to the second and so on.

I am checking the actual behaviour in the source code, but until now, I
couldn't find the actual class which is sending (Session.getInstance(props,
null).getTransport(urlname) - What class does this statement actually
return?). The default smtp implementation from javamail?


----- Original Message -----
From: "Noel J. Bergman" <no...@devtech.com>
To: "James Users List" <ja...@jakarta.apache.org>
Cc: <be...@inexbee.com>
Sent: Wednesday, August 07, 2002 5:05 PM
Subject: RE: Connect errors when sending emails to Hotmail.com


> I've seen the same problem with Hotmail, but there isn't a danger of
> actually losing the mail.  James retries the message and it gets through.
>
> Basically, the problem is that hotmail is very busy, and limits the number
> of connections to each server.  So it is a race to get an open port.
>
> I'll check the code later today (the power suppliy for the internal server
I
> have James source on seems to have died overnight), but I don't believe
> there is a real problem (other than the destination mail network being
> busy).
>
> --- Noel
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Connect errors when sending emails to Hotmail.com

Posted by "Noel J. Bergman" <no...@devtech.com>.
I've seen the same problem with Hotmail, but there isn't a danger of
actually losing the mail.  James retries the message and it gets through.

Basically, the problem is that hotmail is very busy, and limits the number
of connections to each server.  So it is a race to get an open port.

I'll check the code later today (the power suppliy for the internal server I
have James source on seems to have died overnight), but I don't believe
there is a real problem (other than the destination mail network being
busy).

	--- Noel


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>