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 Cai Jeff <jf...@yahoo.com.cn> on 2003/06/11 11:42:42 UTC

DNS problem?

hi,

One of our users wants to mail to the address
xx@bdi.com.cn but faild. The james reported 
James.Mailet: RemoteDelivery: No mail server found
for: bdi.com.cn.
When I used nslookup I can get the following MX RR,
bdi.com.cn      mail exchanger = 10 mail.bdi.com.cn.
bdi.com.cn      mail exchanger = 10
notesmtp.bdi.com.cn.
But if I used dig I found the TTL is 0s for those MX
RR:
bdi.com.cn.             0       IN      MX      10
mail.bdi.com.cn.
bdi.com.cn.             0       IN      MX      10
notesmtp.bdi.com.cn.
Then I looked into the source of DNSServer.java, I
found that when doing the DNS query, james first tries
to find the result in the cache, if not exists then it
queries the configed DNS to get the results and put it
in to the cache, then it queries again from the cache
and return the results.
But if the results TTL is 0s, I guess that the cache
would never caches them. So the second query from
cache could not get anything.
Why james must do the second query from the cache?
After the first query it gets the results and put them
into the cache, why just return these results?

Thanks



_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: DNS problem?

Posted by Cai Jeff <jf...@yahoo.com.cn>.
Sorry for mistype.
> I think it is a bug of dnsjava but james.
should be:
it is not a bug of dnsjava but james.

> Please see the definition of TTL:
> a 32 bit signed integer that specifies the time
> interval
> that the resource record may be cached before the
> source
> of the information should again be consulted.  Zero
> values are interpreted to mean that the RR can only
> be
> used for the transaction in progress, and should not
> be
> cached.  For example, SOA records are always
> distributed
> with a zero TTL to prohibit caching.  Zero values
> can
> also be used for extremely volatile data.
> 
> So dnsjava never caches any records whose TTL is 0.
> But James always want to store records into cache
> and
> find from the cache. I think it is a James' problem.
> 
> > TTL's should never be 0.  TTL's shouldn't even
> come
> > close to that.  This
> > is a misconfigured DNS server.
> > 
> > You can report this bug to the person who wrote
> the
> > DNS client lib we
> > use (www.xbill.org/dnsjava) as to how to better
> > handle a misconfigured
> > DNS server, but I figure we'll be hopefully moving
> > to JNDI DNS interface
> > at some point anyway.  I'm not sure how that
> library
> > would handle this
> > DNS server.
> > 
> > -- 
> > Serge Knystautas
> > President
> > Lokitech >> software . strategy . design >>
> > http://www.lokitech.com/
> > p. 1.301.656.5501
> > e. sergek@lokitech.com
> > 
> > Cai Jeff wrote:
> > > How about my question? Any idea?
> > > 
> > >>hi,
> > >>
> > >>One of our users wants to mail to the address
> > >>xx@bdi.com.cn but faild. The james reported 
> > >>James.Mailet: RemoteDelivery: No mail server
> found
> > >>for: bdi.com.cn.
> > >>When I used nslookup I can get the following MX
> > RR,
> > >>bdi.com.cn      mail exchanger = 10
> > mail.bdi.com.cn.
> > >>bdi.com.cn      mail exchanger = 10
> > >>notesmtp.bdi.com.cn.
> > >>But if I used dig I found the TTL is 0s for
> those
> > MX
> > >>RR:
> > >>bdi.com.cn.             0       IN      MX     
> 10
> > >>mail.bdi.com.cn.
> > >>bdi.com.cn.             0       IN      MX     
> 10
> > >>notesmtp.bdi.com.cn.
> > >>Then I looked into the source of DNSServer.java,
> I
> > >>found that when doing the DNS query, james first
> > >>tries
> > >>to find the result in the cache, if not exists
> > then
> > >>it
> > >>queries the configed DNS to get the results and
> > put
> > >>it
> > >>in to the cache, then it queries again from the
> > >>cache
> > >>and return the results.
> > >>But if the results TTL is 0s, I guess that the
> > cache
> > >>would never caches them. So the second query
> from
> > >>cache could not get anything.
> > >>Why james must do the second query from the
> cache?
> > >>After the first query it gets the results and
> put
> > >>them
> > >>into the cache, why just return these results?
> > >>
> > >>Thanks
> > >>
> > >>
> > >>
> > >>
> > > 
> > >
> >
>
_________________________________________________________
> > > 
> > >>Do You Yahoo!? 
> > >>流连网络世界的“你”是谁?
> > >>
> > > 
> > >
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> > > 
> > >>
> > >
> >
>
---------------------------------------------------------------------
> > > 
> > >>To unsubscribe, e-mail:
> > >>james-user-unsubscribe@jakarta.apache.org
> > >>For additional commands, e-mail:
> > >>james-user-help@jakarta.apache.org
> > >> 
> > > 
> > > 
> > >
> >
>
_________________________________________________________
> > > Do You Yahoo!? 
> > > 流连网络世界的“你”是谁?
> > >
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> > > 
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > james-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail:
> > james-user-help@jakarta.apache.org
> > > 
> > 
> > 
> > 
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > james-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> > james-user-help@jakarta.apache.org
> >  
> 
>
_________________________________________________________
> Do You Yahoo!? 
> 流连网络世界的“你”是谁?
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> james-user-help@jakarta.apache.org
>  

