Check the Right Side of Aliases

When V8 sendmail rebuilds the alias database files, it can optionally be told to check the legality of all addresses to the right of the colons. The CheckAliases option (CheckAliases on page 982) turns on this check:

define(`confCHECK_ALIASES', true)   ← mc configuration (V8.7 and later)
-on                                 ← command-line shorthand (V8.7 and later)

Each address is validated by running it through the canonify rule set 3, and then the parse rule set 0. Rule set parse must select a delivery agent for the address. If it does, the address is silently validated and accepted. If not, the address is skipped, and the following warning is printed:

address... bad address

Other errors might be printed before this line that indicate more specific reasons for the failure. For example:

... Unbalanced '<'

The -d20.1 debugging switch (-d20.1 on page 553) can be used to gain a better idea of why the address failed. But be forewarned: the -d20.1 switch can produce many screens of output.

In general, we do not recommend setting the CheckAliases option to true in the configuration file because it can cause each right-side address to be resolved through DNS and thus slow down the rebuild considerably. For better efficiency, leave the CheckAliases option off in the configuration file and turn it on only when rebuilding by hand:

% newaliases -OCheckAliases
% newaliases -onold-style shorthand, still legal

Get sendmail, 4th Edition 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.