local
program. The other parameters in these lines are covered in Chapter 20 on page 711.
1.8.4.2 Macros
The ability to define a value once and then use it in many places makes maintaining
your sendmail.cf file easier. The D sendmail.cf command defines a macro. A macro??™s
name is either a single letter or curly-brace-enclosed multiple characters. It has text
as a value. Once defined, that text can be referenced symbolically elsewhere:
DRmail.us.edu ?†? a single letter
D{REMOTE}mail.us.edu ?†? multiple characters (beginning with V8.7)
Here, R and {REMOTE} are macro names that have the string mail.us.edu as their values.
Those values are accessed elsewhere in the sendmail.cf file withexpressions such
as $R and ${REMOTE}. Macros are covered in Chapter 21 on page 784.
1.8.4.3 Rules
At the heart of the sendmail.cf file are sequences of rules that rewrite (transform) mail
addresses from one form to another. This is necessary chiefly because addresses must
conform to many differing standards. The R command is used to define a rewriting
rule:
R$- $@ $1 @ $R user -> user @ remote
Mail addresses are compared to the rule on the left ($-). If they match that rule, they
are rewritten on the basis of the rule on the right ($@ $1 @ $R). The text at the far
right is a comment (that doesn??™t require a leading #).
This is the Title of the Book, eMatter Edition
Copyright ?© 2007 O??™Reilly & Associates, Inc.
Pages:
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89