_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by Brian Wellington <bw...@xbill.org>.
On Mon, 16 Jun 2003, Noel J. Bergman wrote:

> > It would be pretty simple to define a basic logging object that provided
> > error/debug/warn/info/whatever
> 
> If you define that as an interface, that would probably be sufficient
> (anyone who disagrees, PLEASE speak up).  We could write an adapter to wrap
> your interface over our implementation.

Would it be possible to get a list of what you actually want logged, and
at what level?  Looking at DNSServer.java, I'm not clear what
functionality is custom and what could be converted to use the Lookup
class.  The only log statements that I see that would need to be moved are
in rawDNSLookup().

Thanks,
Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


RE: DNS problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> It would be pretty simple to define a basic logging object that provided
> error/debug/warn/info/whatever

If you define that as an interface, that would probably be sufficient
(anyone who disagrees, PLEASE speak up).  We could write an adapter to wrap
your interface over our implementation.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


RE: DNS problem?

Posted by Brian Wellington <bw...@xbill.org>.
On Sun, 15 Jun 2003, Noel J. Bergman wrote:

> Brian,
> 
> Thanks for your response.  I didn't spot code to eliminate TTL 0 records
> when I did my first pass looking at the code.  If I get some time, I'll look
> again.
> 
> We could modify the code to use the result from cache.addMessage.  When the
> code was updated from dnsjava 1.2.3 to dnsjava 1.3.2, I don't believe that
> Serge noticed the change in cache handling.
> 
> If we could use your code directly, that would be even better.  That way we
> would not have to maintain the DNS lookup code.  The problem is supporting
> logging.  Our DNSServer.rawDNSLookup method, is pretty closely derived from
> the Lookup.lookup() method, and dns.lookup() before that, adapted for our
> logging needs.
> 
> http://cvs.apache.org/viewcvs/jakarta-james/src/java/org/apache/james/dnsser
> ver/DNSServer.java
> 
> Do you have a suggestion as to how we can address the logging situation?  We
> can't use JDK 1.4 logging: there is no implementable interface, just a
> heavyweight logging object.  However, we could easily use the Jakarta
> Commons Logging log interface:
> 
> http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/Log
> .html

I'd prefer to not have an external dependency on any logging framework.  
It would be pretty simple to define a basic logging object that provided 
error/debug/warn/info/whatever, and could be used to wrap the logging 
object you're using, if that would be sufficient.

Unfortunately, I don't have any time to work on dnsjava for at least the 
next few weeks.

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


RE: DNS problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Brian,

Thanks for your response.  I didn't spot code to eliminate TTL 0 records
when I did my first pass looking at the code.  If I get some time, I'll look
again.

