Previous   Next   Contents       (Exim Filter Specification)

8. Header variables

There is a special set of expansion variables containing the headers of the message being processed. These variables have names beginning with $header_ followed by the name of the header, terminated by a colon. For example,

  $header_from:
  $header_subject:

The whole item, including the terminating colon, is replaced by the contents of the message header. If there is more than one header with the same name, their contents are concatenated, with a single newline character between them. The capitalization of the name following $header_ is not significant. Because any printing character except colon may appear in the name of a message's header (this is a requirement of RFC 2822, the document that describes the format of a mail message) curly brackets must not be used in this case, as they will be taken as part of the header name. Two shortcuts are allowed in naming header variables:

If the message does not contain a header of the given name, an empty string is substituted. Thus it is important to spell the names of headers correctly. Do not use $header_Reply_to when you really mean $header_Reply-to.


Previous  Next  Contents       (Exim Filter Specification)