1RELOCATED(5) File Formats Manual RELOCATED(5)
2
3
4
6 relocated - Postfix relocated table format
7
9 postmap /etc/postfix/relocated
10
12 The optional relocated(5) table provides the information that is used
13 in "user has moved to new_location" bounce messages.
14
15 Normally, the relocated(5) table is specified as a text file that
16 serves as input to the postmap(1) command. The result, an indexed file
17 in dbm or db format, is used for fast searching by the mail system.
18 Execute the command "postmap /etc/postfix/relocated" to rebuild an
19 indexed file after changing the corresponding relocated table.
20
21 When the table is provided via other means such as NIS, LDAP or SQL,
22 the same lookups are done as for ordinary indexed files.
23
24 Alternatively, the table can be provided as a regular-expression map
25 where patterns are given as regular expressions, or lookups can be
26 directed to TCP-based server. In those case, the lookups are done in a
27 slightly different way as described below under "REGULAR EXPRESSION
28 TABLES" or "TCP-BASED TABLES".
29
30 Table lookups are case insensitive.
31
33 The search string is folded to lowercase before database lookup. As of
34 Postfix 2.3, the search string is not case folded with database types
35 such as regexp: or pcre: whose lookup fields can match both upper and
36 lower case.
37
39 The input format for the postmap(1) command is as follows:
40
41 · An entry has one of the following form:
42
43 pattern new_location
44
45 Where new_location specifies contact information such as an
46 email address, or perhaps a street address or telephone number.
47
48 · Empty lines and whitespace-only lines are ignored, as are lines
49 whose first non-whitespace character is a `#'.
50
51 · A logical line starts with non-whitespace text. A line that
52 starts with whitespace continues a logical line.
53
55 With lookups from indexed files such as DB or DBM, or from networked
56 tables such as NIS, LDAP or SQL, patterns are tried in the order as
57 listed below:
58
59 user@domain
60 Matches user@domain. This form has precedence over all other
61 forms.
62
63 user Matches user@site when site is $myorigin, when site is listed in
64 $mydestination, or when site is listed in $inet_interfaces or
65 $proxy_interfaces.
66
67 @domain
68 Matches other addresses in domain. This form has the lowest
69 precedence.
70
72 When a mail address localpart contains the optional recipient delimiter
73 (e.g., user+foo@domain), the lookup order becomes: user+foo@domain,
74 user@domain, user+foo, user, and @domain.
75
77 This section describes how the table lookups change when the table is
78 given in the form of regular expressions or when lookups are directed
79 to a TCP-based server. For a description of regular expression lookup
80 table syntax, see regexp_table(5) or pcre_table(5). For a description
81 of the TCP client/server table lookup protocol, see tcp_table(5). This
82 feature is not available up to and including Postfix version 2.4.
83
84 Each pattern is a regular expression that is applied to the entire
85 address being looked up. Thus, user@domain mail addresses are not bro‐
86 ken up into their user and @domain constituent parts, nor is user+foo
87 broken up into user and foo.
88
89 Patterns are applied in the order as specified in the table, until a
90 pattern is found that matches the search string.
91
92 Results are the same as with indexed file lookups, with the additional
93 feature that parenthesized substrings from the pattern can be interpo‐
94 lated as $1, $2 and so on.
95
97 This section describes how the table lookups change when lookups are
98 directed to a TCP-based server. For a description of the TCP
99 client/server lookup protocol, see tcp_table(5). This feature is not
100 available up to and including Postfix version 2.4.
101
102 Each lookup operation uses the entire address once. Thus, user@domain
103 mail addresses are not broken up into their user and @domain con‐
104 stituent parts, nor is user+foo broken up into user and foo.
105
106 Results are the same as with indexed file lookups.
107
109 The table format does not understand quoting conventions.
110
112 The following main.cf parameters are especially relevant. The text
113 below provides only a parameter summary. See postconf(5) for more
114 details including examples.
115
116 relocated_maps
117 List of lookup tables for relocated users or sites.
118
119 Other parameters of interest:
120
121 inet_interfaces
122 The network interface addresses that this system receives mail
123 on. You need to stop and start Postfix when this parameter
124 changes.
125
126 mydestination
127 List of domains that this mail system considers local.
128
129 myorigin
130 The domain that is appended to locally-posted mail.
131
132 proxy_interfaces
133 Other interfaces that this machine receives mail on by way of a
134 proxy agent or network address translator.
135
137 trivial-rewrite(8), address resolver
138 postmap(1), Postfix lookup table manager
139 postconf(5), configuration parameters
140
142 Use "postconf readme_directory" or "postconf html_directory" to locate
143 this information.
144 DATABASE_README, Postfix lookup table overview
145 ADDRESS_REWRITING_README, address rewriting guide
146
148 The Secure Mailer license must be distributed with this software.
149
151 Wietse Venema
152 IBM T.J. Watson Research
153 P.O. Box 704
154 Yorktown Heights, NY 10598, USA
155
156
157
158 RELOCATED(5)