~ubuntu-branches/ubuntu/vivid/postfix/vivid-proposed

« back to all changes in this revision

Viewing changes to html/PCRE_README.html

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones
  • Date: 2005-02-27 09:33:07 UTC
  • Revision ID: james.westby@ubuntu.com-20050227093307-cn789t27ibnlh6tf
Tags: upstream-2.1.5
ImportĀ upstreamĀ versionĀ 2.1.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
 
2
        "http://www.w3.org/TR/html4/loose.dtd">
 
3
 
 
4
<html>
 
5
 
 
6
<head>
 
7
 
 
8
<title>Postfix PCRE Support</title>
 
9
 
 
10
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
 
11
 
 
12
</head>
 
13
 
 
14
<body>
 
15
 
 
16
<h1><img src="postfix-logo.jpg" width="203" height="98" ALT="">Postfix PCRE Support</h1>
 
17
 
 
18
<hr>
 
19
 
 
20
<h2>PCRE (Perl Compatible Regular Expressions) map support</h2>
 
21
 
 
22
<p> The optional "pcre" map type allows you to specify regular
 
23
expressions with the PERL style notation such as \s for space and
 
24
\S for non-space. The main benefit, however, is that pcre lookups
 
25
are often faster than regexp lookups. This is because the pcre
 
26
implementation is often more efficient than the POSIX regular
 
27
expression implementation that you find on many systems. </p>
 
28
 
 
29
<p> A description of how to use pcre tables, including examples,
 
30
is given in the <a href="pcre_table.5.html">pcre_table(5)</a> manual page. Information about PCRE
 
31
itself can be found at <a href="http://www.pcre.org/">http://www.pcre.org/</a>. </p>
 
32
 
 
33
<h2>Building Postfix with PCRE support</h2>
 
34
 
 
35
<p> Note: to use pcre with Debian GNU/Linux's Postfix, all you
 
36
need is to install the postfix-pcre package and you're done.  There
 
37
is no need to recompile Postfix. </p>
 
38
 
 
39
<p> In some future, Postfix will have a plug-in interface for adding
 
40
map types. Until then, you need to compile PCRE support into Postfix.
 
41
</p>
 
42
 
 
43
<p> First of all, you need the PCRE library (Perl Compatible Regular
 
44
Expressions), which can be obtained from: </p>
 
45
 
 
46
<blockquote> 
 
47
<a href="ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/">ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/</a>.
 
48
</blockquote>
 
49
 
 
50
<p> NOTE: pcre versions prior to 2.06 cannot be used. </p>
 
51
 
 
52
<p> In order to build Postfix with PCRE support you need to add
 
53
-DHAS_PCRE and a -I for the PCRE include file to CCARGS, and add
 
54
the path to the PCRE library to AUXLIBS, for example: </p>
 
55
 
 
56
<blockquote>
 
57
<pre>
 
58
make -f Makefile.init makefiles \
 
59
    "CCARGS=-DHAS_PCRE -I/usr/local/include" \
 
60
    "AUXLIBS=-L/usr/local/lib -lpcre"
 
61
</pre>
 
62
</blockquote>
 
63
 
 
64
<h2>Things to know</h2>
 
65
 
 
66
<ul>
 
67
 
 
68
<li> <p> When Postfix searches a <a href="pcre_table.5.html">pcre</a>: or <a href="regexp_table.5.html">regexp</a>: lookup table,
 
69
each pattern is applied to the entire input string. Depending on
 
70
the application, that string is an entire client hostname, an entire
 
71
client IP address, or an entire mail address. Thus, no parent domain
 
72
or parent network search is done, "user@domain" mail addresses are
 
73
not broken up into their user and domain constituent parts, and
 
74
"user+foo" is not broken up into user and foo.  </p>
 
75
 
 
76
<li> <p> Regular expression tables such as <a href="pcre_table.5.html">pcre</a>: or <a href="regexp_table.5.html">regexp</a>: are
 
77
not allowed to do $number substitution in lookup results that can
 
78
be security sensitive: currently, that restriction applies to the
 
79
local <a href="aliases.5.html">aliases(5)</a> database or the <a href="virtual.8.html">virtual(8)</a> delivery agent tables.
 
80
</p>
 
81
 
 
82
</ul>
 
83
 
 
84
</body>
 
85
 
 
86
</html>