We could modify the code to use the result from cache.addMessage.  When the
code was updated from dnsjava 1.2.3 to dnsjava 1.3.2, I don't believe that
Serge noticed the change in cache handling.

If we could use your code directly, that would be even better.  That way we
would not have to maintain the DNS lookup code.  The problem is supporting
logging.  Our DNSServer.rawDNSLookup method, is pretty closely derived from
the Lookup.lookup() method, and dns.lookup() before that, adapted for our
logging needs.

http://cvs.apache.org/viewcvs/jakarta-james/src/java/org/apache/james/dnsser
ver/DNSServer.java

Do you have a suggestion as to how we can address the logging situation?  We
can't use JDK 1.4 logging: there is no implementable interface, just a
heavyweight logging object.  However, we could easily use the Jakarta
Commons Logging log interface:

http://jakarta.apache.org/commons/logging/api/org/apache/commons/logging/Log
.html

	--- Noel

-----Original Message-----
From: Brian Wellington [mailto:bwelling@xbill.org]
Sent: Thursday, June 12, 2003 12:34
To: Noel J. Bergman
Cc: James Users List
Subject: RE: DNS problem?


On Thu, 12 Jun 2003, Noel J. Bergman wrote:

> Brian (on the BCC list),
>
> Would you care to comment on this?  The code in James appears to be
> essentially the same as your Lookup method, except for adaptations.
>
> The claim is that the algorithm checks the cache, finds nothing, does a
> lookup, puts the record into the cache, and then queries the cache.  But
> since TTL is 0, the cache wouldn't have the record.
>
> >From what I see in the Cache.Element code, the cache should be valid for
the
> second within which the value is cached.  Of course, if that happens at
the
> trailing edge, then the value will be missing, but then the process should
> repeat, and should be valid.

If the element was added to the cache, it would be valid for the remainder
of the second.  However, there's code to avoid putting 0 TTL elements in
the cache, for the reason mentioned by Jeff - records with 0 TTL should
not be cached at all.

> Jeff, you should turn on DEBUG in environment.xml to see what gets logged.
> Jeff, also to answer your question, the reason why the cache is used is
that
> the result of a lookup is a Message.  The dnsjava Cache class has the code
> for handling the set of records in that Message.  The lookup code doesn't
> replicate that code.  It leverages the cache to do the work.

