DNS Configuration

DNS Transport services are controlled by a configuration block in the config.xml. This block affects SMTP remote delivery.

The dnsserver tag defines the boundaries of the configuration block. It encloses all the relevant configuration for the DNS server. The behavior of the DNS service is controlled by the attributes and children of this tag.

The standard children of the dnsserver tag are:

  • servers - This is a list of DNS Servers to be used by James and are specified by one, or more server elements, which are child elements. Each server element is the IP address of a single DNS server.
  • authoritative - (true/false)This tag specifies whether or not to require authoritative (non-cached) DNS records; to only accept DNS responses that are authoritative for the domain. It is primarily useful in an intranet/extranet environment. This should always be false unless you understand the implications.

Sun JVM DNS Lookup Configuration.

Sun's JVM Internet address lookup uses a cache which is unbounded and doesn't time out.

This is obviously not great for a long running process like a mail server so we have introduced a system property networkaddress.cache.ttl that is used by the distributed phoenix start-up scripts, at startup, to override the java 1.4 Security.setProperty("networkaddress.cache.ttl").

By default this is set to 300 seconds.

This workaround will only be present if you use James as distributed. If you use James in any other container, including different versions of Phoenix, you will need to ensure that you make a similar configuration change to allow the internet address cache to perform acceptably.

James 2.3 has this workaround and it requires it to operate acceptably. Future versions of James will continue to have the workaround in place but will *not* require it. This will provide continued support for any mailets which you may deploy from other sources which might continue to use Sun's InetAddress class for DNS resolution.

We are not currently aware of the behaviour of this cache in other JVM implementations, nor of the effect, if any, which this change might have on them

For more on this read defect report JAMES-592 and related defects.