We have introduced and given brief explanations of the way Exim can be configured to look up data in files and databases in earlier chapters. Lookups give you a lot of flexibility in the way you store the data that controls Exim’s behavior. They also allow Exim to make use of common, companywide databases that can be shared with other programs. Lookups can be used in several different kinds of configuration items, but they operate in the same way in each case. This chapter covers the underlying lookup mechanisms in detail; there are many examples of lookup usage throughout the book.
You can specify lookups in three different types of configuration items:
Any string that is to be expanded may contain explicit lookup requests, which make it possible to replace portions of the string by data read from a file or database. Details of the use of lookups in string expansions are given in Chapter 17.
The aliasfile director and the domainlist router can be configured directly to look up data in files.
A number of configuration options contain lists of domains, hosts, or mail addresses that are to be checked against some item of data related to a message. These lists can contain lookup items as a way of avoiding excessively long linear lists in the configuration file. The item being checked is used as a key for the lookup, and if the lookup succeeds, the item is taken as being in the list. For long lists, an indexed lookup gives much improved performance ...