This file is indexed.

/usr/share/doc/mailutils-doc/mailutils.html/Tests.html is in mailutils-doc 1:2.99.99-1ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Published by the Free Software Foundation,
51 Franklin Street, Fifth Floor
Boston, MA 02110-1301, USA

Copyright (C) 1999-2004, 2008-2012, 2014-2015 Free Software
Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, no Front-Cover, and no Back-Cover texts.
A copy of the license is included in the section entitled "GNU Free
Documentation License". -->
<!-- Created by GNU Texinfo 6.1, http://www.gnu.org/software/texinfo/ -->
<head>
<title>GNU Mailutils Manual: Tests</title>

<meta name="description" content="GNU Mailutils Manual: Tests">
<meta name="keywords" content="GNU Mailutils Manual: Tests">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link href="index.html#Top" rel="start" title="Top">
<link href="Function-Index.html#Function-Index" rel="index" title="Function Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Sieve-Language.html#Sieve-Language" rel="up" title="Sieve Language">
<link href="Built_002din-Tests.html#Built_002din-Tests" rel="next" title="Built-in Tests">
<link href="Comparators.html#Comparators" rel="prev" title="Comparators">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: inherit; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: inherit; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>


</head>

<body lang="en">
<a name="Tests"></a>
<div class="header">
<p>
Next: <a href="Actions.html#Actions" accesskey="n" rel="next">Actions</a>, Previous: <a href="Comparators.html#Comparators" accesskey="p" rel="prev">Comparators</a>, Up: <a href="Sieve-Language.html#Sieve-Language" accesskey="u" rel="up">Sieve Language</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<a name="Tests-1"></a>
<h3 class="section">4.6 Tests</h3>
<a name="index-test_002c-sieve-1"></a>

<p>This section describes the built-in tests supported by GNU libmu_sieve.
In the discussion below the following macro-notations are used:
</p>
<dl compact="compact">
<dt><var>match-type</var></dt>
<dd><p>This tag specifies the matching type to be used with the test.  It can
be one of the following:
</p>
<dl compact="compact">
<dd><a name="index-_003ais_002c-sieve"></a>
<a name="index-is_002c-sieve"></a>
</dd>
<dt><code>:is</code></dt>
<dd><p>The <code>:is</code> match type describes an absolute match; if the contents of
the first string are absolutely the same as the contents of the
second string, they match.  Only the string &ldquo;frobnitzm&rdquo; is the string
&ldquo;frobnitzm&rdquo;.  The null key &ldquo;:is&rdquo; and only &ldquo;:is&rdquo; the null value.
This is the default match-type.
</p>
<a name="index-_003acontains_002c-sieve"></a>
<a name="index-contains_002c-sieve"></a>
</dd>
<dt><code>:contains</code></dt>
<dd><p>The <code>:contains</code> match type describes a substring match.  If the value
argument contains the key argument as a substring, the match is true.
For instance, the string &ldquo;frobnitzm&rdquo; contains &ldquo;frob&rdquo; and &ldquo;nit&rdquo;, but
not &ldquo;fbm&rdquo;.  The null key &ldquo;&rdquo; is contained in all values.
</p>
<a name="index-_003amatches_002c-sieve"></a>
<a name="index-matches_002c-sieve"></a>
</dd>
<dt><code>:matches</code></dt>
<dd><p>The <code>:matches</code> version specifies a wildcard match using the
characters &lsquo;<samp>*</samp>&rsquo; and &lsquo;<samp>?</samp>&rsquo;.  &lsquo;<samp>*</samp>&rsquo; matches zero or more
characters, and &lsquo;<samp>?</samp>&rsquo; matches a single character.  &lsquo;<samp>?</samp>&rsquo; and
&lsquo;<samp>*</samp>&rsquo; may be escaped as &lsquo;<samp>\\?</samp>&rsquo; and &lsquo;<samp>\\*</samp>&rsquo; in strings to match
against themselves.  The first backslash escapes the second backslash;
together, they escape the &lsquo;<samp>*</samp>&rsquo;.
</p>
<a name="index-_003aregex_002c-sieve"></a>
<a name="index-regex_002c-sieve"></a>
</dd>
<dt><code>:regex</code></dt>
<dd><p>The <code>:regex</code> version specifies a match using POSIX Extended Regular
Expressions.
</p>
<a name="index-_003avalue_002c-sieve"></a>
<a name="index-value_002c-sieve"></a>
</dd>
<dt><code>:value <var>relation</var></code></dt>
<dd><p>The <code>:value</code> match type does a relational comparison between
strings.  Valid values for <var>relation</var> are:
</p>
<dl compact="compact">
<dt>&quot;eq&quot;</dt>
<dd><p>Equal
</p>
</dd>
<dt>&quot;ne&quot;</dt>
<dd><p>Not Equal
</p>
</dd>
<dt>&quot;gt&quot;</dt>
<dd><p>Greater Than
</p>
</dd>
<dt>&quot;ge&quot;</dt>
<dd><p>Greater than or Equal
</p>
</dd>
<dt>&quot;lt&quot;</dt>
<dd><p>Less Than
</p>
</dd>
<dt>&quot;le&quot;</dt>
<dd><p>Less than or Equal
</p></dd>
</dl>

