5 # Postfix generic table format
7 # \fBpostmap /etc/postfix/generic\fR
9 # \fBpostmap -q "\fIstring\fB" /etc/postfix/generic\fR
11 # \fBpostmap -q - /etc/postfix/generic <\fIinputfile\fR
13 # The optional \fBgeneric\fR(5) table specifies an address
14 # mapping that applies when mail is delivered. This is the
15 # opposite of \fBcanonical\fR(5) mapping, which applies when
18 # Typically, one would use the \fBgeneric\fR(5) table on a
19 # system that does not have a valid Internet domain name and
20 # that uses something like \fIlocaldomain.local\fR instead.
21 # The \fBgeneric\fR(5) table is then used by the \fBsmtp\fR(8)
22 # client to transform local mail addresses into valid Internet
23 # mail addresses when mail has to be sent across the Internet.
24 # See the EXAMPLE section at the end of this document.
26 # The \fBgeneric\fR(5) mapping affects both message header
27 # addresses (i.e. addresses that appear inside messages) and
28 # message envelope addresses (for example, the addresses that
29 # are used in SMTP protocol commands).
31 # Normally, the \fBgeneric\fR(5) table is specified as a
32 # text file that serves as input to the \fBpostmap\fR(1)
33 # command. The result, an indexed file in \fBdbm\fR or
34 # \fBdb\fR format, is used for fast searching by the mail
35 # system. Execute the command "\fBpostmap /etc/postfix/generic\fR"
36 # to rebuild an indexed file after changing the corresponding
39 # When the table is provided via other means such as NIS, LDAP
40 # or SQL, the same lookups are done as for ordinary indexed files.
42 # Alternatively, the table can be provided as a regular-expression
43 # map where patterns are given as regular expressions, or lookups
44 # can be directed to TCP-based server. In those case, the lookups
45 # are done in a slightly different way as described below under
46 # "REGULAR EXPRESSION TABLES" or "TCP-BASED TABLES".
50 # The search string is folded to lowercase before database
51 # lookup. As of Postfix 2.3, the search string is not case
52 # folded with database types such as regexp: or pcre: whose
53 # lookup fields can match both upper and lower case.
57 # The input format for the \fBpostmap\fR(1) command is as follows:
58 # .IP "\fIpattern result\fR"
59 # When \fIpattern\fR matches a mail address, replace it by the
60 # corresponding \fIresult\fR.
61 # .IP "blank lines and comments"
62 # Empty lines and whitespace-only lines are ignored, as
63 # are lines whose first non-whitespace character is a `#'.
64 # .IP "multi-line text"
65 # A logical line starts with non-whitespace text. A line that
66 # starts with whitespace continues a logical line.
70 # With lookups from indexed files such as DB or DBM, or from networked
71 # tables such as NIS, LDAP or SQL, patterns are tried in the order as
73 # .IP "\fIuser\fR@\fIdomain address\fR"
74 # Replace \fIuser\fR@\fIdomain\fR by \fIaddress\fR. This form
75 # has the highest precedence.
76 # .IP "\fIuser address\fR"
77 # Replace \fIuser\fR@\fIsite\fR by \fIaddress\fR when \fIsite\fR is
78 # equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
79 # $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
80 # or $\fBproxy_interfaces\fR.
81 # .IP "@\fIdomain address\fR"
82 # Replace other addresses in \fIdomain\fR by \fIaddress\fR.
83 # This form has the lowest precedence.
84 # RESULT ADDRESS REWRITING
87 # The lookup result is subject to address rewriting:
89 # When the result has the form @\fIotherdomain\fR, the
90 # result becomes the same \fIuser\fR in \fIotherdomain\fR.
92 # When "\fBappend_at_myorigin=yes\fR", append "\fB@$myorigin\fR"
93 # to addresses without "@domain".
95 # When "\fBappend_dot_mydomain=yes\fR", append
96 # "\fB.$mydomain\fR" to addresses without ".domain".
100 # When a mail address localpart contains the optional recipient delimiter
101 # (e.g., \fIuser+foo\fR@\fIdomain\fR), the lookup order becomes:
102 # \fIuser+foo\fR@\fIdomain\fR, \fIuser\fR@\fIdomain\fR, \fIuser+foo\fR,
103 # \fIuser\fR, and @\fIdomain\fR.
105 # The \fBpropagate_unmatched_extensions\fR parameter controls whether
106 # an unmatched address extension (\fI+foo\fR) is propagated to the
107 # result of table lookup.
108 # REGULAR EXPRESSION TABLES
111 # This section describes how the table lookups change when the table
112 # is given in the form of regular expressions. For a description of
113 # regular expression lookup table syntax, see \fBregexp_table\fR(5)
114 # or \fBpcre_table\fR(5).
116 # Each pattern is a regular expression that is applied to the entire
117 # address being looked up. Thus, \fIuser@domain\fR mail addresses are not
118 # broken up into their \fIuser\fR and \fI@domain\fR constituent parts,
119 # nor is \fIuser+foo\fR broken up into \fIuser\fR and \fIfoo\fR.
121 # Patterns are applied in the order as specified in the table, until a
122 # pattern is found that matches the search string.
124 # Results are the same as with indexed file lookups, with
125 # the additional feature that parenthesized substrings from the
126 # pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on.
130 # This section describes how the table lookups change when lookups
131 # are directed to a TCP-based server. For a description of the TCP
132 # client/server lookup protocol, see \fBtcp_table\fR(5).
133 # This feature is not available up to and including Postfix version 2.4.
135 # Each lookup operation uses the entire address once. Thus,
136 # \fIuser@domain\fR mail addresses are not broken up into their
137 # \fIuser\fR and \fI@domain\fR constituent parts, nor is
138 # \fIuser+foo\fR broken up into \fIuser\fR and \fIfoo\fR.
140 # Results are the same as with indexed file lookups.
144 # The following shows a generic mapping with an indexed file.
145 # When mail is sent to a remote host via SMTP, this replaces
146 # \fIhis@localdomain.local\fR by his ISP mail address, replaces
147 # \fIher@localdomain.local\fR by her ISP mail address, and
148 # replaces other local addresses by his ISP account, with
149 # an address extension of \fI+local\fR (this example assumes
150 # that the ISP supports "+" style address extensions).
154 # /etc/postfix/main.cf:
155 # smtp_generic_maps = hash:/etc/postfix/generic
157 # /etc/postfix/generic:
158 # his@localdomain.local hisaccount@hisisp.example
159 # her@localdomain.local heraccount@herisp.example
160 # @localdomain.local hisaccount+local@hisisp.example
164 # Execute the command "\fBpostmap /etc/postfix/generic\fR"
165 # whenever the table is changed. Instead of \fBhash\fR, some
166 # systems use \fBdbm\fR database files. To find out what
167 # tables your system supports use the command "\fBpostconf
170 # The table format does not understand quoting conventions.
171 # CONFIGURATION PARAMETERS
174 # The following \fBmain.cf\fR parameters are especially relevant.
175 # The text below provides only a parameter summary. See
176 # \fBpostconf\fR(5) for more details including examples.
177 # .IP \fBsmtp_generic_maps\fR
178 # Address mapping lookup table for envelope and header sender
179 # and recipient addresses while delivering mail via SMTP.
180 # .IP \fBpropagate_unmatched_extensions\fR
181 # A list of address rewriting or forwarding mechanisms that propagate
182 # an address extension from the original address to the result.
183 # Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
184 # \fBforward\fR, \fBinclude\fR, or \fBgeneric\fR.
186 # Other parameters of interest:
187 # .IP \fBinet_interfaces\fR
188 # The network interface addresses that this system receives mail on.
189 # You need to stop and start Postfix when this parameter changes.
190 # .IP \fBproxy_interfaces\fR
191 # Other interfaces that this machine receives mail on by way of a
192 # proxy agent or network address translator.
193 # .IP \fBmydestination\fR
194 # List of domains that this mail system considers local.
196 # The domain that is appended to locally-posted mail.
197 # .IP \fBowner_request_special\fR
198 # Give special treatment to \fBowner-\fIxxx\fR and \fIxxx\fB-request\fR
201 # postmap(1), Postfix lookup table manager
202 # postconf(5), configuration parameters
203 # smtp(8), Postfix SMTP client
207 # Use "\fBpostconf readme_directory\fR" or
208 # "\fBpostconf html_directory\fR" to locate this information.
211 # ADDRESS_REWRITING_README, address rewriting guide
212 # DATABASE_README, Postfix lookup table overview
213 # STANDARD_CONFIGURATION_README, configuration examples
217 # The Secure Mailer license must be distributed with this software.
219 # A genericstable feature appears in the Sendmail MTA.
221 # This feature is available in Postfix 2.2 and later.
224 # IBM T.J. Watson Research
226 # Yorktown Heights, NY 10598, USA