Subversion Repositories configs

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
192 - 1
# VIRTUAL(5)                                                          VIRTUAL(5)
2
#
3
# NAME
4
#        virtual - Postfix virtual alias table format
5
#
6
# SYNOPSIS
7
#        postmap /etc/postfix/virtual
8
#
9
#        postmap -q "string" /etc/postfix/virtual
10
#
11
#        postmap -q - /etc/postfix/virtual <inputfile
12
#
13
# DESCRIPTION
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.
20
#
21
#        The main applications of virtual aliasing are:
22
#
23
#        o      To redirect mail for one address  to  one  or  more
24
#               addresses.
25
#
26
#        o      To   implement  virtual  alias  domains  where  all
27
#               addresses  are  aliased  to  addresses   in   other
28
#               domains.
29
#
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.
35
#
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.
40
#
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.
47
#
48
#        When  the  table  is provided via other means such as NIS,
49
#        LDAP or SQL, the same lookups are  done  as  for  ordinary
50
#        indexed files.
51
#
52
#        Alternatively,  the  table  can  be  provided  as  a regu-
53
#        lar-expression map where patterns  are  given  as  regular
54
#        expressions,  or  lookups  can  be  directed  to TCP-based
55
#        server. In those case, the lookups are done in a  slightly
56
#        different way as described below under "REGULAR EXPRESSION
57
#        TABLES" or "TCP-BASED TABLES".
58
#
59
# CASE FOLDING
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.
64
#
65
# TABLE FORMAT
66
#        The input format for the postmap(1) command is as follows:
67
#
68
#        pattern address, address, ...
69
#               When pattern matches a mail address, replace it  by
70
#               the corresponding address.
71
#
72
#        blank lines and comments
73
#               Empty  lines and whitespace-only lines are ignored,
74
#               as are lines whose first  non-whitespace  character
75
#               is a `#'.
76
#
77
#        multi-line text
78
#               A  logical  line starts with non-whitespace text. A
79
#               line that starts with whitespace continues a  logi-
80
#               cal line.
81
#
82
# TABLE SEARCH ORDER
83
#        With lookups from indexed files such as DB or DBM, or from
84
#        networked  tables  such  as  NIS,  LDAP   or   SQL,   each
85
#        user@domain query produces a sequence of query patterns as
86
#        described below.
87
#
88
#        Each query pattern is sent to each specified lookup  table
89
#        before  trying  the  next  query pattern, until a match is
90
#        found.
91
#
92
#        user@domain address, address, ...
93
#               Redirect mail for  user@domain  to  address.   This
94
#               form has the highest precedence.
95
#
96
#        user address, address, ...
97
#               Redirect mail for user@site to address when site is
98
#               equal to $myorigin, when site is listed in  $mydes-
99
#               tination,  or when it is listed in $inet_interfaces
100
#               or $proxy_interfaces.
101
#
102
#               This functionality overlaps with  functionality  of
103
#               the  local  aliases(5)  database. The difference is
104
#               that virtual(5) mapping can be applied to non-local
105
#               addresses.
106
#
107
#        @domain address, address, ...
108
#               Redirect mail for other users in domain to address.
109
#               This form has the lowest precedence.
110
#
111
#               Note: @domain is a wild-card. With this  form,  the
112
#               Postfix  SMTP server accepts mail for any recipient
113
#               in domain, regardless  of  whether  that  recipient
114
#               exists.   This  may  turn  your  mail system into a
115
#               backscatter source: Postfix first accepts mail  for
116
#               non-existent  recipients  and  then tries to return
117
#               that mail as "undeliverable" to  the  often  forged
118
#               sender address.
119
#
120
# RESULT ADDRESS REWRITING
121
#        The lookup result is subject to address rewriting:
122
#
123
#        o      When  the  result  has  the  form @otherdomain, the
124
#               result becomes the same user in otherdomain.   This
125
#               works only for the first address in a multi-address
126
#               lookup result.
127
#
128
#        o      When "append_at_myorigin=yes", append  "@$myorigin"
129
#               to addresses without "@domain".
130
#
131
#        o      When "append_dot_mydomain=yes", append ".$mydomain"
132
#               to addresses without ".domain".
133
#
134
# ADDRESS EXTENSION
135
#        When a mail address localpart contains the optional recip-
136
#        ient  delimiter  (e.g., user+foo@domain), the lookup order
137
#        becomes: user+foo@domain, user@domain, user+foo, user, and
138
#        @domain.
139
#
140
#        The   propagate_unmatched_extensions   parameter  controls
141
#        whether an unmatched address extension  (+foo)  is  propa-
142
#        gated to the result of table lookup.
143
#
144
# VIRTUAL ALIAS DOMAINS
145
#        Besides  virtual aliases, the virtual alias table can also
146
#        be used to implement virtual alias domains. With a virtual
147
#        alias  domain,  all  recipient  addresses  are  aliased to
148
#        addresses in other domains.
149
#
150
#        Virtual alias domains are not to be confused with the vir-
151
#        tual mailbox domains that are implemented with the Postfix
152
#        virtual(8)  mail  delivery  agent.  With  virtual  mailbox
153
#        domains,  each recipient address can have its own mailbox.
154
#
155
#        With a virtual alias domain, the virtual  domain  has  its
156
#        own  user  name  space. Local (i.e. non-virtual) usernames
157
#        are not visible in a virtual alias domain. In  particular,
158
#        local  aliases(5)  and local mailing lists are not visible
159
#        as localname@virtual-alias.domain.
160
#
161
#        Support for a virtual alias domain looks like:
162
#
163
#        /etc/postfix/main.cf:
164
#            virtual_alias_maps = hash:/etc/postfix/virtual
165
#
166
#        Note: some systems use dbm databases instead of hash.  See
167
#        the  output  from  "postconf  -m"  for  available database
168
#        types.
169
#
170
#        /etc/postfix/virtual:
171
#            virtual-alias.domain    anything (right-hand content does not matter)
172
#            postmaster@virtual-alias.domain postmaster
173
#            user1@virtual-alias.domain      address1
174
#            user2@virtual-alias.domain      address2, address3
175
#
176
#        The virtual-alias.domain anything entry is required for  a
177
#        virtual alias domain. Without this entry, mail is rejected
178
#        with "relay access denied", or bounces  with  "mail  loops
179
#        back to myself".
180
#
181
#        Do  not  specify virtual alias domain names in the main.cf
182
#        mydestination or relay_domains configuration parameters.
183
#
184
#        With a virtual  alias  domain,  the  Postfix  SMTP  server
185
#        accepts   mail  for  known-user@virtual-alias.domain,  and
186
#        rejects  mail  for  unknown-user@virtual-alias.domain   as
187
#        undeliverable.
188
#
189
#        Instead  of  specifying  the virtual alias domain name via
190
#        the virtual_alias_maps table, you may also specify it  via
191
#        the main.cf virtual_alias_domains configuration parameter.
192
#        This latter parameter uses the same syntax as the  main.cf
193
#        mydestination configuration parameter.
194
#
195
# REGULAR EXPRESSION TABLES
196
#        This  section  describes how the table lookups change when
197
#        the table is given in the form of regular expressions. For
198
#        a  description  of regular expression lookup table syntax,
199
#        see regexp_table(5) or pcre_table(5).
200
#
201
#        Each pattern is a regular expression that  is  applied  to
202
#        the entire address being looked up. Thus, user@domain mail
203
#        addresses are not broken up into their  user  and  @domain
204
#        constituent parts, nor is user+foo broken up into user and
205
#        foo.
206
#
207
#        Patterns are applied in the order as specified in the  ta-
208
#        ble,  until  a  pattern  is  found that matches the search
209
#        string.
210
#
211
#        Results are the same as with indexed  file  lookups,  with
212
#        the  additional feature that parenthesized substrings from
213
#        the pattern can be interpolated as $1, $2 and so on.
214
#
215
# TCP-BASED TABLES
216
#        This section describes how the table lookups  change  when
217
#        lookups are directed to a TCP-based server. For a descrip-
218
#        tion of the TCP client/server lookup protocol, see tcp_ta-
219
#        ble(5).  This feature is not available up to and including
220
#        Postfix version 2.4.
221
#
222
#        Each lookup operation uses the entire address once.  Thus,
223
#        user@domain  mail  addresses  are not broken up into their
224
#        user and @domain constituent parts, nor is user+foo broken
225
#        up into user and foo.
226
#
227
#        Results are the same as with indexed file lookups.
228
#
229
# BUGS
230
#        The  table format does not understand quoting conventions.
231
#
232
# CONFIGURATION PARAMETERS
233
#        The following main.cf parameters are  especially  relevant
234
#        to  this  topic.  See  the Postfix main.cf file for syntax
235
#        details and for default values. Use the  "postfix  reload"
236
#        command after a configuration change.
237
#
238
#        virtual_alias_maps
239
#               List of virtual aliasing tables.
240
#
241
#        virtual_alias_domains
242
#               List  of  virtual alias domains. This uses the same
243
#               syntax as the mydestination parameter.
244
#
245
#        propagate_unmatched_extensions
246
#               A list of address rewriting  or  forwarding  mecha-
247
#               nisms  that propagate an address extension from the
248
#               original address to the result.   Specify  zero  or
249
#               more   of   canonical,   virtual,  alias,  forward,
250
#               include, or generic.
251
#
252
#        Other parameters of interest:
253
#
254
#        inet_interfaces
255
#               The network interface addresses  that  this  system
256
#               receives mail on.  You need to stop and start Post-
257
#               fix when this parameter changes.
258
#
259
#        mydestination
260
#               List of domains that  this  mail  system  considers
261
#               local.
262
#
263
#        myorigin
264
#               The  domain  that  is  appended to any address that
265
#               does not have a domain.
266
#
267
#        owner_request_special
268
#               Give special treatment to owner-xxx and xxx-request
269
#               addresses.
270
#
271
#        proxy_interfaces
272
#               Other interfaces that this machine receives mail on
273
#               by way of a proxy agent or network address transla-
274
#               tor.
275
#
276
# SEE ALSO
277
#        cleanup(8), canonicalize and enqueue mail
278
#        postmap(1), Postfix lookup table manager
279
#        postconf(5), configuration parameters
280
#        canonical(5), canonical address mapping
281
#
282
# README FILES
283
#        Use  "postconf  readme_directory" or "postconf html_direc-
284
#        tory" to locate this information.
285
#        ADDRESS_REWRITING_README, address rewriting guide
286
#        DATABASE_README, Postfix lookup table overview
287
#        VIRTUAL_README, domain hosting guide
288
#
289
# LICENSE
290
#        The Secure Mailer license must be  distributed  with  this
291
#        software.
292
#
293
# AUTHOR(S)
294
#        Wietse Venema
295
#        IBM T.J. Watson Research
296
#        P.O. Box 704
297
#        Yorktown Heights, NY 10598, USA
298
#
299
#        Wietse Venema
300
#        Google, Inc.
301
#        111 8th Avenue
302
#        New York, NY 10011, USA
303
#
304
#                                                                     VIRTUAL(5)