Is there some reason you're not using the Lookup class?  If you're not
able to (and it's not easily fixable in a future version of dnsjava), I'd
recommend using the same logic, where it uses the result of
cache.addMessage instead of looking up the cache entry again; it was
explicitly added to work with the 0 TTL case (as well as being a lot
faster, since it avoided a cache lookup).

Brian


---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org


RE: DNS problem?

Posted by Jeff Cai <jf...@yahoo.com.cn>.
Noel,

It now can sends mail to bdi.com.cn. Grate!

Jeff
 --- "Noel J. Bergman" <no...@devtech.com> :> >
Thanks, where can I get the latest the soft?
> >
>
http://jakarta.apache.org/builds/jakarta-james/latest/src/
> 
> Yes.  There or the CVS.
> 
> 	--- Noel
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> james-user-help@jakarta.apache.org
>  

_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
> Thanks, where can I get the latest the soft?
> http://jakarta.apache.org/builds/jakarta-james/latest/src/

Yes.  There or the CVS.

	--- Noel

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by Jeff Cai <jf...@yahoo.com.cn>.
Noel,

Thanks, where can I get the latest the soft?

http://jakarta.apache.org/builds/jakarta-james/latest/src/


correct?

Jeff
> Jeff,
> 
> > DEBUG dnsserver: Looking up MX record for
> bdi.com.cn.
> > ERROR dnsserver: Couldn't resolve MX records for
> domain bdi.com.cn.
> > ERROR dnsserver: Couldn't resolve IP address for
> host bdi.com.cn.
> 
> I have checked in a change to DNSServer.  Would you
> please give it a shot,
> and let me know if it works for you?  I tested it
> here against bdi.com.cn,
> and it worked fine.
> 
> 	--- Noel
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> james-user-help@jakarta.apache.org
>  

_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Jeff,

> DEBUG dnsserver: Looking up MX record for bdi.com.cn.
> ERROR dnsserver: Couldn't resolve MX records for domain bdi.com.cn.
> ERROR dnsserver: Couldn't resolve IP address for host bdi.com.cn.

I have checked in a change to DNSServer.  Would you please give it a shot,
and let me know if it works for you?  I tested it here against bdi.com.cn,
and it worked fine.

	--- Noel


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by Jeff Cai <jf...@yahoo.com.cn>.
I am using James 2.2.0a3, after I enabled the DEBUG in
dnsserver tag, I just got following msg,
11/06/03 15:54:40 DEBUG dnsserver: Looking up MX
record for bdi.com.cn.
11/06/03 15:54:40 ERROR dnsserver: Couldn't resolve MX
records for domain bdi.com.cn.
11/06/03 15:54:41 ERROR dnsserver: Couldn't resolve IP
address for host bdi.com.cn.

I think DNSServer.java in James does dns query in
following step:
1. queries the local cache, if finds return. if not,
step 2.
2. queries configed dns server, not find, return null;
if find, step 3
3. add results to cache, query cache again.

I agree with Brain, in step 3, after gets the results
and adds to the cache, why not just returns the
results but queries cache again? And for TTL 0 RRs,
james can not get from the cache though it already got
the results from the DNS server at step 2.

regards,

Jeff

> On Thu, 12 Jun 2003, Noel J. Bergman wrote:
> 
> > Brian (on the BCC list),
> > 
> > Would you care to comment on this?  The code in
> James appears to be
> > essentially the same as your Lookup method, except
> for adaptations.
> > 
> > The claim is that the algorithm checks the cache,
> finds nothing, does a
> > lookup, puts the record into the cache, and then
> queries the cache.  But
> > since TTL is 0, the cache wouldn't have the
> record.
> > 
> > >From what I see in the Cache.Element code, the
> cache should be valid for the
> > second within which the value is cached.  Of
> course, if that happens at the
> > trailing edge, then the value will be missing, but
> then the process should
> > repeat, and should be valid.
> 
> If the element was added to the cache, it would be
> valid for the remainder 
> of the second.  However, there's code to avoid
> putting 0 TTL elements in 
> the cache, for the reason mentioned by Jeff -
> records with 0 TTL should 
> not be cached at all.
> 
> > Jeff, you should turn on DEBUG in environment.xml
> to see what gets logged.
> > Jeff, also to answer your question, the reason why
> the cache is used is that
> > the result of a lookup is a Message.  The dnsjava
> Cache class has the code
> > for handling the set of records in that Message. 
> The lookup code doesn't
> > replicate that code.  It leverages the cache to do
> the work.
> 
> Is there some reason you're not using the Lookup
> class?  If you're not
> able to (and it's not easily fixable in a future
> version of dnsjava), I'd
> recommend using the same logic, where it uses the
> result of
> cache.addMessage instead of looking up the cache
> entry again; it was
> explicitly added to work with the 0 TTL case (as
> well as being a lot
> faster, since it avoided a cache lookup).
> 
> Brian


_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by Brian Wellington <bw...@xbill.org>.
On Thu, 12 Jun 2003, Noel J. Bergman wrote:

> Brian (on the BCC list),
> 
> Would you care to comment on this?  The code in James appears to be
> essentially the same as your Lookup method, except for adaptations.
> 
> The claim is that the algorithm checks the cache, finds nothing, does a
> lookup, puts the record into the cache, and then queries the cache.  But
> since TTL is 0, the cache wouldn't have the record.
> 
> >From what I see in the Cache.Element code, the cache should be valid for the
> second within which the value is cached.  Of course, if that happens at the
> trailing edge, then the value will be missing, but then the process should
> repeat, and should be valid.

If the element was added to the cache, it would be valid for the remainder 
of the second.  However, there's code to avoid putting 0 TTL elements in 
the cache, for the reason mentioned by Jeff - records with 0 TTL should 
not be cached at all.

> Jeff, you should turn on DEBUG in environment.xml to see what gets logged.
> Jeff, also to answer your question, the reason why the cache is used is that
> the result of a lookup is a Message.  The dnsjava Cache class has the code
> for handling the set of records in that Message.  The lookup code doesn't
> replicate that code.  It leverages the cache to do the work.

Is there some reason you're not using the Lookup class?  If you're not
able to (and it's not easily fixable in a future version of dnsjava), I'd
recommend using the same logic, where it uses the result of
cache.addMessage instead of looking up the cache entry again; it was
explicitly added to work with the 0 TTL case (as well as being a lot
faster, since it avoided a cache lookup).

Brian

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


RE: DNS problem?

Posted by "Noel J. Bergman" <no...@devtech.com>.
Brian (on the BCC list),

Would you care to comment on this?  The code in James appears to be
essentially the same as your Lookup method, except for adaptations.

The claim is that the algorithm checks the cache, finds nothing, does a
lookup, puts the record into the cache, and then queries the cache.  But
since TTL is 0, the cache wouldn't have the record.

>From what I see in the Cache.Element code, the cache should be valid for the
second within which the value is cached.  Of course, if that happens at the
trailing edge, then the value will be missing, but then the process should
repeat, and should be valid.

Jeff, you should turn on DEBUG in environment.xml to see what gets logged.
Jeff, also to answer your question, the reason why the cache is used is that
the result of a lookup is a Message.  The dnsjava Cache class has the code
for handling the set of records in that Message.  The lookup code doesn't
replicate that code.  It leverages the cache to do the work.

	--- Noel


-----Original Message-----
From: Cai Jeff [mailto:jfcai_2003@yahoo.com.cn]
Sent: Thursday, June 12, 2003 1:38
To: James Users List
Subject: Re: DNS problem?


I think it is a bug of dnsjava but james.
Please see the definition of TTL:
a 32 bit signed integer that specifies the time
interval
that the resource record may be cached before the
source
of the information should again be consulted.  Zero
values are interpreted to mean that the RR can only be
used for the transaction in progress, and should not
be
cached.  For example, SOA records are always
distributed
with a zero TTL to prohibit caching.  Zero values can
also be used for extremely volatile data.

So dnsjava never caches any records whose TTL is 0.
But James always want to store records into cache and
find from the cache. I think it is a James' problem.

> TTL's should never be 0.  TTL's shouldn't even come
> close to that.  This
> is a misconfigured DNS server.
>
> You can report this bug to the person who wrote the
> DNS client lib we
> use (www.xbill.org/dnsjava) as to how to better
> handle a misconfigured
> DNS server, but I figure we'll be hopefully moving
> to JNDI DNS interface
> at some point anyway.  I'm not sure how that library
> would handle this
> DNS server.
>
> --
> Serge Knystautas
> President
> Lokitech >> software . strategy . design >>
> http://www.lokitech.com/
> p. 1.301.656.5501
> e. sergek@lokitech.com
>
> Cai Jeff wrote:
> > How about my question? Any idea?
> >
> >>hi,
> >>
> >>One of our users wants to mail to the address
> >>xx@bdi.com.cn but faild. The james reported
> >>James.Mailet: RemoteDelivery: No mail server found
> >>for: bdi.com.cn.
> >>When I used nslookup I can get the following MX
> RR,
> >>bdi.com.cn      mail exchanger = 10
> mail.bdi.com.cn.
> >>bdi.com.cn      mail exchanger = 10
> >>notesmtp.bdi.com.cn.
> >>But if I used dig I found the TTL is 0s for those
> MX
> >>RR:
> >>bdi.com.cn.             0       IN      MX      10
> >>mail.bdi.com.cn.
> >>bdi.com.cn.             0       IN      MX      10
> >>notesmtp.bdi.com.cn.
> >>Then I looked into the source of DNSServer.java, I
> >>found that when doing the DNS query, james first
> >>tries
> >>to find the result in the cache, if not exists
> then
> >>it
> >>queries the configed DNS to get the results and
> put
> >>it
> >>in to the cache, then it queries again from the
> >>cache
> >>and return the results.
> >>But if the results TTL is 0s, I guess that the
> cache
> >>would never caches them. So the second query from
> >>cache could not get anything.
> >>Why james must do the second query from the cache?
> >>After the first query it gets the results and put
> >>them
> >>into the cache, why just return these results?
> >>
> >>Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: DNS problem?

Posted by Cai Jeff <jf...@yahoo.com.cn>.
I think it is a bug of dnsjava but james.
Please see the definition of TTL:
a 32 bit signed integer that specifies the time
interval
that the resource record may be cached before the
source
of the information should again be consulted.  Zero
values are interpreted to mean that the RR can only be
used for the transaction in progress, and should not
be
cached.  For example, SOA records are always
distributed
with a zero TTL to prohibit caching.  Zero values can
also be used for extremely volatile data.

So dnsjava never caches any records whose TTL is 0.
But James always want to store records into cache and
find from the cache. I think it is a James' problem.

> TTL's should never be 0.  TTL's shouldn't even come
> close to that.  This
> is a misconfigured DNS server.
> 
> You can report this bug to the person who wrote the
> DNS client lib we
> use (www.xbill.org/dnsjava) as to how to better
> handle a misconfigured
> DNS server, but I figure we'll be hopefully moving
> to JNDI DNS interface
> at some point anyway.  I'm not sure how that library
> would handle this
> DNS server.
> 
> -- 
> Serge Knystautas
> President
> Lokitech >> software . strategy . design >>
> http://www.lokitech.com/
> p. 1.301.656.5501
> e. sergek@lokitech.com
> 
> Cai Jeff wrote:
> > How about my question? Any idea?
> > 
> >>hi,
> >>
> >>One of our users wants to mail to the address
> >>xx@bdi.com.cn but faild. The james reported 
> >>James.Mailet: RemoteDelivery: No mail server found
> >>for: bdi.com.cn.
> >>When I used nslookup I can get the following MX
> RR,
> >>bdi.com.cn      mail exchanger = 10
> mail.bdi.com.cn.
> >>bdi.com.cn      mail exchanger = 10
> >>notesmtp.bdi.com.cn.
> >>But if I used dig I found the TTL is 0s for those
> MX
> >>RR:
> >>bdi.com.cn.             0       IN      MX      10
> >>mail.bdi.com.cn.
> >>bdi.com.cn.             0       IN      MX      10
> >>notesmtp.bdi.com.cn.
> >>Then I looked into the source of DNSServer.java, I
> >>found that when doing the DNS query, james first
> >>tries
> >>to find the result in the cache, if not exists
> then
> >>it
> >>queries the configed DNS to get the results and
> put
> >>it
> >>in to the cache, then it queries again from the
> >>cache
> >>and return the results.
> >>But if the results TTL is 0s, I guess that the
> cache
> >>would never caches them. So the second query from
> >>cache could not get anything.
> >>Why james must do the second query from the cache?
> >>After the first query it gets the results and put
> >>them
> >>into the cache, why just return these results?
> >>
> >>Thanks
> >>
> >>
> >>
> >>
> > 
> >
>
_________________________________________________________
> > 
> >>Do You Yahoo!? 
> >>流连网络世界的“你”是谁?
> >>
> > 
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> > 
> >>
> >
>
---------------------------------------------------------------------
> > 
> >>To unsubscribe, e-mail:
> >>james-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail:
> >>james-user-help@jakarta.apache.org
> >> 
> > 
> > 
> >
>
_________________________________________________________
> > Do You Yahoo!? 
> > 流连网络世界的“你”是谁?
> >
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> james-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> james-user-help@jakarta.apache.org
> > 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> james-user-help@jakarta.apache.org
>  

_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: DNS problem?

Posted by Serge Knystautas <se...@lokitech.com>.
TTL's should never be 0.  TTL's shouldn't even come close to that.  This
is a misconfigured DNS server.

You can report this bug to the person who wrote the DNS client lib we
use (www.xbill.org/dnsjava) as to how to better handle a misconfigured
DNS server, but I figure we'll be hopefully moving to JNDI DNS interface
at some point anyway.  I'm not sure how that library would handle this
DNS server.

-- 
Serge Knystautas
President
Lokitech >> software . strategy . design >> http://www.lokitech.com/
p. 1.301.656.5501
e. sergek@lokitech.com

Cai Jeff wrote:
> How about my question? Any idea?
> 
>>hi,
>>
>>One of our users wants to mail to the address
>>xx@bdi.com.cn but faild. The james reported 
>>James.Mailet: RemoteDelivery: No mail server found
>>for: bdi.com.cn.
>>When I used nslookup I can get the following MX RR,
>>bdi.com.cn      mail exchanger = 10 mail.bdi.com.cn.
>>bdi.com.cn      mail exchanger = 10
>>notesmtp.bdi.com.cn.
>>But if I used dig I found the TTL is 0s for those MX
>>RR:
>>bdi.com.cn.             0       IN      MX      10
>>mail.bdi.com.cn.
>>bdi.com.cn.             0       IN      MX      10
>>notesmtp.bdi.com.cn.
>>Then I looked into the source of DNSServer.java, I
>>found that when doing the DNS query, james first
>>tries
>>to find the result in the cache, if not exists then
>>it
>>queries the configed DNS to get the results and put
>>it
>>in to the cache, then it queries again from the
>>cache
>>and return the results.
>>But if the results TTL is 0s, I guess that the cache
>>would never caches them. So the second query from
>>cache could not get anything.
>>Why james must do the second query from the cache?
>>After the first query it gets the results and put
>>them
>>into the cache, why just return these results?
>>
>>Thanks
>>
>>
>>
>>
> 
> _________________________________________________________
> 
>>Do You Yahoo!? 
>>流连网络世界的“你”是谁?
>>
> 
> http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> 
>>
> ---------------------------------------------------------------------
> 
>>To unsubscribe, e-mail:
>>james-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>james-user-help@jakarta.apache.org
>> 
> 
> 
> _________________________________________________________
> Do You Yahoo!? 
> 流连网络世界的“你”是谁?
> http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-user-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org


Re: DNS problem?

Posted by Cai Jeff <jf...@yahoo.com.cn>.
How about my question? Any idea?
> hi,
> 
> One of our users wants to mail to the address
> xx@bdi.com.cn but faild. The james reported 
> James.Mailet: RemoteDelivery: No mail server found
> for: bdi.com.cn.
> When I used nslookup I can get the following MX RR,
> bdi.com.cn      mail exchanger = 10 mail.bdi.com.cn.
> bdi.com.cn      mail exchanger = 10
> notesmtp.bdi.com.cn.
> But if I used dig I found the TTL is 0s for those MX
> RR:
> bdi.com.cn.             0       IN      MX      10
> mail.bdi.com.cn.
> bdi.com.cn.             0       IN      MX      10
> notesmtp.bdi.com.cn.
> Then I looked into the source of DNSServer.java, I
> found that when doing the DNS query, james first
> tries
> to find the result in the cache, if not exists then
> it
> queries the configed DNS to get the results and put
> it
> in to the cache, then it queries again from the
> cache
> and return the results.
> But if the results TTL is 0s, I guess that the cache
> would never caches them. So the second query from
> cache could not get anything.
> Why james must do the second query from the cache?
> After the first query it gets the results and put
> them
> into the cache, why just return these results?
> 
> Thanks
> 
> 
> 
>
_________________________________________________________
> Do You Yahoo!? 
> 流连网络世界的“你”是谁?
>
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> james-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> james-user-help@jakarta.apache.org
>  

_________________________________________________________
Do You Yahoo!? 
流连网络世界的“你”是谁?
http://cn.rd.yahoo.com/mail_cn/tag/?http://cn.surveys.yahoo.com/cn_user_profile_study_may2003

---------------------------------------------------------------------
To unsubscribe, e-mail: james-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-user-help@jakarta.apache.org