1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
<HTML>
<HEAD>
<!-- This HTML file has been created by texi2html 1.52
from filter on 25 November 2000 -->
<TITLE>Exim Filter Specification - Header variables</TITLE>
</HEAD>
<body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
Go to the <A HREF="filter_1.html">first</A>, <A HREF="filter_7.html">previous</A>, <A HREF="filter_9.html">next</A>, <A HREF="filter_34.html">last</A> section, <A HREF="filter_toc.html">table of contents</A>.
<P><HR><P>
<H2><A NAME="SEC8" HREF="filter_toc.html#TOC8">Header variables</A></H2>
<P>
There is a special set of expansion variables containing the headers of the
message being processed. These variables have names beginning with
<TT>`$header_'</TT> followed by the name of the header, terminated by a colon. For
example,
<PRE>
$header_from:
$header_subject:
</PRE>
<P>
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 <TT>`$header_'</TT> 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 822, the document that describes the
format of a mail message) curly brackets must <EM>not</EM> be used in this case, as
they will be taken as part of the header name. Two shortcuts are allowed in
naming header variables:
</P>
<UL>
<LI>
The initiating <TT>`$header_'</TT> can be abbreviated to <TT>`$h_'</TT>.
<LI>
The terminating colon can be omitted if the next character is white space. The
white space character is retained in the expanded string.
<font color=green>
However, this is not recommended, because it makes it easy to forget the colon
when it really is needed.
</font>
</UL>
<P>
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 <TT>`$header_Reply_to'</TT> when you really mean <TT>`$header_Reply-to'</TT>.
</P>
<P>
You can test for the presence or absence of a header by means of the `def'
condition, which is described in section 32.
</P>
<P><HR><P>
Go to the <A HREF="filter_1.html">first</A>, <A HREF="filter_7.html">previous</A>, <A HREF="filter_9.html">next</A>, <A HREF="filter_34.html">last</A> section, <A HREF="filter_toc.html">table of contents</A>.
</BODY>
</HTML>
|