NetBSD/gnu/dist/postfix/proto/virtual

210 lines
7.9 KiB
Plaintext

#++
# NAME
# virtual 5
# SUMMARY
# format of Postfix virtual table
# SYNOPSIS
# \fBpostmap /etc/postfix/virtual\fR
# DESCRIPTION
# The optional \fBvirtual\fR table specifies address redirections for
# local and non-local recipients or domains. The redirections are used
# by the \fBcleanup\fR(8) daemon. The redirections are recursive.
#
# The \fBvirtual\fR redirection is applied only to recipient
# envelope addresses, and does not affect message headers.
# Think Sendmail rule set \fBS0\fR, if you like. Use \fBcanonical\fR(5)
# mapping to rewrite header and envelope addresses in general.
#
# Normally, the \fBvirtual\fR table is specified as a text file that
# serves as input to the \fBpostmap\fR(1) command.
# The result, an indexed file in \fBdbm\fR or \fBdb\fR format,
# is used for fast searching by the mail system. Execute the command
# \fBpostmap /etc/postfix/virtual\fR in order to rebuild the indexed
# file after changing the text file.
#
# When the table is provided via other means such as NIS, LDAP
# or SQL, the same lookups are done as for ordinary indexed files.
#
# Alternatively, the table can be provided as a regular-expression
# map where patterns are given as regular expressions. In that case,
# the lookups are done in a slightly different way as described below.
# POSTFIX-STYLE VIRTUAL DOMAINS
# .ad
# .fi
# With a Postfix-style virtual domain, the virtual domain has its
# own user name space. Local (i.e. non-virtual) usernames are not
# visible in a Postfix-style virtual domain. In particular, local
# \fBaliases\fR(5) and mailing lists are not visible as
# \fIlocalname@virtual.domain\fR.
#
# Use a Sendmail-style virtual domain (see below) if local usernames,
# \fBaliases\fR(5) or mailing lists should be visible as
# \fIlocalname@virtual.domain\fR.
#
# Support for a Postfix-style virtual domain looks like:
# .sp
# /etc/postfix/virtual:
# .in +4
# .nf
# \fIvirtual.domain anything\fR (right-hand content does not matter)
# \fIpostmaster@virtual.domain postmaster\fR
# \fIuser1@virtual.domain address1\fR
# \fIuser2@virtual.domain address2, address3\fR
# .fi
# .in -4
#
# The \fIvirtual.domain anything\fR entry is required for a
# Postfix-style virtual domain.
#
# Do not list a Postfix-style virtual domain in the \fBmain.cf
# mydestination\fR configuration parameter.
# Such an entry is required only for a Sendmail-style virtual domain.
#
# With a Postfix-style virtual domain, the Postfix SMTP server
# accepts mail for \fIknown-user@virtual.domain\fR and rejects
# mail for \fIunknown-user\fR@\fIvirtual.domain\fR as undeliverable.
# SENDMAIL-STYLE VIRTUAL DOMAINS
# .ad
# .fi
# With a Sendmail-style virtual domain, every local (i.e. non-virtual)
# username is visible in the virtual domain. In particular, every local
# alias and mailing list is visible as \fIlocalname@virtual.domain\fR.
#
# Use a Postfix-style virtual domain (see above) if local usernames,
# \fBaliases\fR(5) or mailing lists should not be visible as
# \fIlocalname@virtual.domain\fR.
#
# Support for a Sendmail-style virtual domain looks like:
# .sp
# /etc/postfix/main.cf:
# .in +4
# .nf
# mydestination = $myhostname localhost.$mydomain $mydomain
# .ti +4
# \fIvirtual.domain\fR
# .fi
# .in -4
# .sp
# /etc/postfix/virtual:
# .in +4
# .nf
# \fIuser1@virtual.domain address1\fR
# \fIuser2@virtual.domain address2, address3\fR
# .fi
# .in -4
#
# The \fBmain.cf mydestination\fR entry is required for a Sendmail-style
# virtual domain.
#
# Do not specify a \fIvirtual.domain anything\fR virtual map entry
# for a Sendmail-style virtual domain.
# Such an entry is required only with a Postfix-style virtual domain.
#
# With a Sendmail-style virtual domain, the Postfix local delivery
# agent delivers mail for an unknown \fIuser\fR@\fIvirtual.domain\fR
# to a local (i.e. non-virtual) user that has the same name; if no
# such recipient exists, the Postfix local delivery agent bounces the
# mail to the sender.
# TABLE FORMAT
# .ad
# .fi
# The format of the virtual table is as follows, mappings being
# tried in the order as listed in this manual page:
# .IP "\fIpattern result\fR"
# When \fIpattern\fR matches a mail address, replace it by the
# corresponding \fIresult\fR.
# .IP "blank lines and comments"
# Empty lines and whitespace-only lines are ignored, as
# are lines whose first non-whitespace character is a `#'.
# .IP "multi-line text"
# A logical line starts with non-whitespace text. A line that
# starts with whitespace continues a logical line.
# .PP
# With lookups from indexed files such as DB or DBM, or from networked
# tables such as NIS, LDAP or SQL, patterns are tried in the order as
# listed below:
# .IP "\fIuser\fR@\fIdomain address, address, ...\fR"
# Mail for \fIuser\fR@\fIdomain\fR is redirected to \fIaddress\fR.
# This form has the highest precedence.
# .IP "\fIuser address, address, ...\fR"
# Mail for \fIuser\fR@\fIsite\fR is redirected to \fIaddress\fR when
# \fIsite\fR is equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
# $\fRmydestination\fR, or when it is listed in $\fIinet_interfaces\fR.
# .sp
# This functionality overlaps with functionality of the local
# \fIalias\fR(5) database. The difference is that \fBvirtual\fR
# mapping can be applied to non-local addresses.
# .IP "@\fIdomain address, address, ...\fR"
# Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR.
# This form has the lowest precedence.
# .PP
# In all the above forms, when \fIaddress\fR has the form
# @\fIotherdomain\fR, the result is the same user in \fIotherdomain\fR.
# This works for the first address in the expansion only.
# ADDRESS EXTENSION
# .fi
# .ad
# When a mail address localpart contains the optional recipient delimiter
# (e.g., \fIuser+foo\fR@\fIdomain\fR), the lookup order becomes:
# \fIuser+foo\fR@\fIdomain\fR, \fIuser\fR@\fIdomain\fR, \fIuser+foo\fR,
# \fIuser\fR, and @\fIdomain\fR. An unmatched address extension
# (\fI+foo\fR) is propagated to the result of table lookup.
# REGULAR EXPRESSION TABLES
# .ad
# .fi
# This section describes how the table lookups change when the table
# is given in the form of regular expressions. For a description of
# regular expression lookup table syntax, see \fBregexp_table\fR(5)
# or \fBpcre_table\fR(5).
#
# Each pattern is a regular expression that is applied to the entire
# address being looked up. Thus, \fIuser@domain\fR mail addresses are not
# broken up into their \fIuser\fR and \fI@domain\fR constituent parts,
# nor is \fIuser+foo\fR broken up into \fIuser\fR and \fIfoo\fR.
#
# Patterns are applied in the order as specified in the table, until a
# pattern is found that matches the search string.
#
# Results are the same as with indexed file lookups, with
# the additional feature that parenthesized substrings from the
# pattern can be interpolated as \fB$1\fR, \fB$2\fR and so on.
# BUGS
# The table format does not understand quoting conventions.
# CONFIGURATION PARAMETERS
# .ad
# .fi
# The following \fBmain.cf\fR parameters are especially relevant to
# this topic. See the Postfix \fBmain.cf\fR file for syntax details
# and for default values. Use the \fBpostfix reload\fR command after
# a configuration change.
# .IP \fBvirtual_maps\fR
# List of virtual mapping tables.
# .PP
# Other parameters of interest:
# .IP \fBinet_interfaces\fR
# The network interface addresses that this system receives mail on.
# .IP \fBmydestination\fR
# List of domains that this mail system considers local.
# .IP \fBmyorigin\fR
# The domain that is appended to locally-posted mail.
# .IP \fBowner_request_special\fR
# Give special treatment to \fBowner-\fIxxx\fR and \fIxxx\fB-request\fR
# addresses.
# SEE ALSO
# cleanup(8) canonicalize and enqueue mail
# postmap(1) create mapping table
# pcre_table(5) format of PCRE tables
# regexp_table(5) format of POSIX regular expression tables
# LICENSE
# .ad
# .fi
# The Secure Mailer license must be distributed with this software.
# AUTHOR(S)
# Wietse Venema
# IBM T.J. Watson Research
# P.O. Box 704
# Yorktown Heights, NY 10598, USA
#--
# By default, this file is not used. See sample-virtual.cf