The following example of an imta.cnf configuration file shows how rewrite rules are used to route messages to the proper channel. No domain names are used in order to keep things as simple as possible.
The key items (labeled with boldface numbers, enclosed in parentheses) in the preceding configuration file are explained in the following list:
1. | Exclamation points (!) are used to include comment lines. The exclamation point must appear in the first column. An exclamation point appearing anywhere else is interpreted as a literal exclamation point. | |
2. | The rewrite rules appear in the first half of the configuration file. Absolutely no blank lines should appear among the lines of rewrite rules. Lines with comments (beginning with an exclamation point in the first column) are, however, permitted. | |
3. | The first blank line to appear in the file signifies the end of the rewrite rules section and the start of the channel blocks. | |
4. | The first channel block to appear is always channel l (the local channel, designated with the lowercase letter "l"). Blank lines then separate each channel block from one another. An exception is a defaults channel, which can appear before channel l. | |
5. | A channel named a_channel. Notice the use of a channel keyword (822) with this channel. |
TABLE 3-2 lists the routing and queuing of messages by the preceding configuration:
TABLE 3-2 Address Routing and Channel Queuing
Address
Queued to channel
u@a
a_channel
u@b
b_channel
u@c
b_channel
u@d
a_channel
u@e
a_channel
u@f
b_channel