Pitfalls
Although a class macro name can be any ASCII character[6] (any character in the range 0x0 to 0x7f), avoid using any of the nonletter characters. At the very least they create confusing reading, and at worst they can cause sendmail to completely misinterpret your intentions.
Although values can traditionally be made to contain whitespace by quoting them, class macros will misinterpret those quotes. For example,
"vax ds1"wrongly parses into two class entries:"vaxandds1", with the quotes a part of each.Duplicate values are silently ignored. Therefore, typos in a list of values can cause an accidentally duplicated entry to be silently excluded.
Avoid creating a new class macro name without first checking to see whether it has already been used. That is, don’t create a list of UUCP hosts within class
$=Uwithout first checking both for preexistingCUandFUdefinitions and for rule-set uses of$=Uand$~U. It is perfectly legal for the$=Uand$~Uexpressions to exist in rule sets without a correspondingCUorFUdefinition. However, such empty references will still cause sendmail to search the string pool.Under V8 sendmail you can watch your class macro definitions being formed by using the
-d37.8debugging switch (-d37.8). Under other versions of sendmail you can only approximate this information by using the-d36.9debugging switch.The file form’s scanf(3) pattern can produce unexpected results. Remember that the pattern is applied to a line, not to a stream.
No error ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access