1 # VIRTUAL(5) VIRTUAL(5)
4 # virtual - Postfix virtual alias table format
7 # postmap /etc/postfix/virtual
9 # postmap -q "string" /etc/postfix/virtual
11 # postmap -q - /etc/postfix/virtual <inputfile
14 # The optional virtual(5) alias table rewrites recipient
15 # addresses for all local, all virtual, and all remote mail
16 # destinations. This is unlike the aliases(5) table which
17 # is used only for local(8) delivery. Virtual aliasing is
18 # recursive, and is implemented by the Postfix cleanup(8)
19 # daemon before mail is queued.
21 # The main applications of virtual aliasing are:
23 # o To redirect mail for one address to one or more
26 # o To implement virtual alias domains where all
27 # addresses are aliased to addresses in other
30 # Virtual alias domains are not to be confused with
31 # the virtual mailbox domains that are implemented
32 # with the Postfix virtual(8) mail delivery agent.
33 # With virtual mailbox domains, each recipient
34 # address can have its own mailbox.
36 # Virtual aliasing is applied only to recipient envelope
37 # addresses, and does not affect message headers. Use
38 # canonical(5) mapping to rewrite header and envelope
39 # addresses in general.
41 # Normally, the virtual(5) alias table is specified as a
42 # text file that serves as input to the postmap(1) command.
43 # The result, an indexed file in dbm or db format, is used
44 # for fast searching by the mail system. Execute the command
45 # "postmap /etc/postfix/virtual" to rebuild an indexed file
46 # after changing the corresponding text file.
48 # When the table is provided via other means such as NIS,
49 # LDAP or SQL, the same lookups are done as for ordinary
52 # Alternatively, the table can be provided as a regular-
53 # expression map where patterns are given as regular expres-
54 # sions, or lookups can be directed to TCP-based server. In
55 # those case, the lookups are done in a slightly different
56 # way as described below under "REGULAR EXPRESSION TABLES"
57 # or "TCP-BASED TABLES".
60 # The search string is folded to lowercase before database
61 # lookup. As of Postfix 2.3, the search string is not case
62 # folded with database types such as regexp: or pcre: whose
63 # lookup fields can match both upper and lower case.
66 # The input format for the postmap(1) command is as follows:
69 # When pattern matches a mail address, replace it by
70 # the corresponding result.
72 # blank lines and comments
73 # Empty lines and whitespace-only lines are ignored,
74 # as are lines whose first non-whitespace character
78 # A logical line starts with non-whitespace text. A
79 # line that starts with whitespace continues a logi-
83 # With lookups from indexed files such as DB or DBM, or from
84 # networked tables such as NIS, LDAP or SQL, patterns are
85 # tried in the order as listed below:
87 # user@domain address, address, ...
88 # Redirect mail for user@domain to address. This
89 # form has the highest precedence.
91 # user address, address, ...
92 # Redirect mail for user@site to address when site is
93 # equal to $myorigin, when site is listed in $mydes-
94 # tination, or when it is listed in $inet_interfaces
95 # or $proxy_interfaces.
97 # This functionality overlaps with functionality of
98 # the local aliases(5) database. The difference is
99 # that virtual(5) mapping can be applied to non-local
102 # @domain address, address, ...
103 # Redirect mail for other users in domain to address.
104 # This form has the lowest precedence.
106 # Note: @domain is a wild-card. With this form, the
107 # Postfix SMTP server accepts mail for any recipient
108 # in domain, regardless of whether that recipient
109 # exists. This may turn your mail system into a
110 # backscatter source: Postfix first accepts mail for
111 # non-existent recipients and then tries to return
112 # that mail as "undeliverable" to the often forged
115 # RESULT ADDRESS REWRITING
116 # The lookup result is subject to address rewriting:
118 # o When the result has the form @otherdomain, the
119 # result becomes the same user in otherdomain. This
120 # works only for the first address in a multi-address
123 # o When "append_at_myorigin=yes", append "@$myorigin"
124 # to addresses without "@domain".
126 # o When "append_dot_mydomain=yes", append ".$mydomain"
127 # to addresses without ".domain".
130 # When a mail address localpart contains the optional recip-
131 # ient delimiter (e.g., user+foo@domain), the lookup order
132 # becomes: user+foo@domain, user@domain, user+foo, user, and
135 # The propagate_unmatched_extensions parameter controls
136 # whether an unmatched address extension (+foo) is propa-
137 # gated to the result of table lookup.
139 # VIRTUAL ALIAS DOMAINS
140 # Besides virtual aliases, the virtual alias table can also
141 # be used to implement virtual alias domains. With a virtual
142 # alias domain, all recipient addresses are aliased to
143 # addresses in other domains.
145 # Virtual alias domains are not to be confused with the vir-
146 # tual mailbox domains that are implemented with the Postfix
147 # virtual(8) mail delivery agent. With virtual mailbox
148 # domains, each recipient address can have its own mailbox.
150 # With a virtual alias domain, the virtual domain has its
151 # own user name space. Local (i.e. non-virtual) usernames
152 # are not visible in a virtual alias domain. In particular,
153 # local aliases(5) and local mailing lists are not visible
154 # as localname@virtual-alias.domain.
156 # Support for a virtual alias domain looks like:
158 # /etc/postfix/main.cf:
159 # virtual_alias_maps = hash:/etc/postfix/virtual
161 # Note: some systems use dbm databases instead of hash. See
162 # the output from "postconf -m" for available database
165 # /etc/postfix/virtual:
166 # virtual-alias.domain anything (right-hand content does not matter)
167 # postmaster@virtual-alias.domain postmaster
168 # user1@virtual-alias.domain address1
169 # user2@virtual-alias.domain address2, address3
171 # The virtual-alias.domain anything entry is required for a
172 # virtual alias domain. Without this entry, mail is rejected
173 # with "relay access denied", or bounces with "mail loops
176 # Do not specify virtual alias domain names in the main.cf
177 # mydestination or relay_domains configuration parameters.
179 # With a virtual alias domain, the Postfix SMTP server
180 # accepts mail for known-user@virtual-alias.domain, and
181 # rejects mail for unknown-user@virtual-alias.domain as
184 # Instead of specifying the virtual alias domain name via
185 # the virtual_alias_maps table, you may also specify it via
186 # the main.cf virtual_alias_domains configuration parameter.
187 # This latter parameter uses the same syntax as the main.cf
188 # mydestination configuration parameter.
190 # REGULAR EXPRESSION TABLES
191 # This section describes how the table lookups change when
192 # the table is given in the form of regular expressions. For
193 # a description of regular expression lookup table syntax,
194 # see regexp_table(5) or pcre_table(5).
196 # Each pattern is a regular expression that is applied to
197 # the entire address being looked up. Thus, user@domain mail
198 # addresses are not broken up into their user and @domain
199 # constituent parts, nor is user+foo broken up into user and
202 # Patterns are applied in the order as specified in the ta-
203 # ble, until a pattern is found that matches the search
206 # Results are the same as with indexed file lookups, with
207 # the additional feature that parenthesized substrings from
208 # the pattern can be interpolated as $1, $2 and so on.
211 # This section describes how the table lookups change when
212 # lookups are directed to a TCP-based server. For a descrip-
213 # tion of the TCP client/server lookup protocol, see tcp_ta-
214 # ble(5). This feature is not available up to and including
215 # Postfix version 2.4.
217 # Each lookup operation uses the entire address once. Thus,
218 # user@domain mail addresses are not broken up into their
219 # user and @domain constituent parts, nor is user+foo broken
220 # up into user and foo.
222 # Results are the same as with indexed file lookups.
225 # The table format does not understand quoting conventions.
227 # CONFIGURATION PARAMETERS
228 # The following main.cf parameters are especially relevant
229 # to this topic. See the Postfix main.cf file for syntax
230 # details and for default values. Use the "postfix reload"
231 # command after a configuration change.
234 # List of virtual aliasing tables.
236 # virtual_alias_domains
237 # List of virtual alias domains. This uses the same
238 # syntax as the mydestination parameter.
240 # propagate_unmatched_extensions
241 # A list of address rewriting or forwarding mecha-
242 # nisms that propagate an address extension from the
243 # original address to the result. Specify zero or
244 # more of canonical, virtual, alias, forward,
245 # include, or generic.
247 # Other parameters of interest:
250 # The network interface addresses that this system
251 # receives mail on. You need to stop and start Post-
252 # fix when this parameter changes.
255 # List of domains that this mail system considers
259 # The domain that is appended to any address that
260 # does not have a domain.
262 # owner_request_special
263 # Give special treatment to owner-xxx and xxx-request
267 # Other interfaces that this machine receives mail on
268 # by way of a proxy agent or network address transla-
272 # cleanup(8), canonicalize and enqueue mail
273 # postmap(1), Postfix lookup table manager
274 # postconf(5), configuration parameters
275 # canonical(5), canonical address mapping
278 # Use "postconf readme_directory" or "postconf html_direc-
279 # tory" to locate this information.
280 # ADDRESS_REWRITING_README, address rewriting guide
281 # DATABASE_README, Postfix lookup table overview
282 # VIRTUAL_README, domain hosting guide
285 # The Secure Mailer license must be distributed with this
290 # IBM T.J. Watson Research
292 # Yorktown Heights, NY 10598, USA