ppoossttmmaapp //eettcc//ppoossttffiixx//rreellooccaatteedd
Normally, the rreellooccaatteedd(5) table is specified as a text file that serves as input to the ppoossttmmaapp(1) command. The result, an indexed file in ddbbmm or ddbb format, is used for fast searching by the mail system. Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//rreellooccaatteedd" to rebuild an indexed file after changing the corresponding relocated table.
When the table is provided via other means such as NIS, LDAP or SQL, the same lookups are done as for ordinary indexed files.
Alternatively, the table can be provided as a regular-expression map where patterns are given as regular expressions, or lookups can be directed to TCP-based server. In those case, the lookups are done in a slightly different way as described below under "REGULAR EXPRESSION TABLES" or "TCP-BASED TABLES".
Table lookups are case insensitive.
The search string is folded to lowercase before database lookup. As of Postfix 2.3, the search string is not case folded with database types such as regexp: or pcre: whose lookup fields can match both upper and lower case.
The input format for the ppoossttmmaapp(1) command is as follows:
_p_a_t_t_e_r_n _n_e_w___l_o_c_a_t_i_o_n
Where _n_e_w___l_o_c_a_t_i_o_n specifies contact information such as an email address, or perhaps a street address or telephone number.
With lookups from indexed files such as DB or DBM, or from networked tables such as NIS, LDAP or SQL, patterns are tried in the order as listed below:
When a mail address localpart contains the optional recipient delimiter (e.g., _u_s_e_r_+_f_o_o@_d_o_m_a_i_n), the lookup order becomes: _u_s_e_r_+_f_o_o@_d_o_m_a_i_n, _u_s_e_r@_d_o_m_a_i_n, _u_s_e_r_+_f_o_o, _u_s_e_r, and @_d_o_m_a_i_n.
This section describes how the table lookups change when the table is given in the form of regular expressions or when lookups are directed to a TCP-based server. For a description of regular expression lookup table syntax, see rreeggeexxpp__ttaabbllee(5) or ppccrree__ttaabbllee(5). For a description of the TCP client/server table lookup protocol, see ttccpp__ttaabbllee(5). This feature is not available up to and including Postfix version 2.4.
Each pattern is a regular expression that is applied to the entire address being looked up. Thus, _u_s_e_r_@_d_o_m_a_i_n mail addresses are not broken up into their _u_s_e_r and _@_d_o_m_a_i_n constituent parts, nor is _u_s_e_r_+_f_o_o broken up into _u_s_e_r and _f_o_o.
Patterns are applied in the order as specified in the table, until a pattern is found that matches the search string.
Results are the same as with indexed file lookups, with the additional feature that parenthesized substrings from the pattern can be interpolated as $$11, $$22 and so on.
This section describes how the table lookups change when lookups are directed to a TCP-based server. For a description of the TCP client/server lookup protocol, see ttccpp__ttaabbllee(5). This feature is not available up to and including Postfix version 2.4.
Each lookup operation uses the entire address once. Thus, _u_s_e_r_@_d_o_m_a_i_n mail addresses are not broken up into their _u_s_e_r and _@_d_o_m_a_i_n constituent parts, nor is _u_s_e_r_+_f_o_o broken up into _u_s_e_r and _f_o_o.
Results are the same as with indexed file lookups.
The following mmaaiinn..ccff parameters are especially relevant. The text below provides only a parameter summary. See ppoossttccoonnff(5) for more details including examples.
Other parameters of interest:
trivial-rewrite(8), address resolver postmap(1), Postfix lookup table manager postconf(5), configuration parameters
Use "ppoossttccoonnff rreeaaddmmee__ddiirreeccttoorryy" or "ppoossttccoonnff hhttmmll__ddiirreeccttoorryy" to locate this information.
DATABASE_README, Postfix lookup table overview ADDRESS_REWRITING_README, address rewriting guide
The Secure Mailer license must be distributed with this software.
Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA