19.3 The canonify Rule Set 3 | 691
The name canonify gives a clue to its role, that of putting all addresses into focused
or canonical form.
The canonify rule set 3 puts each address it gets into a form that simplifies the tasks
of other rule sets. The most common method is to have the canonify rule set 3 focus
an address (place angle brackets around the host part). Then later rules don??™t have to
search for the host part because it is already highlighted. For example, consider trying
to spot the recipient host in this mess:
uuhost!user%host1%host2
Here, user is eventually intended to receive the mail message on the host uuhost. But
where should sendmail send the message first? As it happens, sendmail selects uuhost
(unless it is uuhost). Focusing on this address therefore results in the following:
user%host1%host2<@uuhost.uucp>
Note that uuhost was moved to the end, the ! was changed to an @, and .uucp was
appended. The @ is there so that all focused parts uniformly contain an @ just before
the targeted host. Later, when we take up post-processing, we??™ll show how final rule
set 4 moves the uuhost back to the beginning and restores the !.
In actual practice, the role of the canonify rule set 3 is much more complex than this
example. In addition to focusing, it must handle list-syntax addresses (?§24.9.19 on
page 986), missing and malformed addresses, the % hack (?§7.
Pages:
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212