O'Reilly logo

Exim: The Mail Transfer Agent by Philip Hazel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 18. Domain, Host, and Address Lists

Lists of domains, hosts, or addresses are used in a number of Exim’s options. In Chapter 3, we introduced them with this example of a list of local domains:

local_domains = tiber.rivers.example:\
                *.cities.example:\
                dbm;/usr/exim/domains

This list contains three different kinds of item, but in fact these are not the only possibilities. In this chapter we will explore all the variations, not only for domain lists, but also for host and address lists.

Each list can be thought of as defining a set of domains, hosts, or addresses, respectively. When Exim is testing to see whether a domain (or host, or address) matches an item in a list, it asks the question “Is this domain (or host, or address) in the set defined by this list?” It scans the list from left to right, checking against each item in turn. As soon as an item matches, the scan stops.

For example, using the previous setting of local_domains, Exim first checks to see if the domain it is testing is tiber.rivers.example. If it is, the answer to the implied question is “Yes, it is a local domain.” Otherwise, Exim goes on to check whether the domain ends with .cities.example, and if not, it looks up the domain in the file. If that fails, the answer is “No, this is not a local domain.”

All lists use colons as separator characters by default, and whitespace at either end of an item is ignored. If you need to include a literal colon in an item, it must be doubled. Unfortunately, this is necessary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required