Postfix Overview - Introduction - SCN Research
Postfix Overview - Introduction - SCN Research
Postfix Overview - Introduction - SCN Research
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
REGEXP_TABLE(5)<br />
REGEXP_TABLE(5)<br />
Page 1 of 2<br />
NAME<br />
regexp_table - format of <strong>Postfix</strong> regular expression tables<br />
SYNOPSIS<br />
regexp:/etc/postfix/filename<br />
DESCRIPTION<br />
The <strong>Postfix</strong> mail system uses optional tables for address<br />
rewriting or mail routing. These tables are usually in dbm<br />
or db format. Alternatively, lookup tables can be specified<br />
in POSIX regular expression form.<br />
To find out what types of lookup tables your <strong>Postfix</strong> system<br />
supports use the postconf -m command.<br />
The general form of a <strong>Postfix</strong> regular expression table is:<br />
blanks and comments<br />
Blank lines are ignored, as are lines beginning<br />
with `#'.<br />
leading whitespace<br />
Lines that begin with whitespace continue the previous<br />
line.<br />
pattern result<br />
When pattern matches a search string, use the corresponding<br />
result. A line that starts with white<br />
space continues the preceding line.<br />
pattern1!pattern2 result<br />
Matches pattern1 but not pattern2.<br />
Each pattern is a regular expression enclosed by a pair of<br />
delimiters. The regular expression syntax is described in<br />
re_format(7). The expression delimiter can be any character,<br />
except whitespace or characters that have special<br />
meaning (traditionally the forward slash is used). The<br />
regular expression can contain whitespace.<br />
By default, matching is case-insensitive, although following<br />
the second slash with an `i' flag will reverse this.<br />
Other flags are `x' (disable extended expression syntax),<br />
and `m' (enable multi-line mode).<br />
Each pattern is applied to the entire lookup key string.<br />
Depending on the application, that string is an entire<br />
client hostname, an entire client IP address, or an entire<br />
mail address. Thus, no parent domain or parent network<br />
search is done, and user@domain mail addresses are not<br />
broken up into their user and domain constituent parts,<br />
nor is user+foo broken up into user and foo.<br />
Patterns are applied in the order as specified in the<br />
table, until a pattern is found that matches the search<br />
string.<br />
Substitution of substrings from the matched expression<br />
into the result string is possible using $1, $2, etc.. The<br />
macros in the result string may need to be written as ${n}<br />
or $(n) if they aren't followed by whitespace.<br />
http://www.porcupine.org/postfix-mirror/regexp_table.5.html<br />
6/26/01