home *** CD-ROM | disk | FTP | other *** search
- Macros
-
- First, a short word about sendmail macros. Sendmail understands
- 2 forms of macros. Each user-defined macro name is a single letter
- from the set [A-Z]. To assign a single value to a macro (e.g., 'A'),
- a line of the form:
- DAvalue
- is used. This assigns the string 'value' to the macro 'A'. The second
- form of sendmail macro is known as a 'class', and can hold a list
- of strings. To define a class 'A' (distinct from the macro 'A'!),
- you use a line of the form:
- CAvalue1 value2...
- which assigns the list 'value1 value2...' to the class 'A'. Equivalently,
- one can say
- CAvalue1
- CAvalue2
- ...
- or any combination of the above. You can also define a class from a file
- of values. For example, to initialize the class 'U' as all uucp hosts
- read from the file /usr/local/lib/mail/mailhosts.uucp, one can say:
- FU/usr/local/lib/mail/mailhosts.uucp
-
- There are some pre-defined macros which are available to you, as letters
- in the range [a-z]. The most common of these is 'w', which is defined
- as the hostname (as returned by '/bin/hostname'). To use the value of
- a macro, preface the macro name by a '$', e.g.
- DA$w
- defines the macro 'A' to be the hostname.
-
- Next, a short word about m4 macros. Some m4 macros are used to conditionally
- include certain sendmail configuration lines. To define an m4 macro, use
- a line of the form:
- define(MACRONAME,1)
- These lines will not appear in the output sendmail.cf, but are used internally
- during the creation of the sendmail.cf.
-