summaryrefslogtreecommitdiffhomepage
path: root/postfix/virtual
diff options
context:
space:
mode:
authorHsieh Chin Fan <typebrook@gmail.com>2022-02-02 13:34:47 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-11-30 21:09:29 +0800
commit9934dd538b0ce116e3b1600272cb46369b082246 (patch)
tree2f28c6c362201151eaf8218e566479ed7eb72070 /postfix/virtual
init commit
Diffstat (limited to 'postfix/virtual')
-rw-r--r--postfix/virtual328
1 files changed, 328 insertions, 0 deletions
diff --git a/postfix/virtual b/postfix/virtual
new file mode 100644
index 0000000..ca8fb33
--- /dev/null
+++ b/postfix/virtual
@@ -0,0 +1,328 @@
1@topo.tw pham
2#no-reply@topo.tw devnull
3#dmarc@topo.tw devnull
4
5# VIRTUAL(5) VIRTUAL(5)
6#
7# NAME
8# virtual - Postfix virtual alias table format
9#
10# SYNOPSIS
11# postmap /etc/postfix/virtual
12#
13# postmap -q "string" /etc/postfix/virtual
14#
15# postmap -q - /etc/postfix/virtual <inputfile
16#
17# DESCRIPTION
18# The optional virtual(5) alias table rewrites recipient
19# addresses for all local, all virtual, and all remote mail
20# destinations. This is unlike the aliases(5) table which
21# is used only for local(8) delivery. Virtual aliasing is
22# recursive, and is implemented by the Postfix cleanup(8)
23# daemon before mail is queued.
24#
25# The main applications of virtual aliasing are:
26#
27# o To redirect mail for one address to one or more
28# addresses.
29#
30# o To implement virtual alias domains where all
31# addresses are aliased to addresses in other
32# domains.
33#
34# Virtual alias domains are not to be confused with
35# the virtual mailbox domains that are implemented
36# with the Postfix virtual(8) mail delivery agent.
37# With virtual mailbox domains, each recipient
38# address can have its own mailbox.
39#
40# Virtual aliasing is applied only to recipient envelope
41# addresses, and does not affect message headers. Use
42# canonical(5) mapping to rewrite header and envelope
43# addresses in general.
44#
45# Normally, the virtual(5) alias table is specified as a
46# text file that serves as input to the postmap(1) command.
47# The result, an indexed file in dbm or db format, is used
48# for fast searching by the mail system. Execute the command
49# "postmap /etc/postfix/virtual" to rebuild an indexed file
50# after changing the corresponding text file.
51#
52# When the table is provided via other means such as NIS,
53# LDAP or SQL, the same lookups are done as for ordinary
54# indexed files.
55#
56# Alternatively, the table can be provided as a regu-
57# lar-expression map where patterns are given as regular
58# expressions, or lookups can be directed to TCP-based
59# server. In those case, the lookups are done in a slightly
60# different way as described below under "REGULAR EXPRESSION
61# TABLES" or "TCP-BASED TABLES".
62#
63# CASE FOLDING
64# The search string is folded to lowercase before database
65# lookup. As of Postfix 2.3, the search string is not case
66# folded with database types such as regexp: or pcre: whose
67# lookup fields can match both upper and lower case.
68#
69# TABLE FORMAT
70# The input format for the postmap(1) command is as follows:
71#
72# pattern address, address, ...
73# When pattern matches a mail address, replace it by
74# the corresponding address.
75#
76# blank lines and comments
77# Empty lines and whitespace-only lines are ignored,
78# as are lines whose first non-whitespace character
79# is a `#'.
80#
81# multi-line text
82# A logical line starts with non-whitespace text. A
83# line that starts with whitespace continues a logi-
84# cal line.
85#
86# TABLE SEARCH ORDER
87# With lookups from indexed files such as DB or DBM, or from
88# networked tables such as NIS, LDAP or SQL, each
89# user@domain query produces a sequence of query patterns as
90# described below.
91#
92# Each query pattern is sent to each specified lookup table
93# before trying the next query pattern, until a match is
94# found.
95#
96# user@domain address, address, ...
97# Redirect mail for user@domain to address. This
98# form has the highest precedence.
99#
100# user address, address, ...
101# Redirect mail for user@site to address when site is
102# equal to $myorigin, when site is listed in $mydes-
103# tination, or when it is listed in $inet_interfaces
104# or $proxy_interfaces.
105#
106# This functionality overlaps with functionality of
107# the local aliases(5) database. The difference is
108# that virtual(5) mapping can be applied to non-local
109# addresses.
110#
111# @domain address, address, ...
112# Redirect mail for other users in domain to address.
113# This form has the lowest precedence.
114#
115# Note: @domain is a wild-card. With this form, the
116# Postfix SMTP server accepts mail for any recipient
117# in domain, regardless of whether that recipient
118# exists. This may turn your mail system into a
119# backscatter source: Postfix first accepts mail for
120# non-existent recipients and then tries to return
121# that mail as "undeliverable" to the often forged
122# sender address.
123#
124# To avoid backscatter with mail for a wild-card
125# domain, replace the wild-card mapping with explicit
126# 1:1 mappings, or add a reject_unverified_recipient
127# restriction for that domain:
128#
129# smtpd_recipient_restrictions =
130# ...
131# reject_unauth_destination
132# check_recipient_access
133# inline:{example.com=reject_unverified_recipient}
134# unverified_recipient_reject_code = 550
135#
136# In the above example, Postfix may contact a remote
137# server if the recipient is aliased to a remote
138# address.
139#
140# RESULT ADDRESS REWRITING
141# The lookup result is subject to address rewriting:
142#
143# o When the result has the form @otherdomain, the
144# result becomes the same user in otherdomain. This
145# works only for the first address in a multi-address
146# lookup result.
147#
148# o When "append_at_myorigin=yes", append "@$myorigin"
149# to addresses without "@domain".
150#
151# o When "append_dot_mydomain=yes", append ".$mydomain"
152# to addresses without ".domain".
153#
154# ADDRESS EXTENSION
155# When a mail address localpart contains the optional recip-
156# ient delimiter (e.g., user+foo@domain), the lookup order
157# becomes: user+foo@domain, user@domain, user+foo, user, and
158# @domain.
159#
160# The propagate_unmatched_extensions parameter controls
161# whether an unmatched address extension (+foo) is propa-
162# gated to the result of table lookup.
163#
164# VIRTUAL ALIAS DOMAINS
165# Besides virtual aliases, the virtual alias table can also
166# be used to implement virtual alias domains. With a virtual
167# alias domain, all recipient addresses are aliased to
168# addresses in other domains.
169#
170# Virtual alias domains are not to be confused with the vir-
171# tual mailbox domains that are implemented with the Postfix
172# virtual(8) mail delivery agent. With virtual mailbox
173# domains, each recipient address can have its own mailbox.
174#
175# With a virtual alias domain, the virtual domain has its
176# own user name space. Local (i.e. non-virtual) usernames
177# are not visible in a virtual alias domain. In particular,
178# local aliases(5) and local mailing lists are not visible
179# as localname@virtual-alias.domain.
180#
181# Support for a virtual alias domain looks like:
182#
183# /etc/postfix/main.cf:
184# virtual_alias_maps = hash:/etc/postfix/virtual
185#
186# Note: some systems use dbm databases instead of hash. See
187# the output from "postconf -m" for available database
188# types.
189#
190# /etc/postfix/virtual:
191# virtual-alias.domain anything (right-hand content does not matter)
192# postmaster@virtual-alias.domain postmaster
193# user1@virtual-alias.domain address1
194# user2@virtual-alias.domain address2, address3
195#
196# The virtual-alias.domain anything entry is required for a
197# virtual alias domain. Without this entry, mail is rejected
198# with "relay access denied", or bounces with "mail loops
199# back to myself".
200#
201# Do not specify virtual alias domain names in the main.cf
202# mydestination or relay_domains configuration parameters.
203#
204# With a virtual alias domain, the Postfix SMTP server
205# accepts mail for known-user@virtual-alias.domain, and
206# rejects mail for unknown-user@virtual-alias.domain as
207# undeliverable.
208#
209# Instead of specifying the virtual alias domain name via
210# the virtual_alias_maps table, you may also specify it via
211# the main.cf virtual_alias_domains configuration parameter.
212# This latter parameter uses the same syntax as the main.cf
213# mydestination configuration parameter.
214#
215# REGULAR EXPRESSION TABLES
216# This section describes how the table lookups change when
217# the table is given in the form of regular expressions. For
218# a description of regular expression lookup table syntax,
219# see regexp_table(5) or pcre_table(5).
220#
221# Each pattern is a regular expression that is applied to
222# the entire address being looked up. Thus, user@domain mail
223# addresses are not broken up into their user and @domain
224# constituent parts, nor is user+foo broken up into user and
225# foo.
226#
227# Patterns are applied in the order as specified in the ta-
228# ble, until a pattern is found that matches the search
229# string.
230#
231# Results are the same as with indexed file lookups, with
232# the additional feature that parenthesized substrings from
233# the pattern can be interpolated as $1, $2 and so on.
234#
235# TCP-BASED TABLES
236# This section describes how the table lookups change when
237# lookups are directed to a TCP-based server. For a descrip-
238# tion of the TCP client/server lookup protocol, see tcp_ta-
239# ble(5). This feature is not available up to and including
240# Postfix version 2.4.
241#
242# Each lookup operation uses the entire address once. Thus,
243# user@domain mail addresses are not broken up into their
244# user and @domain constituent parts, nor is user+foo broken
245# up into user and foo.
246#
247# Results are the same as with indexed file lookups.
248#
249# BUGS
250# The table format does not understand quoting conventions.
251#
252# CONFIGURATION PARAMETERS
253# The following main.cf parameters are especially relevant
254# to this topic. See the Postfix main.cf file for syntax
255# details and for default values. Use the "postfix reload"
256# command after a configuration change.
257#
258# virtual_alias_maps ($virtual_maps)
259# Optional lookup tables that alias specific mail
260# addresses or domains to other local or remote
261# address.
262#
263# virtual_alias_domains ($virtual_alias_maps)
264# Postfix is final destination for the specified list
265# of virtual alias domains, that is, domains for
266# which all addresses are aliased to addresses in
267# other local or remote domains.
268#
269# propagate_unmatched_extensions (canonical, virtual)
270# What address lookup tables copy an address exten-
271# sion from the lookup key to the lookup result.
272#
273# Other parameters of interest:
274#
275# inet_interfaces (all)
276# The network interface addresses that this mail sys-
277# tem receives mail on.
278#
279# mydestination ($myhostname, localhost.$mydomain, local-
280# host)
281# The list of domains that are delivered via the
282# $local_transport mail delivery transport.
283#
284# myorigin ($myhostname)
285# The domain name that locally-posted mail appears to
286# come from, and that locally posted mail is deliv-
287# ered to.
288#
289# owner_request_special (yes)
290# Enable special treatment for owner-listname entries
291# in the aliases(5) file, and don't split owner-list-
292# name and listname-request address localparts when
293# the recipient_delimiter is set to "-".
294#
295# proxy_interfaces (empty)
296# The network interface addresses that this mail sys-
297# tem receives mail on by way of a proxy or network
298# address translation unit.
299#
300# SEE ALSO
301# cleanup(8), canonicalize and enqueue mail
302# postmap(1), Postfix lookup table manager
303# postconf(5), configuration parameters
304# canonical(5), canonical address mapping
305#
306# README FILES
307# Use "postconf readme_directory" or "postconf html_direc-
308# tory" to locate this information.
309# ADDRESS_REWRITING_README, address rewriting guide
310# DATABASE_README, Postfix lookup table overview
311# VIRTUAL_README, domain hosting guide
312#
313# LICENSE
314# The Secure Mailer license must be distributed with this
315# software.
316#
317# AUTHOR(S)
318# Wietse Venema
319# IBM T.J. Watson Research
320# P.O. Box 704
321# Yorktown Heights, NY 10598, USA
322#
323# Wietse Venema
324# Google, Inc.
325# 111 8th Avenue
326# New York, NY 10011, USA
327#
328# VIRTUAL(5)