Mailing List Archive

[Spamassassin Wiki] Update of "CachingNameserver" by BobProulx
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by BobProulx:
http://wiki.apache.org/spamassassin/CachingNameserver

The comment on the change is:
answer caching nameserver FAQ from the mailing list

New page:
== Caching Nameserver ==

Often Spam``Assassin users will find that their system is performing
many DNS (Domain Name System) lookups. There are many NetworkTests
in the suite of tests. The network tests significantly enhance the
ability of Spam``Assassin to correctly catagorize messages. One of
the main network tests is to look up domain names in the DnsBlocklists.

The DNS lookups can create a lot of network activity. There are a few
times when this can cause performance issues. This question is often
raised on the Spam``Assassin MailingLists.

* For users behind slow network connections the latency of the lookup can slow down the catagorization process.

* For large sites processing many mail messages the volume of lookups can be a problem.

Often the same information is being looked up again and again.
Needing to do a completely lookup of the same data repeatedly is
inefficient.

The standard solution is to install a local caching nameserver to
cache repeated DNS requests. This will significantly reduce network
traffic due to DNS lookups. This improves system efficiency.

This page describes installing [http://www.isc.org BIND] (Berkeley
Internet Name Daemon) in a caching configuration on the system. BIND
is the standard nameserver in use on the Internet today. More
internet servers run BIND than any other nameserver daemon. There are
also other alternative DNS nameservers in common use. The
[http://tinydns.org/ tinydns] and [http://cr.yp.to/djbdns.html djbdns]
programs are typical alternatives.

=== Debian GNU/Linux ===

The [http://www.debian.org Debian] system uses APT (Advanced
Package Tool) to manage the system. The following commands will
install BIND (Berkeley Internet Name Daemon) version 9 on the system.

{{{
apt-get update
apt-get install bind9
}}}

The default configuration for the Debian package is install a caching
nameserver suitable for Internet use. After installation the daemon
will be configured and running.

=== Red Hat and Fedora Core GNU/Linux ===

On [http://www.redhat.com Red Hat and Fedora Core] systems the BIND
software is in the "bind" rpm package. The "caching-nameserver" rpm
package contains a caching nameserver configuration suitable for
Internet use. Locate those packages from your vendor and install
them. The http://rpmfind.net rpm search site is very useful for
locating rpms for your system.

On Red Hat the following commands will install BIND and a caching
nameserver configuration on the system. The version numbers used in
the following example are purely for example. Use the current package
version for your system release. This example shows a typical
installation on RH9.

After installation the daemon will need to be configured and started.
The following commands will configure the BIND name daemon to be
started at system boot time and then will start the daemon.

{{{
rpm -Uvh bind-9.2.1-16.i386.rpm
rpm -Uvh caching-nameserver-7.2-7.i386.rpm
chkconfig bind on
/etc/init.d/named start
}}}

== GNU C library configuration ==

For the current glibc version 6 the host lookup ordering is configured
in the /etc/nsswitch.conf file. The typical configuration would
specify the local system file first and the network DNS database
second.

{{{
hosts: files dns
}}}

The older glibc version 5 library configured host lookup ordering in
the /etc/host.conf. This library is now obsolete. But your system
will probably provide this file for compatibility to enable older
programs linked against the older library.

{{{
order hosts,bind
}}}

=== /etc/hosts ===

The /etc/hosts file is the original location for DNS data. However it
is not used generally for DNS lookups on modern systems. It is
impossible to keep the entire Internet database there. But it is
still used for a small amount of local system data.

Typically the localhost loopback address is stored there and nothing
more. However it is acceptable to configure a small number of local
network systems there and that is typical on small network sites.
Here is an example /etc/hosts file.

{{{
127.0.0.1 localhost
}}}
[Spamassassin Wiki] Update of "CachingNameserver" by BobProulx [ In reply to ]
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by BobProulx:
http://wiki.apache.org/spamassassin/CachingNameserver

The comment on the change is:
/etc/resolv.conf information

------------------------------------------------------------------------------
order hosts,bind
}}}

+ === /etc/resolv.conf ===
+
+ The /etc/resolv.conf file configures the nameserver used to look up
+ DNS data. A typical system contains a '''search''' line to specify
+ the local domain. It also contains up to three '''nameserver''' lines
+ to configure nameservers. Because we are setting up a local caching
+ nameserver only one entry is needed. The {{{0.0.0.0}}} entry
+ specifies that the nameserver on the local host will be contacted for
+ DNS lookups.
+
+ {{{
+ search example.com
+ nameserver 0.0.0.0
+ }}}
+
+ Note that if your host uses a client configuration with DHCP to
+ configure networking that this file may be overwritten by the DHCP
+ client on the local host every time the network is enabled. See your
+ DHCP documentation for more information.
+
=== /etc/hosts ===

The /etc/hosts file is the original location for DNS data. However it
[Spamassassin Wiki] Update of "CachingNameserver" by BobProulx [ In reply to ]
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Spamassassin Wiki" for change notification.

The following page has been changed by BobProulx:
http://wiki.apache.org/spamassassin/CachingNameserver

The comment on the change is:
Added rbldnsd

------------------------------------------------------------------------------
Internet Name Daemon) in a caching configuration on the system. BIND
is the standard nameserver in use on the Internet today. More
internet servers run BIND than any other nameserver daemon. There are
- also other alternative DNS nameservers in common use. The
+ also other alternative DNS nameservers in common use. Here are a few.
- [http://tinydns.org/ tinydns] and [http://cr.yp.to/djbdns.html djbdns]
- programs are typical alternatives.
+
+ * [http://cr.yp.to/djbdns.html djbdns] / [http://tinydns.org/ tinydns] D. J. Bernstein's DNS daemon.
+ * [http://www.corpit.ru/mjt/rbldnsd.html rbldnsd] is a small and fast DNS daemon which is especially made to serve DNSBL zones. This daemon was inspired by Dan J. Bernstein's rbldns program found in the djbdns package. The [http://www.surbl.org/dnscache-rbldnsd.html rbldnsd FAQ] at surbl.org.

=== Debian GNU/Linux ===