<a name="index-_003acount_002c-sieve"></a>
<a name="index-count_002c-sieve"></a>
</dd>
<dt><code>:count <var>relation</var></code></dt>
<dd><p>This match type first determines the number of the specified entities
(headers, addresses, etc.) in the message and does a relational
comparison of the number of entities to the values specified in the
test expression.  The test expression must be a list of one element.
</p></dd>
</dl>

<a name="index-_003acomparator_002c-sieve"></a>
<a name="index-comparator_002c-sieve-1"></a>
</dd>
<dt><var>comparator</var></dt>
<dd><p>A <var>comparator</var> syntax item is defined as follows:
</p>
<div class="smallexample">
<pre class="smallexample">:comparator &quot;<var>comparator-name</var>&quot;
</pre></div>
<p>It instructs sieve to use the given comparator with the test.
If <var>comparator-name</var> is not one of &lsquo;<samp>i;octet</samp>&rsquo;,
&lsquo;<samp>i;ascii-casemap</samp>&rsquo; it must be required prior to using it.
For example:
</p>
<div class="smallexample">
<pre class="smallexample">require &quot;comparator-i;ascii-numeric&quot;;

if header :comparator &quot;i;ascii-numeric&quot; :is &quot;X-Num&quot; &quot;10&quot;
  {
    ...
</pre></div>

</dd>
<dt><var>address-part</var></dt>
<dd><p>This syntax item is used when testing structured Internet addresses.  It
specifies which part of an address must be used in comparisons.
Exactly one of the following tags may be used:
</p>
<dl compact="compact">
<dd><a name="index-_003aall_002c-sieve"></a>
<a name="index-all_002c-sieve"></a>
</dd>
<dt><code>:all</code></dt>
<dd><p>Use the whole address.  This is the default.
</p>
<a name="index-_003alocalpart_002c-sieve"></a>
<a name="index-localpart_002c-sieve"></a>
</dd>
<dt><code>:localpart</code></dt>
<dd><p>Use local part of the address.
</p>
<a name="index-_003adomain_002c-sieve"></a>
<a name="index-domain_002c-sieve"></a>
</dd>
<dt><code>:domain</code></dt>
<dd><p>Use domain part of the address.
</p></dd>
</dl>

</dd>
</dl>

<p><em>Notice</em>, that <var>match-type</var> modifiers interact with
comparators.  Some comparators are not suitable for matching with
<code>:contains</code> or <code>:matches</code>.  If this occurs, sieve issues
an appropriate error message.  For example, the statement:
</p>
<div class="smallexample">
<pre class="smallexample">if header :matches :comparator &quot;i;ascii-numeric&quot;
</pre></div>
<p>would result in the following error message:
</p>
<div class="smallexample">
<pre class="smallexample">comparator `i;ascii-numeric' is incompatible with match type `:matches'
in call to `header'
</pre></div>

<p>GNU Sieve supports two kinds of tests.  <em>Built-in tests</em> are
defined within the library and do not require any external files.
<em>External tests</em> are loadable modules that can be linked in at run
time using the <code>require</code> statement (see <a href="Require-Statement.html#Require-Statement">Require Statement</a>).
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top">&bull; <a href="Built_002din-Tests.html#Built_002din-Tests" accesskey="1">Built-in Tests</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
<tr><td align="left" valign="top">&bull; <a href="External-Tests.html#External-Tests" accesskey="2">External Tests</a>:</td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr>
<div class="header">
<p>
Next: <a href="Actions.html#Actions" accesskey="n" rel="next">Actions</a>, Previous: <a href="Comparators.html#Comparators" accesskey="p" rel="prev">Comparators</a>, Up: <a href="Sieve-Language.html#Sieve-Language" accesskey="u" rel="up">Sieve Language</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Function-Index.html#Function-Index" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>