home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail.cf / doc / 3.macros < prev    next >
Encoding:
Text File  |  1987-05-14  |  1.5 KB  |  36 lines

  1. Macros
  2.  
  3. First, a short word about sendmail macros.  Sendmail understands
  4. 2 forms of macros.  Each user-defined macro name is a single letter
  5. from the set [A-Z].  To assign a single value to a macro (e.g., 'A'),
  6. a line of the form:
  7.     DAvalue
  8. is used.  This assigns the string 'value' to the macro 'A'.  The second
  9. form of sendmail macro is known as a 'class', and can hold a list
  10. of strings.  To define a class 'A' (distinct from the macro 'A'!),
  11. you use a line of the form:
  12.     CAvalue1 value2...
  13. which assigns the list 'value1 value2...' to the class 'A'.  Equivalently,
  14. one can say
  15.     CAvalue1
  16.     CAvalue2
  17.     ...
  18. or any combination of the above.  You can also define a class from a file
  19. of values.  For example, to initialize the class 'U' as all uucp hosts
  20. read from the file /usr/local/lib/mail/mailhosts.uucp, one can say:
  21.     FU/usr/local/lib/mail/mailhosts.uucp
  22.  
  23. There are some pre-defined macros which are available to you, as letters
  24. in the range [a-z].  The most common of these is 'w', which is defined
  25. as the hostname (as returned by '/bin/hostname').  To use the value of
  26. a macro, preface the macro name by a '$', e.g.
  27.     DA$w
  28. defines the macro 'A' to be the hostname.
  29.  
  30. Next, a short word about m4 macros.  Some m4 macros are used to conditionally
  31. include certain sendmail configuration lines.  To define an m4 macro, use
  32. a line of the form:
  33.     define(MACRONAME,1)
  34. These lines will not appear in the output sendmail.cf, but are used internally
  35. during the creation of the sendmail.cf.
  36.