Chapter 14. Rewriting Addresses

There are a number of circumstances in which addresses in messages are altered as they are handled by Exim. This can apply both to the messages’ envelopes and to their headers. The header lines that may be affected are Bcc:, Cc:, From:, Reply-To:, Sender:, and To:. Some of these changes happen automatically, whereas others are explicitly configured by the administrator.

Automatic Rewriting

One case of automatic rewriting is the addition of a domain to an unqualified address, as discussed in Chapter 13. This qualification is applied to addresses in header lines as well as to those in envelopes. For example, if a message is sent on a host where qualify_domain is set to crete.example by this command:

$ exim daedalus
            To: daedalus
            ...

the unqualified local part daedalus is transformed into the fully qualified address daedalus@crete.example, both in the envelope and in the To: header line. Messages that arrive from other hosts should not contain unqualified addresses; you need to set sender_unqualified_hosts and/or receiver_unqualified_hosts if you want to allow such messages to be accepted (as described in Chapter 13).

The other case in which automatic rewriting happens is when an incomplete domain is given. The routing process may cause this to be expanded into the full domain name within the current encompassing domain. For example, a header such as:

To: minos@knossos

might be rewritten as:

To: minos@knossos.crete.example

if encountered on a host within ...

Get Exim: The Mail Transfer Agent now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.