mirror of
https://github.com/vdukhovni/postfix
synced 2025-09-01 06:35:27 +00:00
postfix-2.2-20050207
This commit is contained in:
committed by
Viktor Dukhovni
parent
9897d4a628
commit
3414d539d2
@@ -10286,19 +10286,28 @@ Apologies for any names omitted.
|
|||||||
Cleanup: don't panic in mymalloc() when master can't find
|
Cleanup: don't panic in mymalloc() when master can't find
|
||||||
any IP addresses. LaMont Jones. File: master/master_ent.c.
|
any IP addresses. LaMont Jones. File: master/master_ent.c.
|
||||||
|
|
||||||
|
20050207
|
||||||
|
|
||||||
|
Documentation: added a generics(5) manual page for consistency
|
||||||
|
with the already existing table driven mechanisms, added
|
||||||
|
references to or examples of the new generic mapping.
|
||||||
|
|
||||||
|
Bugfix: the header_checks REPLACE action mis-handled
|
||||||
|
multi-line replacement text in message headers, for example:
|
||||||
|
/(.*)/ REPLACE X-$1. File: cleanup/cleanup_message.c.
|
||||||
|
|
||||||
|
Bugfix: the header_checks REPLACE action should not drop
|
||||||
|
the input when the action is NOT executed. File:
|
||||||
|
cleanup/cleanup_message.c.
|
||||||
|
|
||||||
Open problems:
|
Open problems:
|
||||||
|
|
||||||
Med: document generics mapping in BASIC_CONFIGURATION_README.
|
Med: local and remote source port and IP address for smtpd
|
||||||
|
policy hook.
|
||||||
Med: local and remote source port and IP address for
|
|
||||||
smtpd policy hook.
|
|
||||||
|
|
||||||
Med: smtp_connect_timeout_budget (default: 2x smtp_connect_timeout)
|
Med: smtp_connect_timeout_budget (default: 2x smtp_connect_timeout)
|
||||||
to limit the total time spent trying to connect.
|
to limit the total time spent trying to connect.
|
||||||
|
|
||||||
Low: pointers to postfinger and saslfinger. postfinger
|
|
||||||
is now bundled.
|
|
||||||
|
|
||||||
Med: transform IPv4-in-IPv6 address literals to IPv4 form
|
Med: transform IPv4-in-IPv6 address literals to IPv4 form
|
||||||
when comparing against local IP addresses?
|
when comparing against local IP addresses?
|
||||||
|
|
||||||
|
@@ -607,11 +607,11 @@ localdomain.local. This can be a problem when you want to send mail over the
|
|||||||
Internet, because many mail servers reject mail addresses with invalid domain
|
Internet, because many mail servers reject mail addresses with invalid domain
|
||||||
names.
|
names.
|
||||||
|
|
||||||
With the smtp_generics_maps parameter you can specify lookup tables that
|
With the smtp_generics_maps parameter you can specify generics(5) lookup tables
|
||||||
replace local mail addresses by valid Internet addresses when mail leaves the
|
that replace local mail addresses by valid Internet addresses when mail leaves
|
||||||
machine via SMTP. This mapping replaces envelope and header addresses, and is
|
the machine via SMTP. The generics(5) mapping replaces envelope and header
|
||||||
non-recursive. It does not happen when you send mail between addresses on the
|
addresses, and is non-recursive. It does not happen when you send mail between
|
||||||
local machine.
|
addresses on the local machine.
|
||||||
|
|
||||||
This feature is available in Postfix version 2.2 and later.
|
This feature is available in Postfix version 2.2 and later.
|
||||||
|
|
||||||
@@ -621,15 +621,15 @@ Example:
|
|||||||
smtp_generics_maps = hash:/etc/postfix/generics
|
smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
|
||||||
/etc/postfix/generics:
|
/etc/postfix/generics:
|
||||||
you@localdomain.local youraccount@yourisp.example
|
his@localdomain.local hisaccount@hisisp.example
|
||||||
her@localdomain.local heraccount@herisp.example
|
her@localdomain.local heraccount@herisp.example
|
||||||
@localdomain.local youraccount+local@yourisp.example
|
@localdomain.local hisaccount+local@hisisp.example
|
||||||
|
|
||||||
When mail is sent to a remote host via SMTP, this replaces your local mail
|
When mail is sent to a remote host via SMTP, this replaces
|
||||||
address you@localdomain.local by your ISP mail address, replaces
|
his@localdomain.local by his ISP mail address, replaces her@localdomain.local
|
||||||
her@localdomain.local by her ISP mail address, and replaces all other local
|
by her ISP mail address, and replaces other local addresses by his ISP account,
|
||||||
addresses by your ISP account, with an address extension of +local (this
|
with an address extension of +local (this example assumes that the ISP supports
|
||||||
example assumes that the ISP supports "+" style address extensions).
|
"+" style address extensions).
|
||||||
|
|
||||||
LLooccaall aalliiaass ddaattaabbaassee
|
LLooccaall aalliiaass ddaattaabbaassee
|
||||||
|
|
||||||
|
@@ -25,7 +25,7 @@ in specific environments.
|
|||||||
* Running Postfix behind a firewall
|
* Running Postfix behind a firewall
|
||||||
* Configuring Postfix as MX host for a remote site
|
* Configuring Postfix as MX host for a remote site
|
||||||
* Postfix on a dialup machine
|
* Postfix on a dialup machine
|
||||||
* Postfix on hosts without a real hostname
|
* Postfix on hosts without a real Internet hostname
|
||||||
|
|
||||||
PPoossttffiixx oonn aa ssttaanndd--aalloonnee IInntteerrnneett hhoosstt
|
PPoossttffiixx oonn aa ssttaanndd--aalloonnee IInntteerrnneett hhoosstt
|
||||||
|
|
||||||
@@ -49,8 +49,8 @@ document:
|
|||||||
mynetworks_style = host
|
mynetworks_style = host
|
||||||
relay_domains =
|
relay_domains =
|
||||||
|
|
||||||
See also the section "Postfix on hosts without a real hostname" if this is
|
See also the section "Postfix on hosts without a real Internet hostname" if
|
||||||
applicable to your configuration.
|
this is applicable to your configuration.
|
||||||
|
|
||||||
PPoossttffiixx oonn aa nnuullll cclliieenntt
|
PPoossttffiixx oonn aa nnuullll cclliieenntt
|
||||||
|
|
||||||
@@ -443,8 +443,9 @@ dialup connections that are up 24x7, see the local area network section above.
|
|||||||
This section presents additional configuration. You need to combine this with
|
This section presents additional configuration. You need to combine this with
|
||||||
basic configuration information as discussed the first half of this document.
|
basic configuration information as discussed the first half of this document.
|
||||||
|
|
||||||
If you do not have your own hostname (as with dynamic IP addressing) then you
|
If you do not have your own hostname and IP address (usually with dialup, cable
|
||||||
should also study the section on "Postfix on hosts without a real hostname".
|
TV or DSL connections) then you should also study the section on "Postfix on
|
||||||
|
hosts without a real Internet hostname".
|
||||||
|
|
||||||
* Route all outgoing mail to your network provider.
|
* Route all outgoing mail to your network provider.
|
||||||
If your machine is disconnected most of the time, there isn't a lot of
|
If your machine is disconnected most of the time, there isn't a lot of
|
||||||
@@ -501,21 +502,56 @@ should also study the section on "Postfix on hosts without a real hostname".
|
|||||||
the "sseennddmmaaiill --qq" command every now and then while the dialup link is up,
|
the "sseennddmmaaiill --qq" command every now and then while the dialup link is up,
|
||||||
so that newly-posted mail is flushed from the queue.
|
so that newly-posted mail is flushed from the queue.
|
||||||
|
|
||||||
PPoossttffiixx oonn hhoossttss wwiitthhoouutt aa rreeaall hhoossttnnaammee
|
PPoossttffiixx oonn hhoossttss wwiitthhoouutt aa rreeaall IInntteerrnneett hhoossttnnaammee
|
||||||
|
|
||||||
This section is for hosts that don't have an Internet hostname. Typically these
|
This section is for hosts that don't have their own Internet hostname.
|
||||||
are systems that get a dynamic IP address via DHCP or via dialup. Postfix will
|
Typically these are systems that get a dynamic IP address via DHCP or via
|
||||||
let you send and receive mail just fine between accounts on a machine with a
|
dialup. Postfix will let you send and receive mail just fine between accounts
|
||||||
fantasy name. However, you cannot use a fantasy hostname in your email address
|
on a machine with a fantasy name. However, you cannot use a fantasy hostname in
|
||||||
when sending mail into the Internet, because no-one would be able to reply to
|
your email address when sending mail into the Internet, because no-one would be
|
||||||
your mail. In fact, more and more sites refuse mail from non-existent domain
|
able to reply to your mail. In fact, more and more sites refuse mail addresses
|
||||||
names.
|
with non-existent domain names.
|
||||||
|
|
||||||
The perfect solution would be for Postfix to do a mapping from local fantasy
|
Note: the following information is Postfix version dependent. To find out what
|
||||||
email addresses to valid Internet addresses when mail leaves the machine
|
Postfix version you have, execute the command "ppoossttccoonnff mmaaiill__vveerrssiioonn".
|
||||||
(similar to Sendmail's generics table). This is planned for the near future.
|
|
||||||
|
|
||||||
In the mean time, the solution with Postfix is to use valid Internet addresses
|
PPoossttffiixx vveerrssiioonn 22..22 aanndd llaatteerr
|
||||||
|
|
||||||
|
Postfix 2.2 uses the generics(5) address mapping to replace local fantasy email
|
||||||
|
addresses by valid Internet addresses. This mapping happens ONLY when mail
|
||||||
|
leaves the machine; not when you send mail between users on the same machine.
|
||||||
|
|
||||||
|
The following example presents additional configuration. You need to combine
|
||||||
|
this with basic configuration information as discussed the first half of this
|
||||||
|
document.
|
||||||
|
|
||||||
|
1 /etc/postfix/main.cf:
|
||||||
|
2 smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
3
|
||||||
|
4 /etc/postfix/generics:
|
||||||
|
5 his@localdomain.local hisaccount@hisisp.example
|
||||||
|
6 her@localdomain.local heraccount@herisp.example
|
||||||
|
7 @localdomain.local hisaccount+local@hisisp.example
|
||||||
|
|
||||||
|
When mail is sent to a remote host via SMTP:
|
||||||
|
|
||||||
|
* Line 5 replaces his@localdomain.local by his ISP mail address,
|
||||||
|
|
||||||
|
* Line 6 replaces her@localdomain.local by her ISP mail address, and
|
||||||
|
|
||||||
|
* Line 7 replaces other local addresses by his ISP account, with an address
|
||||||
|
extension of +local (this example assumes that the ISP supports "+" style
|
||||||
|
address extensions).
|
||||||
|
|
||||||
|
Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
|
||||||
|
To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
|
||||||
|
|
||||||
|
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ggeenneerriiccss" whenever you change the
|
||||||
|
generics table.
|
||||||
|
|
||||||
|
PPoossttffiixx vveerrssiioonn 22..11 aanndd eeaarrlliieerr
|
||||||
|
|
||||||
|
The solution with older Postfix systems is to use valid Internet addresses
|
||||||
where possible, and to let Postfix map valid Internet addresses to local
|
where possible, and to let Postfix map valid Internet addresses to local
|
||||||
fantasy addresses. With this, you can send mail to the Internet and to local
|
fantasy addresses. With this, you can send mail to the Internet and to local
|
||||||
fantasy addresses, including mail to local fantasy addresses that don't have a
|
fantasy addresses, including mail to local fantasy addresses that don't have a
|
||||||
@@ -553,3 +589,12 @@ Translation:
|
|||||||
instead of sending it to the ISP. This part is not required but is
|
instead of sending it to the ISP. This part is not required but is
|
||||||
convenient.
|
convenient.
|
||||||
|
|
||||||
|
Specify ddbbmm instead of hhaasshh if your system uses ddbbmm files instead of ddbb files.
|
||||||
|
To find out what lookup tables Postfix supports, use the command "ppoossttccoonnff --mm".
|
||||||
|
|
||||||
|
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//ccaannoonniiccaall" whenever you change the
|
||||||
|
canonical table.
|
||||||
|
|
||||||
|
Execute the command "ppoossttmmaapp //eettcc//ppoossttffiixx//vviirrttuuaall" whenever you change the
|
||||||
|
virtual table.
|
||||||
|
|
||||||
|
@@ -180,8 +180,8 @@ decode: root
|
|||||||
# A list of address rewriting or forwarding mecha-
|
# A list of address rewriting or forwarding mecha-
|
||||||
# nisms that propagate an address extension from the
|
# nisms that propagate an address extension from the
|
||||||
# original address to the result. Specify zero or
|
# original address to the result. Specify zero or
|
||||||
# more of canonical, virtual, alias, forward, or
|
# more of canonical, virtual, alias, forward,
|
||||||
# include.
|
# include, or generics.
|
||||||
#
|
#
|
||||||
# owner_request_special
|
# owner_request_special
|
||||||
# Give special treatment to owner-listname and list-
|
# Give special treatment to owner-listname and list-
|
||||||
|
@@ -13,8 +13,8 @@
|
|||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
# The optional canonical(5) table specifies an address map-
|
# The optional canonical(5) table specifies an address map-
|
||||||
# ping for local and non-local addresses. The mapping is
|
# ping for local and non-local addresses. The mapping is
|
||||||
# used by the cleanup(8) daemon. The address mapping is
|
# used by the cleanup(8) daemon, before mail is stored into
|
||||||
# recursive.
|
# the queue. The address mapping is recursive.
|
||||||
#
|
#
|
||||||
# Normally, the canonical(5) table is specified as a text
|
# Normally, the canonical(5) table is specified as a text
|
||||||
# file that serves as input to the postmap(1) command. The
|
# file that serves as input to the postmap(1) command. The
|
||||||
@@ -53,8 +53,7 @@
|
|||||||
# aliasing. Use the aliases(5) map for that purpose.
|
# aliasing. Use the aliases(5) map for that purpose.
|
||||||
#
|
#
|
||||||
# TABLE FORMAT
|
# TABLE FORMAT
|
||||||
# make# The input format for the postmap(1) command is as
|
# The input format for the postmap(1) command is as follows:
|
||||||
# follows:
|
|
||||||
#
|
#
|
||||||
# pattern result
|
# pattern result
|
||||||
# When pattern matches a mail address, replace it by
|
# When pattern matches a mail address, replace it by
|
||||||
@@ -70,13 +69,14 @@
|
|||||||
# line that starts with whitespace continues a logi-
|
# line that starts with whitespace continues a logi-
|
||||||
# cal line.
|
# cal line.
|
||||||
#
|
#
|
||||||
|
# TABLE SEARCH ORDER
|
||||||
# With lookups from indexed files such as DB or DBM, or from
|
# With lookups from indexed files such as DB or DBM, or from
|
||||||
# networked tables such as NIS, LDAP or SQL, patterns are
|
# networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
# tried in the order as listed below:
|
# tried in the order as listed below:
|
||||||
#
|
#
|
||||||
# user@domain address
|
# user@domain address
|
||||||
# user@domain is replaced by address. This form has
|
# Replace user@domain by address. This form has the
|
||||||
# the highest precedence.
|
# highest precedence.
|
||||||
#
|
#
|
||||||
# This is useful to clean up addresses produced by
|
# This is useful to clean up addresses produced by
|
||||||
# legacy mail systems. It can also be used to pro-
|
# legacy mail systems. It can also be used to pro-
|
||||||
@@ -84,17 +84,17 @@
|
|||||||
# below for a simpler solution.
|
# below for a simpler solution.
|
||||||
#
|
#
|
||||||
# user address
|
# user address
|
||||||
# user@site is replaced by address when site is equal
|
# Replace user@site by address when site is equal to
|
||||||
# to $myorigin, when site is listed in $mydestina-
|
# $myorigin, when site is listed in $mydestination,
|
||||||
# tion, or when it is listed in $inet_interfaces or
|
# or when it is listed in $inet_interfaces or
|
||||||
# $proxy_interfaces.
|
# $proxy_interfaces.
|
||||||
#
|
#
|
||||||
# This form is useful for replacing login names by
|
# This form is useful for replacing login names by
|
||||||
# Firstname.Lastname.
|
# Firstname.Lastname.
|
||||||
#
|
#
|
||||||
# @domain address
|
# @domain address
|
||||||
# Every address in domain is replaced by address.
|
# Replace other addresses in domain by address. This
|
||||||
# This form has the lowest precedence.
|
# form has the lowest precedence.
|
||||||
#
|
#
|
||||||
# In all the above forms, when address has the form @other-
|
# In all the above forms, when address has the form @other-
|
||||||
# domain, the result is the same user in otherdomain.
|
# domain, the result is the same user in otherdomain.
|
||||||
@@ -170,8 +170,8 @@
|
|||||||
# A list of address rewriting or forwarding mecha-
|
# A list of address rewriting or forwarding mecha-
|
||||||
# nisms that propagate an address extension from the
|
# nisms that propagate an address extension from the
|
||||||
# original address to the result. Specify zero or
|
# original address to the result. Specify zero or
|
||||||
# more of canonical, virtual, alias, forward, or
|
# more of canonical, virtual, alias, forward,
|
||||||
# include.
|
# include, or generics.
|
||||||
#
|
#
|
||||||
# Other parameters of interest:
|
# Other parameters of interest:
|
||||||
#
|
#
|
||||||
|
224
postfix/conf/generics
Normal file
224
postfix/conf/generics
Normal file
@@ -0,0 +1,224 @@
|
|||||||
|
# GENERICS(5) GENERICS(5)
|
||||||
|
#
|
||||||
|
# NAME
|
||||||
|
# generics - Postfix generics table format
|
||||||
|
#
|
||||||
|
# SYNOPSIS
|
||||||
|
# postmap /etc/postfix/generics
|
||||||
|
#
|
||||||
|
# postmap -q "string" /etc/postfix/generics
|
||||||
|
#
|
||||||
|
# postmap -q - /etc/postfix/generics <inputfile
|
||||||
|
#
|
||||||
|
# DESCRIPTION
|
||||||
|
# The optional generics(5) table specifies an address map-
|
||||||
|
# ping that applies when mail is delivered. This is the
|
||||||
|
# opposite of canonical(5) mapping, which applies when mail
|
||||||
|
# is received.
|
||||||
|
#
|
||||||
|
# Typically, one would use the generics(5) table on a system
|
||||||
|
# that does not have a valid Internet domain name and that
|
||||||
|
# uses something like localdomain.local instead. The gener-
|
||||||
|
# ics(5) table is then used by the smtp(8) client to trans-
|
||||||
|
# form local mail addresses into valid Internet mail
|
||||||
|
# addresses when mail has to be sent across the Internet.
|
||||||
|
# See the EXAMPLE section at the end of this document.
|
||||||
|
#
|
||||||
|
# The generics(5) mapping affects both message header
|
||||||
|
# addresses (i.e. addresses that appear inside messages) and
|
||||||
|
# message envelope addresses (for example, the addresses
|
||||||
|
# that are used in SMTP protocol commands).
|
||||||
|
#
|
||||||
|
# Normally, the generics(5) table is specified as a text
|
||||||
|
# file that serves as input to the postmap(1) command. The
|
||||||
|
# result, an indexed file in dbm or db format, is used for
|
||||||
|
# fast searching by the mail system. Execute the command
|
||||||
|
# "postmap /etc/postfix/generics" 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 expres-
|
||||||
|
# sions, or lookups can be directed to TCP-based server. In
|
||||||
|
# that case, the lookups are done in a slightly different
|
||||||
|
# way as described below under "REGULAR EXPRESSION TABLES"
|
||||||
|
# and "TCP-BASED TABLES".
|
||||||
|
#
|
||||||
|
# TABLE FORMAT
|
||||||
|
# The input format for the postmap(1) command is as follows:
|
||||||
|
#
|
||||||
|
# pattern result
|
||||||
|
# When pattern matches a mail address, replace it by
|
||||||
|
# the corresponding result.
|
||||||
|
#
|
||||||
|
# blank lines and comments
|
||||||
|
# Empty lines and whitespace-only lines are ignored,
|
||||||
|
# as are lines whose first non-whitespace character
|
||||||
|
# is a `#'.
|
||||||
|
#
|
||||||
|
# multi-line text
|
||||||
|
# A logical line starts with non-whitespace text. A
|
||||||
|
# line that starts with whitespace continues a logi-
|
||||||
|
# cal line.
|
||||||
|
#
|
||||||
|
# TABLE SEARCH ORDER
|
||||||
|
# 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:
|
||||||
|
#
|
||||||
|
# user@domain address
|
||||||
|
# Replace user@domain by address. This form has the
|
||||||
|
# highest precedence.
|
||||||
|
#
|
||||||
|
# user address
|
||||||
|
# Replace user@site by address when site is equal to
|
||||||
|
# $myorigin, when site is listed in $mydestination,
|
||||||
|
# or when it is listed in $inet_interfaces or
|
||||||
|
# $proxy_interfaces.
|
||||||
|
#
|
||||||
|
# @domain address
|
||||||
|
# Replace other addresses in domain by address. This
|
||||||
|
# form has the lowest precedence.
|
||||||
|
#
|
||||||
|
# In all the above forms, the result address must have the
|
||||||
|
# form username@domainname.
|
||||||
|
#
|
||||||
|
# ADDRESS EXTENSION
|
||||||
|
# When a mail address localpart contains the optional recip-
|
||||||
|
# ient delimiter (e.g., user+foo@domain), the lookup order
|
||||||
|
# becomes: user+foo@domain, user@domain, user+foo, user, and
|
||||||
|
# @domain.
|
||||||
|
#
|
||||||
|
# The propagate_unmatched_extensions parameter controls
|
||||||
|
# whether an unmatched address extension (+foo) is propa-
|
||||||
|
# gated to the result of table lookup.
|
||||||
|
#
|
||||||
|
# REGULAR EXPRESSION TABLES
|
||||||
|
# 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 regexp_table(5) or pcre_table(5).
|
||||||
|
#
|
||||||
|
# Each pattern is a regular expression that is applied to
|
||||||
|
# the entire address being looked up. Thus, user@domain mail
|
||||||
|
# addresses are not broken up into their user and @domain
|
||||||
|
# constituent parts, nor is user+foo broken up into user and
|
||||||
|
# foo.
|
||||||
|
#
|
||||||
|
# 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 $1, $2 and so on.
|
||||||
|
#
|
||||||
|
# TCP-BASED TABLES
|
||||||
|
# This section describes how the table lookups change when
|
||||||
|
# lookups are directed to a TCP-based server. For a descrip-
|
||||||
|
# tion of the TCP client/server lookup protocol, see
|
||||||
|
# tcp_table(5). This feature is not available up to and
|
||||||
|
# including Postfix version 2.2.
|
||||||
|
#
|
||||||
|
# Each lookup operation uses the entire address once. Thus,
|
||||||
|
# user@domain mail addresses are not broken up into their
|
||||||
|
# user and @domain constituent parts, nor is user+foo broken
|
||||||
|
# up into user and foo.
|
||||||
|
#
|
||||||
|
# Results are the same as with indexed file lookups.
|
||||||
|
#
|
||||||
|
# EXAMPLE
|
||||||
|
# The following shows a generic mapping with an indexed
|
||||||
|
# file. When mail is sent to a remote host via SMTP, this
|
||||||
|
# replaces his@localdomain.local by his ISP mail address,
|
||||||
|
# replaces her@localdomain.local by her ISP mail address,
|
||||||
|
# and replaces other local addresses by his ISP account,
|
||||||
|
# with an address extension of +local (this example assumes
|
||||||
|
# that the ISP supports "+" style address extensions).
|
||||||
|
#
|
||||||
|
# /etc/postfix/main.cf:
|
||||||
|
# smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
#
|
||||||
|
# /etc/postfix/generics:
|
||||||
|
# his@localdomain.local hisaccount@hisisp.example
|
||||||
|
# her@localdomain.local heraccount@herisp.example
|
||||||
|
# @localdomain.local hisaccount+local@hisisp.example
|
||||||
|
#
|
||||||
|
# Execute the command "postmap /etc/postfix/generics" when-
|
||||||
|
# ever the table is changed. Instead of hash, some systems
|
||||||
|
# use dbm database files. To find out what tables your sys-
|
||||||
|
# tem supports use the command "postconf -m".
|
||||||
|
#
|
||||||
|
# BUGS
|
||||||
|
# The table format does not understand quoting conventions.
|
||||||
|
#
|
||||||
|
# CONFIGURATION PARAMETERS
|
||||||
|
# The following main.cf parameters are especially relevant.
|
||||||
|
# The text below provides only a parameter summary. See
|
||||||
|
# postconf(5) for more details including examples.
|
||||||
|
#
|
||||||
|
# smtp_generics_maps
|
||||||
|
# Address mapping lookup table for envelope and
|
||||||
|
# header sender and recipient addresses while deliv-
|
||||||
|
# ering mail via SMTP.
|
||||||
|
#
|
||||||
|
# propagate_unmatched_extensions
|
||||||
|
# A list of address rewriting or forwarding mecha-
|
||||||
|
# nisms that propagate an address extension from the
|
||||||
|
# original address to the result. Specify zero or
|
||||||
|
# more of canonical, virtual, alias, forward,
|
||||||
|
# include, or generics.
|
||||||
|
#
|
||||||
|
# Other parameters of interest:
|
||||||
|
#
|
||||||
|
# inet_interfaces
|
||||||
|
# The network interface addresses that this system
|
||||||
|
# receives mail on. You need to stop and start Post-
|
||||||
|
# fix when this parameter changes.
|
||||||
|
#
|
||||||
|
# proxy_interfaces
|
||||||
|
# Other interfaces that this machine receives mail on
|
||||||
|
# by way of a proxy agent or network address transla-
|
||||||
|
# tor.
|
||||||
|
#
|
||||||
|
# mydestination
|
||||||
|
# List of domains that this mail system considers
|
||||||
|
# local.
|
||||||
|
#
|
||||||
|
# myorigin
|
||||||
|
# The domain that is appended to locally-posted mail.
|
||||||
|
#
|
||||||
|
# owner_request_special
|
||||||
|
# Give special treatment to owner-xxx and xxx-request
|
||||||
|
# addresses.
|
||||||
|
#
|
||||||
|
# SEE ALSO
|
||||||
|
# postmap(1), Postfix lookup table manager
|
||||||
|
# postconf(5), configuration parameters
|
||||||
|
# smtp(8), Postfix SMTP client
|
||||||
|
#
|
||||||
|
# README FILES
|
||||||
|
# Use "postconf readme_directory" or "postconf html_direc-
|
||||||
|
# tory" to locate this information.
|
||||||
|
# DATABASE_README, Postfix lookup table overview
|
||||||
|
# ADDRESS_REWRITING_README, address rewriting guide
|
||||||
|
#
|
||||||
|
# LICENSE
|
||||||
|
# The Secure Mailer license must be distributed with this
|
||||||
|
# software.
|
||||||
|
#
|
||||||
|
# HISTORY
|
||||||
|
# A genericstable feature appears in the Sendmail MTA.
|
||||||
|
#
|
||||||
|
# This feature is available in Postfix 2.2 and later.
|
||||||
|
#
|
||||||
|
# AUTHOR(S)
|
||||||
|
# Wietse Venema
|
||||||
|
# IBM T.J. Watson Research
|
||||||
|
# P.O. Box 704
|
||||||
|
# Yorktown Heights, NY 10598, USA
|
||||||
|
#
|
||||||
|
# GENERICS(5)
|
@@ -106,6 +106,7 @@ $config_directory/access:f:root:-:644:p
|
|||||||
$config_directory/aliases:f:root:-:644:p
|
$config_directory/aliases:f:root:-:644:p
|
||||||
$config_directory/canonical:f:root:-:644:p
|
$config_directory/canonical:f:root:-:644:p
|
||||||
$config_directory/cidr_table:f:root:-:644:o
|
$config_directory/cidr_table:f:root:-:644:o
|
||||||
|
$config_directory/generics:f:root:-:644:p
|
||||||
$config_directory/header_checks:f:root:-:644:p
|
$config_directory/header_checks:f:root:-:644:p
|
||||||
$config_directory/install.cf:f:root:-:644:o
|
$config_directory/install.cf:f:root:-:644:o
|
||||||
$config_directory/main.cf:f:root:-:644:p
|
$config_directory/main.cf:f:root:-:644:p
|
||||||
@@ -142,6 +143,7 @@ $manpage_directory/man5/aliases.5:f:root:-:644
|
|||||||
$manpage_directory/man5/body_checks.5:f:root:-:644
|
$manpage_directory/man5/body_checks.5:f:root:-:644
|
||||||
$manpage_directory/man5/canonical.5:f:root:-:644
|
$manpage_directory/man5/canonical.5:f:root:-:644
|
||||||
$manpage_directory/man5/cidr_table.5:f:root:-:644
|
$manpage_directory/man5/cidr_table.5:f:root:-:644
|
||||||
|
$manpage_directory/man5/generics.5:f:root:-:644
|
||||||
$manpage_directory/man5/header_checks.5:f:root:-:644
|
$manpage_directory/man5/header_checks.5:f:root:-:644
|
||||||
$manpage_directory/man5/ldap_table.5:f:root:-:644
|
$manpage_directory/man5/ldap_table.5:f:root:-:644
|
||||||
$manpage_directory/man5/master.5:f:root:-:644
|
$manpage_directory/man5/master.5:f:root:-:644
|
||||||
@@ -314,6 +316,7 @@ $html_directory/defer.8.html:f:root:-:644
|
|||||||
$html_directory/discard.8.html:f:root:-:644
|
$html_directory/discard.8.html:f:root:-:644
|
||||||
$html_directory/error.8.html:f:root:-:644
|
$html_directory/error.8.html:f:root:-:644
|
||||||
$html_directory/flush.8.html:f:root:-:644
|
$html_directory/flush.8.html:f:root:-:644
|
||||||
|
$html_directory/generics.5.html:f:root:-:644
|
||||||
$html_directory/header_checks.5.html:f:root:-:644
|
$html_directory/header_checks.5.html:f:root:-:644
|
||||||
$html_directory/index.html:f:root:-:644
|
$html_directory/index.html:f:root:-:644
|
||||||
$html_directory/ldap_table.5.html:f:root:-:644
|
$html_directory/ldap_table.5.html:f:root:-:644
|
||||||
|
@@ -48,6 +48,7 @@
|
|||||||
# line that starts with whitespace continues a logi-
|
# line that starts with whitespace continues a logi-
|
||||||
# cal line.
|
# cal line.
|
||||||
#
|
#
|
||||||
|
# TABLE SEARCH ORDER
|
||||||
# With lookups from indexed files such as DB or DBM, or from
|
# With lookups from indexed files such as DB or DBM, or from
|
||||||
# networked tables such as NIS, LDAP or SQL, patterns are
|
# networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
# tried in the order as listed below:
|
# tried in the order as listed below:
|
||||||
@@ -61,8 +62,8 @@
|
|||||||
# in $inet_interfaces or $proxy_interfaces.
|
# in $inet_interfaces or $proxy_interfaces.
|
||||||
#
|
#
|
||||||
# @domain
|
# @domain
|
||||||
# Matches every address in domain. This form has the
|
# Matches every other address in domain. This form
|
||||||
# lowest precedence.
|
# has the lowest precedence.
|
||||||
#
|
#
|
||||||
# ADDRESS EXTENSION
|
# ADDRESS EXTENSION
|
||||||
# When a mail address localpart contains the optional recip-
|
# When a mail address localpart contains the optional recip-
|
||||||
|
@@ -79,28 +79,28 @@
|
|||||||
# how or where to deliver mail. This is described in section
|
# how or where to deliver mail. This is described in section
|
||||||
# "RESULT FORMAT".
|
# "RESULT FORMAT".
|
||||||
#
|
#
|
||||||
# TABLE LOOKUP
|
# TABLE SEARCH ORDER
|
||||||
# With lookups from indexed files such as DB or DBM, or from
|
# With lookups from indexed files such as DB or DBM, or from
|
||||||
# networked tables such as NIS, LDAP or SQL, patterns are
|
# networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
# tried in the order as listed below:
|
# tried in the order as listed below:
|
||||||
#
|
#
|
||||||
# user+extension@domain transport:nexthop
|
# user+extension@domain transport:nexthop
|
||||||
# Mail for user+extension@domain is delivered through
|
# Deliver mail for user+extension@domain through
|
||||||
# transport to nexthop.
|
# transport to nexthop.
|
||||||
#
|
#
|
||||||
# user@domain transport:nexthop
|
# user@domain transport:nexthop
|
||||||
# Mail for user@domain is delivered through transport
|
# Deliver mail for user@domain through transport to
|
||||||
# to nexthop.
|
|
||||||
#
|
|
||||||
# domain transport:nexthop
|
|
||||||
# Mail for domain is delivered through transport to
|
|
||||||
# nexthop.
|
# nexthop.
|
||||||
#
|
#
|
||||||
|
# domain transport:nexthop
|
||||||
|
# Deliver mail for domain through transport to nex-
|
||||||
|
# thop.
|
||||||
|
#
|
||||||
# .domain transport:nexthop
|
# .domain transport:nexthop
|
||||||
# Mail for any subdomain of domain is delivered
|
# Deliver mail for any subdomain of domain through
|
||||||
# through transport to nexthop. This applies only
|
# transport to nexthop. This applies only when the
|
||||||
# when the string transport_maps is not listed in the
|
# string transport_maps is not listed in the par-
|
||||||
# parent_domain_matches_subdomains configuration set-
|
# ent_domain_matches_subdomains configuration set-
|
||||||
# ting. Otherwise, a domain name matches itself and
|
# ting. Otherwise, a domain name matches itself and
|
||||||
# its subdomains.
|
# its subdomains.
|
||||||
#
|
#
|
||||||
|
@@ -71,19 +71,20 @@
|
|||||||
# line that starts with whitespace continues a logi-
|
# line that starts with whitespace continues a logi-
|
||||||
# cal line.
|
# cal line.
|
||||||
#
|
#
|
||||||
|
# TABLE SEARCH ORDER
|
||||||
# With lookups from indexed files such as DB or DBM, or from
|
# With lookups from indexed files such as DB or DBM, or from
|
||||||
# networked tables such as NIS, LDAP or SQL, patterns are
|
# networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
# tried in the order as listed below:
|
# tried in the order as listed below:
|
||||||
#
|
#
|
||||||
# user@domain address, address, ...
|
# user@domain address, address, ...
|
||||||
# Mail for user@domain is redirected to address.
|
# Redirect mail for user@domain to address. This
|
||||||
# This form has the highest precedence.
|
# form has the highest precedence.
|
||||||
#
|
#
|
||||||
# user address, address, ...
|
# user address, address, ...
|
||||||
# Mail for user@site is redirected to address when
|
# Redirect mail for user@site to address when site is
|
||||||
# site is equal to $myorigin, when site is listed in
|
# equal to $myorigin, when site is listed in $mydes-
|
||||||
# $mydestination, or when it is listed in
|
# tination, or when it is listed in $inet_interfaces
|
||||||
# $inet_interfaces or $proxy_interfaces.
|
# or $proxy_interfaces.
|
||||||
#
|
#
|
||||||
# This functionality overlaps with functionality of
|
# This functionality overlaps with functionality of
|
||||||
# the local aliases(5) database. The difference is
|
# the local aliases(5) database. The difference is
|
||||||
@@ -91,8 +92,8 @@
|
|||||||
# addresses.
|
# addresses.
|
||||||
#
|
#
|
||||||
# @domain address, address, ...
|
# @domain address, address, ...
|
||||||
# Mail for any user in domain is redirected to
|
# Redirect mail for other users in domain to address.
|
||||||
# address. This form has the lowest precedence.
|
# This form has the lowest precedence.
|
||||||
#
|
#
|
||||||
# In all the above forms, when address has the form @other-
|
# In all the above forms, when address has the form @other-
|
||||||
# domain, the result is the same user in otherdomain. This
|
# domain, the result is the same user in otherdomain. This
|
||||||
@@ -213,8 +214,8 @@
|
|||||||
# A list of address rewriting or forwarding mecha-
|
# A list of address rewriting or forwarding mecha-
|
||||||
# nisms that propagate an address extension from the
|
# nisms that propagate an address extension from the
|
||||||
# original address to the result. Specify zero or
|
# original address to the result. Specify zero or
|
||||||
# more of canonical, virtual, alias, forward, or
|
# more of canonical, virtual, alias, forward,
|
||||||
# include.
|
# include, or generics.
|
||||||
#
|
#
|
||||||
# Other parameters of interest:
|
# Other parameters of interest:
|
||||||
#
|
#
|
||||||
|
@@ -946,11 +946,12 @@ a name such as <i>localdomain.local</i>. This can be a problem when
|
|||||||
you want to send mail over the Internet, because many mail servers
|
you want to send mail over the Internet, because many mail servers
|
||||||
reject mail addresses with invalid domain names. </p>
|
reject mail addresses with invalid domain names. </p>
|
||||||
|
|
||||||
<p> With the <a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a> parameter you can specify lookup
|
<p> With the <a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a> parameter you can specify <a href="generics.5.html">generics(5)</a>
|
||||||
tables that replace local mail addresses by valid Internet addresses
|
lookup tables that replace local mail addresses by valid Internet
|
||||||
when mail leaves the machine via SMTP. This mapping replaces envelope
|
addresses when mail leaves the machine via SMTP. The <a href="generics.5.html">generics(5)</a>
|
||||||
and header addresses, and is non-recursive. It does not happen when
|
mapping replaces envelope and header addresses, and is non-recursive.
|
||||||
you send mail between addresses on the local machine. </p>
|
It does not happen when you send mail between addresses on the
|
||||||
|
local machine. </p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix version 2.2 and later.</p>
|
<p> This feature is available in Postfix version 2.2 and later.</p>
|
||||||
|
|
||||||
@@ -962,18 +963,18 @@ you send mail between addresses on the local machine. </p>
|
|||||||
<a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a> = hash:/etc/postfix/generics
|
<a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a> = hash:/etc/postfix/generics
|
||||||
|
|
||||||
/etc/postfix/generics:
|
/etc/postfix/generics:
|
||||||
you@localdomain.local youraccount@yourisp.example
|
his@localdomain.local hisaccount@hisisp.example
|
||||||
her@localdomain.local heraccount@herisp.example
|
her@localdomain.local heraccount@herisp.example
|
||||||
@localdomain.local youraccount+local@yourisp.example
|
@localdomain.local hisaccount+local@hisisp.example
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> When mail is sent to a remote host via SMTP, this replaces your
|
<p> When mail is sent to a remote host via SMTP, this replaces
|
||||||
local mail address <i>you@localdomain.local</i> by your ISP mail
|
<i>his@localdomain.local</i> by his ISP mail address, replaces
|
||||||
address, replaces <i>her@localdomain.local</i> by her ISP mail
|
<i>her@localdomain.local</i> by her ISP mail address, and replaces
|
||||||
address, and replaces all other local addresses by your ISP account,
|
other local addresses by his ISP account, with an address extension
|
||||||
with an address extension of +<i>local</i> (this example assumes
|
of +<i>local</i> (this example assumes that the ISP supports "+"
|
||||||
that the ISP supports "+" style address extensions). </p>
|
style address extensions). </p>
|
||||||
|
|
||||||
<h3> <a name="aliases"> Local alias database </a> </h3>
|
<h3> <a name="aliases"> Local alias database </a> </h3>
|
||||||
|
|
||||||
|
@@ -18,7 +18,7 @@ CONFIG = access.5.html aliases.5.html canonical.5.html relocated.5.html \
|
|||||||
transport.5.html virtual.5.html pcre_table.5.html regexp_table.5.html \
|
transport.5.html virtual.5.html pcre_table.5.html regexp_table.5.html \
|
||||||
cidr_table.5.html tcp_table.5.html header_checks.5.html \
|
cidr_table.5.html tcp_table.5.html header_checks.5.html \
|
||||||
ldap_table.5.html mysql_table.5.html pgsql_table.5.html \
|
ldap_table.5.html mysql_table.5.html pgsql_table.5.html \
|
||||||
master.5.html nisplus_table.5.html
|
master.5.html nisplus_table.5.html generics.5.html
|
||||||
OTHER = postfix-manuals.html
|
OTHER = postfix-manuals.html
|
||||||
AWK = awk '{ print; if (NR == 2) print ".pl 9999\n.ll 65" }'
|
AWK = awk '{ print; if (NR == 2) print ".pl 9999\n.ll 65" }'
|
||||||
MAN2HTML = man2html -t "Postfix manual - `IFS=.; set \`echo $@\`; echo \"$$1($$2)\"`"
|
MAN2HTML = man2html -t "Postfix manual - `IFS=.; set \`echo $@\`; echo \"$$1($$2)\"`"
|
||||||
@@ -241,6 +241,10 @@ header_checks.5.html: ../proto/header_checks
|
|||||||
PATH=../mantools:$$PATH; \
|
PATH=../mantools:$$PATH; \
|
||||||
srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
|
srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
|
||||||
|
|
||||||
|
generics.5.html: ../proto/generics
|
||||||
|
PATH=../mantools:$$PATH; \
|
||||||
|
srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
|
||||||
|
|
||||||
ldap_table.5.html: ../proto/ldap_table
|
ldap_table.5.html: ../proto/ldap_table
|
||||||
PATH=../mantools:$$PATH; \
|
PATH=../mantools:$$PATH; \
|
||||||
srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
|
srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
|
||||||
|
@@ -56,7 +56,7 @@ site</a>
|
|||||||
<li><a href="#dialup">Postfix on a dialup machine</a>
|
<li><a href="#dialup">Postfix on a dialup machine</a>
|
||||||
|
|
||||||
<li><a href="#fantasy">Postfix on hosts without a real
|
<li><a href="#fantasy">Postfix on hosts without a real
|
||||||
hostname</a>
|
Internet hostname</a>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ what is covered in the <a href="BASIC_CONFIGURATION_README.html">BASIC_CONFIGURA
|
|||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> See also the section "<a href="#fantasy">Postfix on hosts without
|
<p> See also the section "<a href="#fantasy">Postfix on hosts without
|
||||||
a real hostname</a>" if this is applicable to your configuration.
|
a real Internet hostname</a>" if this is applicable to your configuration.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a name="null_client">Postfix on a null client</a></h2>
|
<h2><a name="null_client">Postfix on a null client</a></h2>
|
||||||
@@ -610,10 +610,10 @@ href="#local_network">local area network</a> section above. </p>
|
|||||||
combine this with basic configuration information as discussed the
|
combine this with basic configuration information as discussed the
|
||||||
first half of this document. </p>
|
first half of this document. </p>
|
||||||
|
|
||||||
<p> If you do not have your own hostname (as with dynamic IP
|
<p> If you do not have your own hostname and IP address (usually
|
||||||
addressing) then you should also study the section on "<a
|
with dialup, cable TV or DSL connections) then you should also
|
||||||
href="#fantasy">Postfix on hosts without a real hostname</a>".
|
study the section on "<a href="#fantasy">Postfix on hosts without
|
||||||
</p>
|
a real Internet hostname</a>". </p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
@@ -689,23 +689,71 @@ newly-posted mail is flushed from the queue. </p>
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a name="fantasy">Postfix on hosts without a real hostname</a></h2>
|
<h2><a name="fantasy">Postfix on hosts without a real Internet
|
||||||
|
hostname</a></h2>
|
||||||
|
|
||||||
<p> This section is for hosts that don't have an Internet hostname.
|
<p> This section is for hosts that don't have their own Internet
|
||||||
Typically these are systems that get a dynamic IP address via DHCP
|
hostname. Typically these are systems that get a dynamic IP address
|
||||||
or via dialup. Postfix will let you send and receive mail just fine
|
via DHCP or via dialup. Postfix will let you send and receive mail
|
||||||
between accounts on a machine with a fantasy name. However, you
|
just fine between accounts on a machine with a fantasy name. However,
|
||||||
cannot use a fantasy hostname in your email address when sending
|
you cannot use a fantasy hostname in your email address when sending
|
||||||
mail into the Internet, because no-one would be able to reply to
|
mail into the Internet, because no-one would be able to reply to
|
||||||
your mail. In fact, more and more sites refuse mail from non-existent
|
your mail. In fact, more and more sites refuse mail addresses with
|
||||||
domain names. </p>
|
non-existent domain names. </p>
|
||||||
|
|
||||||
<p> The perfect solution would be for Postfix to do a mapping from
|
<p> Note: the following information is Postfix version dependent.
|
||||||
local fantasy email addresses to valid Internet addresses when mail
|
To find out what Postfix version you have, execute the command
|
||||||
leaves the machine (similar to Sendmail's generics table). This is
|
"<b>postconf <a href="postconf.5.html#mail_version">mail_version</a></b>". </p>
|
||||||
planned for the near future. </p>
|
|
||||||
|
|
||||||
<p> In the mean time, the solution with Postfix is to use valid
|
<h3>Postfix version 2.2 and later </h3>
|
||||||
|
|
||||||
|
<p> Postfix 2.2 uses the <a href="generics.5.html">generics(5)</a> address mapping to replace
|
||||||
|
local fantasy email addresses by valid Internet addresses. This
|
||||||
|
mapping happens ONLY when mail leaves the machine; not when you
|
||||||
|
send mail between users on the same machine. </p>
|
||||||
|
|
||||||
|
<p> The following example presents additional configuration. You
|
||||||
|
need to combine this with basic configuration information as
|
||||||
|
discussed the first half of this document. </p>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre>
|
||||||
|
1 /etc/postfix/main.cf:
|
||||||
|
2 <a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a> = hash:/etc/postfix/generics
|
||||||
|
3
|
||||||
|
4 /etc/postfix/generics:
|
||||||
|
5 his@localdomain.local hisaccount@hisisp.example
|
||||||
|
6 her@localdomain.local heraccount@herisp.example
|
||||||
|
7 @localdomain.local hisaccount+local@hisisp.example
|
||||||
|
</pre>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<p> When mail is sent to a remote host via SMTP: </p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li> <p> Line 5 replaces <i>his@localdomain.local</i> by his ISP
|
||||||
|
mail address, </p>
|
||||||
|
|
||||||
|
<li> <p> Line 6 replaces <i>her@localdomain.local</i> by her ISP
|
||||||
|
mail address, and </p>
|
||||||
|
|
||||||
|
<li> <p> Line 7 replaces other local addresses by his ISP account,
|
||||||
|
with an address extension of +<i>local</i> (this example assumes
|
||||||
|
that the ISP supports "+" style address extensions). </p>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Specify <b>dbm</b> instead of <b>hash</b> if your system uses
|
||||||
|
<b>dbm</b> files instead of <b>db</b> files. To find out what lookup
|
||||||
|
tables Postfix supports, use the command "<b>postconf -m</b>". </p>
|
||||||
|
|
||||||
|
<p> Execute the command "<b>postmap /etc/postfix/generics</b>"
|
||||||
|
whenever you change the generics table. </p>
|
||||||
|
|
||||||
|
<h3>Postfix version 2.1 and earlier </h3>
|
||||||
|
|
||||||
|
<p> The solution with older Postfix systems is to use valid
|
||||||
Internet addresses where possible, and to let Postfix map valid
|
Internet addresses where possible, and to let Postfix map valid
|
||||||
Internet addresses to local fantasy addresses. With this, you can
|
Internet addresses to local fantasy addresses. With this, you can
|
||||||
send mail to the Internet and to local fantasy addresses, including
|
send mail to the Internet and to local fantasy addresses, including
|
||||||
@@ -753,6 +801,16 @@ but is convenient.
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<p>Specify <b>dbm</b> instead of <b>hash</b> if your system uses
|
||||||
|
<b>dbm</b> files instead of <b>db</b> files. To find out what lookup
|
||||||
|
tables Postfix supports, use the command "<b>postconf -m</b>". </p>
|
||||||
|
|
||||||
|
<p> Execute the command "<b>postmap /etc/postfix/canonical</b>"
|
||||||
|
whenever you change the canonical table. </p>
|
||||||
|
|
||||||
|
<p> Execute the command "<b>postmap /etc/postfix/virtual</b>"
|
||||||
|
whenever you change the virtual table. </p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@@ -148,8 +148,8 @@ ALIASES(5) ALIASES(5)
|
|||||||
A list of address rewriting or forwarding mecha-
|
A list of address rewriting or forwarding mecha-
|
||||||
nisms that propagate an address extension from the
|
nisms that propagate an address extension from the
|
||||||
original address to the result. Specify zero or
|
original address to the result. Specify zero or
|
||||||
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>, or
|
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>,
|
||||||
<b>include</b>.
|
<b>include</b>, or <b>generics</b>.
|
||||||
|
|
||||||
<b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b>
|
<b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b>
|
||||||
Give special treatment to <b>owner-</b><i>listname</i> and <i>list-</i>
|
Give special treatment to <b>owner-</b><i>listname</i> and <i>list-</i>
|
||||||
|
@@ -19,8 +19,8 @@ CANONICAL(5) CANONICAL(5)
|
|||||||
<b>DESCRIPTION</b>
|
<b>DESCRIPTION</b>
|
||||||
The optional <a href="canonical.5.html"><b>canonical</b>(5)</a> table specifies an address map-
|
The optional <a href="canonical.5.html"><b>canonical</b>(5)</a> table specifies an address map-
|
||||||
ping for local and non-local addresses. The mapping is
|
ping for local and non-local addresses. The mapping is
|
||||||
used by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon. The address mapping is
|
used by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon, before mail is stored into
|
||||||
recursive.
|
the queue. The address mapping is recursive.
|
||||||
|
|
||||||
Normally, the <a href="canonical.5.html"><b>canonical</b>(5)</a> table is specified as a text
|
Normally, the <a href="canonical.5.html"><b>canonical</b>(5)</a> table is specified as a text
|
||||||
file that serves as input to the <a href="postmap.1.html"><b>postmap</b>(1)</a> command. The
|
file that serves as input to the <a href="postmap.1.html"><b>postmap</b>(1)</a> command. The
|
||||||
@@ -59,8 +59,7 @@ CANONICAL(5) CANONICAL(5)
|
|||||||
aliasing. Use the <a href="aliases.5.html"><b>aliases</b>(5)</a> map for that purpose.
|
aliasing. Use the <a href="aliases.5.html"><b>aliases</b>(5)</a> map for that purpose.
|
||||||
|
|
||||||
<b>TABLE FORMAT</b>
|
<b>TABLE FORMAT</b>
|
||||||
make# The input format for the <a href="postmap.1.html"><b>postmap</b>(1)</a> command is as
|
The input format for the <a href="postmap.1.html"><b>postmap</b>(1)</a> command is as follows:
|
||||||
follows:
|
|
||||||
|
|
||||||
<i>pattern result</i>
|
<i>pattern result</i>
|
||||||
When <i>pattern</i> matches a mail address, replace it by
|
When <i>pattern</i> matches a mail address, replace it by
|
||||||
@@ -76,13 +75,14 @@ CANONICAL(5) CANONICAL(5)
|
|||||||
line that starts with whitespace continues a logi-
|
line that starts with whitespace continues a logi-
|
||||||
cal line.
|
cal line.
|
||||||
|
|
||||||
|
<b>TABLE SEARCH ORDER</b>
|
||||||
With lookups from indexed files such as DB or DBM, or from
|
With lookups from indexed files such as DB or DBM, or from
|
||||||
networked tables such as NIS, LDAP or SQL, patterns are
|
networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
tried in the order as listed below:
|
tried in the order as listed below:
|
||||||
|
|
||||||
<i>user</i>@<i>domain address</i>
|
<i>user</i>@<i>domain address</i>
|
||||||
<i>user</i>@<i>domain</i> is replaced by <i>address</i>. This form has
|
Replace <i>user</i>@<i>domain</i> by <i>address</i>. This form has the
|
||||||
the highest precedence.
|
highest precedence.
|
||||||
|
|
||||||
This is useful to clean up addresses produced by
|
This is useful to clean up addresses produced by
|
||||||
legacy mail systems. It can also be used to pro-
|
legacy mail systems. It can also be used to pro-
|
||||||
@@ -90,17 +90,17 @@ CANONICAL(5) CANONICAL(5)
|
|||||||
below for a simpler solution.
|
below for a simpler solution.
|
||||||
|
|
||||||
<i>user address</i>
|
<i>user address</i>
|
||||||
<i>user</i>@<i>site</i> is replaced by <i>address</i> when <i>site</i> is equal
|
Replace <i>user</i>@<i>site</i> by <i>address</i> when <i>site</i> is equal to
|
||||||
to $<b><a href="postconf.5.html#myorigin">myorigin</a></b>, when <i>site</i> is listed in $<b><a href="postconf.5.html#mydestination">mydestina</a>-</b>
|
$<b><a href="postconf.5.html#myorigin">myorigin</a></b>, when <i>site</i> is listed in $<b><a href="postconf.5.html#mydestination">mydestination</a></b>,
|
||||||
<b><a href="postconf.5.html#mydestination">tion</a></b>, or when it is listed in $<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> or
|
or when it is listed in $<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> or
|
||||||
$<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
$<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
||||||
|
|
||||||
This form is useful for replacing login names by
|
This form is useful for replacing login names by
|
||||||
<i>Firstname.Lastname</i>.
|
<i>Firstname.Lastname</i>.
|
||||||
|
|
||||||
@<i>domain address</i>
|
@<i>domain address</i>
|
||||||
Every address in <i>domain</i> is replaced by <i>address</i>.
|
Replace other addresses in <i>domain</i> by <i>address</i>. This
|
||||||
This form has the lowest precedence.
|
form has the lowest precedence.
|
||||||
|
|
||||||
In all the above forms, when <i>address</i> has the form @<i>other-</i>
|
In all the above forms, when <i>address</i> has the form @<i>other-</i>
|
||||||
<i>domain</i>, the result is the same user in <i>otherdomain</i>.
|
<i>domain</i>, the result is the same user in <i>otherdomain</i>.
|
||||||
@@ -176,8 +176,8 @@ CANONICAL(5) CANONICAL(5)
|
|||||||
A list of address rewriting or forwarding mecha-
|
A list of address rewriting or forwarding mecha-
|
||||||
nisms that propagate an address extension from the
|
nisms that propagate an address extension from the
|
||||||
original address to the result. Specify zero or
|
original address to the result. Specify zero or
|
||||||
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>, or
|
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>,
|
||||||
<b>include</b>.
|
<b>include</b>, or <b>generics</b>.
|
||||||
|
|
||||||
Other parameters of interest:
|
Other parameters of interest:
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ CIDR_TABLE(5) CIDR_TABLE(5)
|
|||||||
line that starts with whitespace continues a logi-
|
line that starts with whitespace continues a logi-
|
||||||
cal line.
|
cal line.
|
||||||
|
|
||||||
<b>SEARCH ORDER</b>
|
<b>TABLE SEARCH ORDER</b>
|
||||||
Patterns are applied in the order as specified in the
|
Patterns are applied in the order as specified in the
|
||||||
table, until a pattern is found that matches the search
|
table, until a pattern is found that matches the search
|
||||||
string.
|
string.
|
||||||
|
229
postfix/html/generics.5.html
Normal file
229
postfix/html/generics.5.html
Normal file
@@ -0,0 +1,229 @@
|
|||||||
|
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||||
|
"http://www.w3.org/TR/html4/loose.dtd">
|
||||||
|
<html> <head>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
|
||||||
|
<title> Postfix manual - generics(5) </title>
|
||||||
|
</head> <body> <pre>
|
||||||
|
GENERICS(5) GENERICS(5)
|
||||||
|
|
||||||
|
<b>NAME</b>
|
||||||
|
generics - Postfix generics table format
|
||||||
|
|
||||||
|
<b>SYNOPSIS</b>
|
||||||
|
<b>postmap /etc/postfix/generics</b>
|
||||||
|
|
||||||
|
<b>postmap -q "</b><i>string</i><b>" /etc/postfix/generics</b>
|
||||||
|
|
||||||
|
<b>postmap -q - /etc/postfix/generics</b> <<i>inputfile</i>
|
||||||
|
|
||||||
|
<b>DESCRIPTION</b>
|
||||||
|
The optional <a href="generics.5.html"><b>generics</b>(5)</a> table specifies an address map-
|
||||||
|
ping that applies when mail is delivered. This is the
|
||||||
|
opposite of <a href="canonical.5.html"><b>canonical</b>(5)</a> mapping, which applies when mail
|
||||||
|
is received.
|
||||||
|
|
||||||
|
Typically, one would use the <a href="generics.5.html"><b>generics</b>(5)</a> table on a system
|
||||||
|
that does not have a valid Internet domain name and that
|
||||||
|
uses something like <i>localdomain.local</i> instead. The <a href="generics.5.html"><b>gener-</b></a>
|
||||||
|
<a href="generics.5.html"><b>ics</b>(5)</a> table is then used by the <a href="smtp.8.html"><b>smtp</b>(8)</a> client to trans-
|
||||||
|
form local mail addresses into valid Internet mail
|
||||||
|
addresses when mail has to be sent across the Internet.
|
||||||
|
See the EXAMPLE section at the end of this document.
|
||||||
|
|
||||||
|
The <a href="generics.5.html"><b>generics</b>(5)</a> mapping affects both message header
|
||||||
|
addresses (i.e. addresses that appear inside messages) and
|
||||||
|
message envelope addresses (for example, the addresses
|
||||||
|
that are used in SMTP protocol commands).
|
||||||
|
|
||||||
|
Normally, the <a href="generics.5.html"><b>generics</b>(5)</a> table is specified as a text
|
||||||
|
file that serves as input to the <a href="postmap.1.html"><b>postmap</b>(1)</a> command. The
|
||||||
|
result, an indexed file in <b>dbm</b> or <b>db</b> format, is used for
|
||||||
|
fast searching by the mail system. Execute the command
|
||||||
|
"<b>postmap /etc/postfix/generics</b>" 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 expres-
|
||||||
|
sions, or lookups can be directed to TCP-based server. In
|
||||||
|
that case, the lookups are done in a slightly different
|
||||||
|
way as described below under "REGULAR EXPRESSION TABLES"
|
||||||
|
and "TCP-BASED TABLES".
|
||||||
|
|
||||||
|
<b>TABLE FORMAT</b>
|
||||||
|
The input format for the <a href="postmap.1.html"><b>postmap</b>(1)</a> command is as follows:
|
||||||
|
|
||||||
|
<i>pattern result</i>
|
||||||
|
When <i>pattern</i> matches a mail address, replace it by
|
||||||
|
the corresponding <i>result</i>.
|
||||||
|
|
||||||
|
blank lines and comments
|
||||||
|
Empty lines and whitespace-only lines are ignored,
|
||||||
|
as are lines whose first non-whitespace character
|
||||||
|
is a `#'.
|
||||||
|
|
||||||
|
multi-line text
|
||||||
|
A logical line starts with non-whitespace text. A
|
||||||
|
line that starts with whitespace continues a logi-
|
||||||
|
cal line.
|
||||||
|
|
||||||
|
<b>TABLE SEARCH ORDER</b>
|
||||||
|
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:
|
||||||
|
|
||||||
|
<i>user</i>@<i>domain address</i>
|
||||||
|
Replace <i>user</i>@<i>domain</i> by <i>address</i>. This form has the
|
||||||
|
highest precedence.
|
||||||
|
|
||||||
|
<i>user address</i>
|
||||||
|
Replace <i>user</i>@<i>site</i> by <i>address</i> when <i>site</i> is equal to
|
||||||
|
$<b><a href="postconf.5.html#myorigin">myorigin</a></b>, when <i>site</i> is listed in $<b><a href="postconf.5.html#mydestination">mydestination</a></b>,
|
||||||
|
or when it is listed in $<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> or
|
||||||
|
$<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
||||||
|
|
||||||
|
@<i>domain address</i>
|
||||||
|
Replace other addresses in <i>domain</i> by <i>address</i>. This
|
||||||
|
form has the lowest precedence.
|
||||||
|
|
||||||
|
In all the above forms, the result <i>address</i> must have the
|
||||||
|
form <i>username@domainname</i>.
|
||||||
|
|
||||||
|
<b>ADDRESS EXTENSION</b>
|
||||||
|
When a mail address localpart contains the optional recip-
|
||||||
|
ient delimiter (e.g., <i>user+foo</i>@<i>domain</i>), the lookup order
|
||||||
|
becomes: <i>user+foo</i>@<i>domain</i>, <i>user</i>@<i>domain</i>, <i>user+foo</i>, <i>user</i>, and
|
||||||
|
@<i>domain</i>.
|
||||||
|
|
||||||
|
The <b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b> parameter controls
|
||||||
|
whether an unmatched address extension (<i>+foo</i>) is propa-
|
||||||
|
gated to the result of table lookup.
|
||||||
|
|
||||||
|
<b>REGULAR EXPRESSION TABLES</b>
|
||||||
|
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 <a href="regexp_table.5.html"><b>regexp_table</b>(5)</a> or <a href="pcre_table.5.html"><b>pcre_table</b>(5)</a>.
|
||||||
|
|
||||||
|
Each pattern is a regular expression that is applied to
|
||||||
|
the entire address being looked up. Thus, <i>user@domain</i> mail
|
||||||
|
addresses are not broken up into their <i>user</i> and <i>@domain</i>
|
||||||
|
constituent parts, nor is <i>user+foo</i> broken up into <i>user</i> and
|
||||||
|
<i>foo</i>.
|
||||||
|
|
||||||
|
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 <b>$1</b>, <b>$2</b> and so on.
|
||||||
|
|
||||||
|
<b>TCP-BASED TABLES</b>
|
||||||
|
This section describes how the table lookups change when
|
||||||
|
lookups are directed to a TCP-based server. For a descrip-
|
||||||
|
tion of the TCP client/server lookup protocol, see
|
||||||
|
<a href="tcp_table.5.html"><b>tcp_table</b>(5)</a>. This feature is not available up to and
|
||||||
|
including Postfix version 2.2.
|
||||||
|
|
||||||
|
Each lookup operation uses the entire address once. Thus,
|
||||||
|
<i>user@domain</i> mail addresses are not broken up into their
|
||||||
|
<i>user</i> and <i>@domain</i> constituent parts, nor is <i>user+foo</i> broken
|
||||||
|
up into <i>user</i> and <i>foo</i>.
|
||||||
|
|
||||||
|
Results are the same as with indexed file lookups.
|
||||||
|
|
||||||
|
<b>EXAMPLE</b>
|
||||||
|
The following shows a generic mapping with an indexed
|
||||||
|
file. When mail is sent to a remote host via SMTP, this
|
||||||
|
replaces <i>his@localdomain.local</i> by his ISP mail address,
|
||||||
|
replaces <i>her@localdomain.local</i> by her ISP mail address,
|
||||||
|
and replaces other local addresses by his ISP account,
|
||||||
|
with an address extension of <i>+local</i> (this example assumes
|
||||||
|
that the ISP supports "+" style address extensions).
|
||||||
|
|
||||||
|
/etc/postfix/main.cf:
|
||||||
|
<a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a> = hash:/etc/postfix/generics
|
||||||
|
|
||||||
|
/etc/postfix/generics:
|
||||||
|
his@localdomain.local hisaccount@hisisp.example
|
||||||
|
her@localdomain.local heraccount@herisp.example
|
||||||
|
@localdomain.local hisaccount+local@hisisp.example
|
||||||
|
|
||||||
|
Execute the command "<b>postmap /etc/postfix/generics</b>" when-
|
||||||
|
ever the table is changed. Instead of <b>hash</b>, some systems
|
||||||
|
use <b>dbm</b> database files. To find out what tables your sys-
|
||||||
|
tem supports use the command "<b>postconf -m</b>".
|
||||||
|
|
||||||
|
<b>BUGS</b>
|
||||||
|
The table format does not understand quoting conventions.
|
||||||
|
|
||||||
|
<b>CONFIGURATION PARAMETERS</b>
|
||||||
|
The following <b>main.cf</b> parameters are especially relevant.
|
||||||
|
The text below provides only a parameter summary. See
|
||||||
|
<a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including examples.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#smtp_generics_maps">smtp_generics_maps</a></b>
|
||||||
|
Address mapping lookup table for envelope and
|
||||||
|
header sender and recipient addresses while deliv-
|
||||||
|
ering mail via SMTP.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#propagate_unmatched_extensions">propagate_unmatched_extensions</a></b>
|
||||||
|
A list of address rewriting or forwarding mecha-
|
||||||
|
nisms that propagate an address extension from the
|
||||||
|
original address to the result. Specify zero or
|
||||||
|
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>,
|
||||||
|
<b>include</b>, or <b>generics</b>.
|
||||||
|
|
||||||
|
Other parameters of interest:
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b>
|
||||||
|
The network interface addresses that this system
|
||||||
|
receives mail on. You need to stop and start Post-
|
||||||
|
fix when this parameter changes.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>
|
||||||
|
Other interfaces that this machine receives mail on
|
||||||
|
by way of a proxy agent or network address transla-
|
||||||
|
tor.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#mydestination">mydestination</a></b>
|
||||||
|
List of domains that this mail system considers
|
||||||
|
local.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#myorigin">myorigin</a></b>
|
||||||
|
The domain that is appended to locally-posted mail.
|
||||||
|
|
||||||
|
<b><a href="postconf.5.html#owner_request_special">owner_request_special</a></b>
|
||||||
|
Give special treatment to <b>owner-</b><i>xxx</i> and <i>xxx</i><b>-request</b>
|
||||||
|
addresses.
|
||||||
|
|
||||||
|
<b>SEE ALSO</b>
|
||||||
|
<a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager
|
||||||
|
<a href="postconf.5.html">postconf(5)</a>, configuration parameters
|
||||||
|
<a href="smtp.8.html">smtp(8)</a>, Postfix SMTP client
|
||||||
|
|
||||||
|
<b>README FILES</b>
|
||||||
|
<a href="DATABASE_README.html">DATABASE_README</a>, Postfix lookup table overview
|
||||||
|
<a href="ADDRESS_REWRITING_README.html">ADDRESS_REWRITING_README</a>, address rewriting guide
|
||||||
|
|
||||||
|
<b>LICENSE</b>
|
||||||
|
The Secure Mailer license must be distributed with this
|
||||||
|
software.
|
||||||
|
|
||||||
|
<b>HISTORY</b>
|
||||||
|
A genericstable feature appears in the Sendmail MTA.
|
||||||
|
|
||||||
|
This feature is available in Postfix 2.2 and later.
|
||||||
|
|
||||||
|
<b>AUTHOR(S)</b>
|
||||||
|
Wietse Venema
|
||||||
|
IBM T.J. Watson Research
|
||||||
|
P.O. Box 704
|
||||||
|
Yorktown Heights, NY 10598, USA
|
||||||
|
|
||||||
|
GENERICS(5)
|
||||||
|
</pre> </body> </html>
|
@@ -5917,34 +5917,11 @@ This is needed when the local machine does not have its own Internet
|
|||||||
domain name, but uses something like <i>localdomain.local</i>
|
domain name, but uses something like <i>localdomain.local</i>
|
||||||
instead. </p>
|
instead. </p>
|
||||||
|
|
||||||
<p> The table search order is described below. The search terminates
|
<p> The table format and lookups are documented in <a href="generics.5.html">generics(5)</a>;
|
||||||
when a match is found. In other words, the search is non-recursive.
|
examples are shown in the <a href="ADDRESS_REWRITING_README.html">ADDRESS_REWRITING_README</a> and
|
||||||
</p>
|
<a href="STANDARD_CONFIGURATION_README.html">STANDARD_CONFIGURATION_README</a> documents. </p>
|
||||||
|
|
||||||
<dl>
|
<p> This feature is available in Postfix 2.2 and later. </p>
|
||||||
|
|
||||||
<dt> <i>user@domain.tld address</i> </dt>
|
|
||||||
|
|
||||||
<dd> <p> Replace <i>user@domain.tld</i> by <i>address</i>. This
|
|
||||||
form has the highest precedence. </p> </dd>
|
|
||||||
|
|
||||||
<dt> <i>user address</i> </dt>
|
|
||||||
|
|
||||||
<dd> <p> Replace <i>user@site</i> by <i>address</i> when <i>site</i> is
|
|
||||||
equal to $<a href="postconf.5.html#myorigin">myorigin</a>, when <i>site</i> is listed in $<a href="postconf.5.html#mydestination">mydestination</a>,
|
|
||||||
or when it matches $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or $<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>. </p>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt> <i>@domain.tld address</i> </dt>
|
|
||||||
|
|
||||||
<dd> <p> Replace all other addresses in <i>domain.tld</i> by
|
|
||||||
<i>address</i>. This form has the lowest preference. </p> </dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p> In all cases <i>address</i> must specify a username and a
|
|
||||||
domain. </p> <p> This feature is available in Postfix 2.2 and later.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
</DD>
|
</DD>
|
||||||
|
@@ -84,6 +84,8 @@ the following convention: </p>
|
|||||||
|
|
||||||
<li> <a href="postconf.1.html">postconf(1)</a>, Postfix configuration utility
|
<li> <a href="postconf.1.html">postconf(1)</a>, Postfix configuration utility
|
||||||
|
|
||||||
|
<li> <a href="postfix.1.html">postfix(1)</a>, Postfix control program
|
||||||
|
|
||||||
<li> <a href="postkick.1.html">postkick(1)</a>, trigger Postfix daemon
|
<li> <a href="postkick.1.html">postkick(1)</a>, trigger Postfix daemon
|
||||||
|
|
||||||
<li> <a href="postlock.1.html">postlock(1)</a>, Postfix-compatible locking
|
<li> <a href="postlock.1.html">postlock(1)</a>, Postfix-compatible locking
|
||||||
@@ -96,6 +98,10 @@ the following convention: </p>
|
|||||||
|
|
||||||
<li> <a href="postsuper.1.html">postsuper(1)</a>, Postfix housekeeping
|
<li> <a href="postsuper.1.html">postsuper(1)</a>, Postfix housekeeping
|
||||||
|
|
||||||
|
<li> <a href="mailq.1.html">mailq(1)</a>, Sendmail compatibility interface
|
||||||
|
|
||||||
|
<li> <a href="newaliases.1.html">newaliases(1)</a>, Sendmail compatibility interface
|
||||||
|
|
||||||
<li> <a href="sendmail.1.html">sendmail(1)</a>, Sendmail compatibility interface
|
<li> <a href="sendmail.1.html">sendmail(1)</a>, Sendmail compatibility interface
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -120,9 +126,11 @@ the following convention: </p>
|
|||||||
|
|
||||||
<li> <a href="aliases.5.html">aliases(5)</a>, Postfix alias database
|
<li> <a href="aliases.5.html">aliases(5)</a>, Postfix alias database
|
||||||
|
|
||||||
<li> <a href="header_checks.5.html">header_checks(5)</a>, <a href="header_checks.5.html">body_checks(5)</a>, content inspection
|
<li> <a href="canonical.5.html">canonical(5)</a>, Postfix input address rewriting
|
||||||
|
|
||||||
<li> <a href="canonical.5.html">canonical(5)</a>, Postfix address rewriting
|
<li> <a href="generics.5.html">generics(5)</a>, Postfix output address rewriting
|
||||||
|
|
||||||
|
<li> <a href="header_checks.5.html">header_checks(5)</a>, <a href="header_checks.5.html">body_checks(5)</a>, Postfix content inspection
|
||||||
|
|
||||||
<li> <a href="relocated.5.html">relocated(5)</a>, Users that have moved
|
<li> <a href="relocated.5.html">relocated(5)</a>, Users that have moved
|
||||||
|
|
||||||
|
@@ -198,12 +198,15 @@ POSTFIX(1) POSTFIX(1)
|
|||||||
<a href="postalias.1.html">postalias(1)</a>, create/update/query alias database
|
<a href="postalias.1.html">postalias(1)</a>, create/update/query alias database
|
||||||
<a href="postcat.1.html">postcat(1)</a>, examine Postfix queue file
|
<a href="postcat.1.html">postcat(1)</a>, examine Postfix queue file
|
||||||
<a href="postconf.1.html">postconf(1)</a>, Postfix configuration utility
|
<a href="postconf.1.html">postconf(1)</a>, Postfix configuration utility
|
||||||
|
<a href="postfix.1.html">postfix(1)</a>, Postfix control program
|
||||||
<a href="postkick.1.html">postkick(1)</a>, trigger Postfix daemon
|
<a href="postkick.1.html">postkick(1)</a>, trigger Postfix daemon
|
||||||
<a href="postlock.1.html">postlock(1)</a>, Postfix-compatible locking
|
<a href="postlock.1.html">postlock(1)</a>, Postfix-compatible locking
|
||||||
<a href="postlog.1.html">postlog(1)</a>, Postfix-compatible logging
|
<a href="postlog.1.html">postlog(1)</a>, Postfix-compatible logging
|
||||||
<a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager
|
<a href="postmap.1.html">postmap(1)</a>, Postfix lookup table manager
|
||||||
<a href="postqueue.1.html">postqueue(1)</a>, Postfix mail queue control
|
<a href="postqueue.1.html">postqueue(1)</a>, Postfix mail queue control
|
||||||
<a href="postsuper.1.html">postsuper(1)</a>, Postfix housekeeping
|
<a href="postsuper.1.html">postsuper(1)</a>, Postfix housekeeping
|
||||||
|
<a href="mailq.1.html">mailq(1)</a>, Sendmail compatibility interface
|
||||||
|
<a href="newaliases.1.html">newaliases(1)</a>, Sendmail compatibility interface
|
||||||
<a href="sendmail.1.html">sendmail(1)</a>, Sendmail compatibility interface
|
<a href="sendmail.1.html">sendmail(1)</a>, Sendmail compatibility interface
|
||||||
|
|
||||||
Postfix configuration:
|
Postfix configuration:
|
||||||
@@ -213,8 +216,9 @@ POSTFIX(1) POSTFIX(1)
|
|||||||
Table-driven mechanisms:
|
Table-driven mechanisms:
|
||||||
<a href="access.5.html">access(5)</a>, Postfix SMTP access control table
|
<a href="access.5.html">access(5)</a>, Postfix SMTP access control table
|
||||||
<a href="aliases.5.html">aliases(5)</a>, Postfix alias database
|
<a href="aliases.5.html">aliases(5)</a>, Postfix alias database
|
||||||
<a href="header_checks.5.html">header_checks(5)</a>, <a href="header_checks.5.html">body_checks(5)</a>, content inspection
|
<a href="canonical.5.html">canonical(5)</a>, Postfix input address rewriting
|
||||||
<a href="canonical.5.html">canonical(5)</a>, Postfix address rewriting
|
<a href="generics.5.html">generics(5)</a>, Postfix output address rewriting
|
||||||
|
<a href="header_checks.5.html">header_checks(5)</a>, <a href="header_checks.5.html">body_checks(5)</a>, Postfix content inspection
|
||||||
<a href="relocated.5.html">relocated(5)</a>, Users that have moved
|
<a href="relocated.5.html">relocated(5)</a>, Users that have moved
|
||||||
<a href="transport.5.html">transport(5)</a>, Postfix routing table
|
<a href="transport.5.html">transport(5)</a>, Postfix routing table
|
||||||
<a href="virtual.5.html">virtual(5)</a>, Postfix virtual aliasing
|
<a href="virtual.5.html">virtual(5)</a>, Postfix virtual aliasing
|
||||||
|
@@ -54,6 +54,7 @@ RELOCATED(5) RELOCATED(5)
|
|||||||
line that starts with whitespace continues a logi-
|
line that starts with whitespace continues a logi-
|
||||||
cal line.
|
cal line.
|
||||||
|
|
||||||
|
<b>TABLE SEARCH ORDER</b>
|
||||||
With lookups from indexed files such as DB or DBM, or from
|
With lookups from indexed files such as DB or DBM, or from
|
||||||
networked tables such as NIS, LDAP or SQL, patterns are
|
networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
tried in the order as listed below:
|
tried in the order as listed below:
|
||||||
@@ -67,8 +68,8 @@ RELOCATED(5) RELOCATED(5)
|
|||||||
in $<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> or $<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
in $<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> or $<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
||||||
|
|
||||||
@<i>domain</i>
|
@<i>domain</i>
|
||||||
Matches every address in <i>domain</i>. This form has the
|
Matches every other address in <i>domain</i>. This form
|
||||||
lowest precedence.
|
has the lowest precedence.
|
||||||
|
|
||||||
<b>ADDRESS EXTENSION</b>
|
<b>ADDRESS EXTENSION</b>
|
||||||
When a mail address localpart contains the optional recip-
|
When a mail address localpart contains the optional recip-
|
||||||
|
@@ -85,28 +85,28 @@ TRANSPORT(5) TRANSPORT(5)
|
|||||||
how or where to deliver mail. This is described in section
|
how or where to deliver mail. This is described in section
|
||||||
"RESULT FORMAT".
|
"RESULT FORMAT".
|
||||||
|
|
||||||
<b>TABLE LOOKUP</b>
|
<b>TABLE SEARCH ORDER</b>
|
||||||
With lookups from indexed files such as DB or DBM, or from
|
With lookups from indexed files such as DB or DBM, or from
|
||||||
networked tables such as NIS, LDAP or SQL, patterns are
|
networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
tried in the order as listed below:
|
tried in the order as listed below:
|
||||||
|
|
||||||
<i>user+extension@domain transport</i>:<i>nexthop</i>
|
<i>user+extension@domain transport</i>:<i>nexthop</i>
|
||||||
Mail for <i>user+extension@domain</i> is delivered through
|
Deliver mail for <i>user+extension@domain</i> through
|
||||||
<i>transport</i> to <i>nexthop</i>.
|
<i>transport</i> to <i>nexthop</i>.
|
||||||
|
|
||||||
<i>user@domain transport</i>:<i>nexthop</i>
|
<i>user@domain transport</i>:<i>nexthop</i>
|
||||||
Mail for <i>user@domain</i> is delivered through <i>transport</i>
|
Deliver mail for <i>user@domain</i> through <i>transport</i> to
|
||||||
to <i>nexthop</i>.
|
|
||||||
|
|
||||||
<i>domain transport</i>:<i>nexthop</i>
|
|
||||||
Mail for <i>domain</i> is delivered through <i>transport</i> to
|
|
||||||
<i>nexthop</i>.
|
<i>nexthop</i>.
|
||||||
|
|
||||||
|
<i>domain transport</i>:<i>nexthop</i>
|
||||||
|
Deliver mail for <i>domain</i> through <i>transport</i> to <i>nex-</i>
|
||||||
|
<i>thop</i>.
|
||||||
|
|
||||||
<i>.domain transport</i>:<i>nexthop</i>
|
<i>.domain transport</i>:<i>nexthop</i>
|
||||||
Mail for any subdomain of <i>domain</i> is delivered
|
Deliver mail for any subdomain of <i>domain</i> through
|
||||||
through <i>transport</i> to <i>nexthop</i>. This applies only
|
<i>transport</i> to <i>nexthop</i>. This applies only when the
|
||||||
when the string <b><a href="postconf.5.html#transport_maps">transport_maps</a></b> is not listed in the
|
string <b><a href="postconf.5.html#transport_maps">transport_maps</a></b> is not listed in the <b>par-</b>
|
||||||
<b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a></b> configuration set-
|
<b>ent_domain_matches_subdomains</b> configuration set-
|
||||||
ting. Otherwise, a domain name matches itself and
|
ting. Otherwise, a domain name matches itself and
|
||||||
its subdomains.
|
its subdomains.
|
||||||
|
|
||||||
|
@@ -77,19 +77,20 @@ VIRTUAL(5) VIRTUAL(5)
|
|||||||
line that starts with whitespace continues a logi-
|
line that starts with whitespace continues a logi-
|
||||||
cal line.
|
cal line.
|
||||||
|
|
||||||
|
<b>TABLE SEARCH ORDER</b>
|
||||||
With lookups from indexed files such as DB or DBM, or from
|
With lookups from indexed files such as DB or DBM, or from
|
||||||
networked tables such as NIS, LDAP or SQL, patterns are
|
networked tables such as NIS, LDAP or SQL, patterns are
|
||||||
tried in the order as listed below:
|
tried in the order as listed below:
|
||||||
|
|
||||||
<i>user</i>@<i>domain address, address, ...</i>
|
<i>user</i>@<i>domain address, address, ...</i>
|
||||||
Mail for <i>user</i>@<i>domain</i> is redirected to <i>address</i>.
|
Redirect mail for <i>user</i>@<i>domain</i> to <i>address</i>. This
|
||||||
This form has the highest precedence.
|
form has the highest precedence.
|
||||||
|
|
||||||
<i>user address, address, ...</i>
|
<i>user address, address, ...</i>
|
||||||
Mail for <i>user</i>@<i>site</i> is redirected to <i>address</i> when
|
Redirect mail for <i>user</i>@<i>site</i> to <i>address</i> when <i>site</i> is
|
||||||
<i>site</i> is equal to $<b><a href="postconf.5.html#myorigin">myorigin</a></b>, when <i>site</i> is listed in
|
equal to $<b><a href="postconf.5.html#myorigin">myorigin</a></b>, when <i>site</i> is listed in $<b><a href="postconf.5.html#mydestination">mydes</a>-</b>
|
||||||
$<b><a href="postconf.5.html#mydestination">mydestination</a></b>, or when it is listed in
|
<b><a href="postconf.5.html#mydestination">tination</a></b>, or when it is listed in $<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b>
|
||||||
$<b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> or $<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
or $<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
|
||||||
|
|
||||||
This functionality overlaps with functionality of
|
This functionality overlaps with functionality of
|
||||||
the local <i>aliases</i>(5) database. The difference is
|
the local <i>aliases</i>(5) database. The difference is
|
||||||
@@ -97,8 +98,8 @@ VIRTUAL(5) VIRTUAL(5)
|
|||||||
addresses.
|
addresses.
|
||||||
|
|
||||||
@<i>domain address, address, ...</i>
|
@<i>domain address, address, ...</i>
|
||||||
Mail for any user in <i>domain</i> is redirected to
|
Redirect mail for other users in <i>domain</i> to <i>address</i>.
|
||||||
<i>address</i>. This form has the lowest precedence.
|
This form has the lowest precedence.
|
||||||
|
|
||||||
In all the above forms, when <i>address</i> has the form @<i>other-</i>
|
In all the above forms, when <i>address</i> has the form @<i>other-</i>
|
||||||
<i>domain</i>, the result is the same user in <i>otherdomain</i>. This
|
<i>domain</i>, the result is the same user in <i>otherdomain</i>. This
|
||||||
@@ -219,8 +220,8 @@ VIRTUAL(5) VIRTUAL(5)
|
|||||||
A list of address rewriting or forwarding mecha-
|
A list of address rewriting or forwarding mecha-
|
||||||
nisms that propagate an address extension from the
|
nisms that propagate an address extension from the
|
||||||
original address to the result. Specify zero or
|
original address to the result. Specify zero or
|
||||||
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>, or
|
more of <b>canonical</b>, <b>virtual</b>, <b>alias</b>, <b>forward</b>,
|
||||||
<b>include</b>.
|
<b>include</b>, or <b>generics</b>.
|
||||||
|
|
||||||
Other parameters of interest:
|
Other parameters of interest:
|
||||||
|
|
||||||
|
@@ -16,7 +16,8 @@ CONFIG = man5/access.5 man5/aliases.5 man5/canonical.5 man5/relocated.5 \
|
|||||||
man5/transport.5 man5/virtual.5 man5/pcre_table.5 man5/regexp_table.5 \
|
man5/transport.5 man5/virtual.5 man5/pcre_table.5 man5/regexp_table.5 \
|
||||||
man5/cidr_table.5 man5/tcp_table.5 man5/header_checks.5 \
|
man5/cidr_table.5 man5/tcp_table.5 man5/header_checks.5 \
|
||||||
man5/body_checks.5 man5/ldap_table.5 man5/mysql_table.5 \
|
man5/body_checks.5 man5/ldap_table.5 man5/mysql_table.5 \
|
||||||
man5/pgsql_table.5 man5/master.5 man5/nisplus_table.5
|
man5/pgsql_table.5 man5/master.5 man5/nisplus_table.5 \
|
||||||
|
man5/generics.5
|
||||||
TOOLS = man1/smtp-sink.1 man1/smtp-source.1 man1/qmqp-sink.1 \
|
TOOLS = man1/smtp-sink.1 man1/smtp-source.1 man1/qmqp-sink.1 \
|
||||||
man1/qmqp-source.1 man1/qshape.1
|
man1/qmqp-source.1 man1/qshape.1
|
||||||
|
|
||||||
@@ -240,6 +241,9 @@ man5/canonical.5: ../proto/canonical
|
|||||||
man5/cidr_table.5: ../proto/cidr_table
|
man5/cidr_table.5: ../proto/cidr_table
|
||||||
../mantools/srctoman - $? >$@
|
../mantools/srctoman - $? >$@
|
||||||
|
|
||||||
|
man5/generics.5: ../proto/generics
|
||||||
|
../mantools/srctoman - $? >$@
|
||||||
|
|
||||||
man5/header_checks.5: ../proto/header_checks
|
man5/header_checks.5: ../proto/header_checks
|
||||||
../mantools/srctoman - $? >$@
|
../mantools/srctoman - $? >$@
|
||||||
|
|
||||||
|
@@ -163,12 +163,15 @@ Commands:
|
|||||||
postalias(1), create/update/query alias database
|
postalias(1), create/update/query alias database
|
||||||
postcat(1), examine Postfix queue file
|
postcat(1), examine Postfix queue file
|
||||||
postconf(1), Postfix configuration utility
|
postconf(1), Postfix configuration utility
|
||||||
|
postfix(1), Postfix control program
|
||||||
postkick(1), trigger Postfix daemon
|
postkick(1), trigger Postfix daemon
|
||||||
postlock(1), Postfix-compatible locking
|
postlock(1), Postfix-compatible locking
|
||||||
postlog(1), Postfix-compatible logging
|
postlog(1), Postfix-compatible logging
|
||||||
postmap(1), Postfix lookup table manager
|
postmap(1), Postfix lookup table manager
|
||||||
postqueue(1), Postfix mail queue control
|
postqueue(1), Postfix mail queue control
|
||||||
postsuper(1), Postfix housekeeping
|
postsuper(1), Postfix housekeeping
|
||||||
|
mailq(1), Sendmail compatibility interface
|
||||||
|
newaliases(1), Sendmail compatibility interface
|
||||||
sendmail(1), Sendmail compatibility interface
|
sendmail(1), Sendmail compatibility interface
|
||||||
|
|
||||||
Postfix configuration:
|
Postfix configuration:
|
||||||
@@ -178,8 +181,9 @@ postconf(5), Postfix main.cf file syntax
|
|||||||
Table-driven mechanisms:
|
Table-driven mechanisms:
|
||||||
access(5), Postfix SMTP access control table
|
access(5), Postfix SMTP access control table
|
||||||
aliases(5), Postfix alias database
|
aliases(5), Postfix alias database
|
||||||
header_checks(5), body_checks(5), content inspection
|
canonical(5), Postfix input address rewriting
|
||||||
canonical(5), Postfix address rewriting
|
generics(5), Postfix output address rewriting
|
||||||
|
header_checks(5), body_checks(5), Postfix content inspection
|
||||||
relocated(5), Users that have moved
|
relocated(5), Users that have moved
|
||||||
transport(5), Postfix routing table
|
transport(5), Postfix routing table
|
||||||
virtual(5), Postfix virtual aliasing
|
virtual(5), Postfix virtual aliasing
|
||||||
|
@@ -137,7 +137,8 @@ owner alias, instead using of the left-hand side address.
|
|||||||
A list of address rewriting or forwarding mechanisms that
|
A list of address rewriting or forwarding mechanisms that
|
||||||
propagate an address extension from the original address
|
propagate an address extension from the original address
|
||||||
to the result. Specify zero or more of \fBcanonical\fR,
|
to the result. Specify zero or more of \fBcanonical\fR,
|
||||||
\fBvirtual\fR, \fBalias\fR, \fBforward\fR, or \fBinclude\fR.
|
\fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR,
|
||||||
|
or \fBgenerics\fR.
|
||||||
.IP \fBowner_request_special\fR
|
.IP \fBowner_request_special\fR
|
||||||
Give special treatment to \fBowner-\fIlistname\fR and
|
Give special treatment to \fBowner-\fIlistname\fR and
|
||||||
\fIlistname\fB-request\fR
|
\fIlistname\fB-request\fR
|
||||||
|
@@ -18,7 +18,8 @@ Postfix canonical table format
|
|||||||
.fi
|
.fi
|
||||||
The optional \fBcanonical\fR(5) table specifies an address mapping for
|
The optional \fBcanonical\fR(5) table specifies an address mapping for
|
||||||
local and non-local addresses. The mapping is used by the
|
local and non-local addresses. The mapping is used by the
|
||||||
\fBcleanup\fR(8) daemon. The address mapping is recursive.
|
\fBcleanup\fR(8) daemon, before mail is stored into the
|
||||||
|
queue. The address mapping is recursive.
|
||||||
|
|
||||||
Normally, the \fBcanonical\fR(5) table is specified as a text file
|
Normally, the \fBcanonical\fR(5) table is specified as a text file
|
||||||
that serves as input to the \fBpostmap\fR(1) command.
|
that serves as input to the \fBpostmap\fR(1) command.
|
||||||
@@ -57,7 +58,7 @@ Use the \fBaliases\fR(5) map for that purpose.
|
|||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
.fi
|
.fi
|
||||||
make# The input format for the \fBpostmap\fR(1) command is as follows:
|
The input format for the \fBpostmap\fR(1) command is as follows:
|
||||||
.IP "\fIpattern result\fR"
|
.IP "\fIpattern result\fR"
|
||||||
When \fIpattern\fR matches a mail address, replace it by the
|
When \fIpattern\fR matches a mail address, replace it by the
|
||||||
corresponding \fIresult\fR.
|
corresponding \fIresult\fR.
|
||||||
@@ -67,19 +68,23 @@ are lines whose first non-whitespace character is a `#'.
|
|||||||
.IP "multi-line text"
|
.IP "multi-line text"
|
||||||
A logical line starts with non-whitespace text. A line that
|
A logical line starts with non-whitespace text. A line that
|
||||||
starts with whitespace continues a logical line.
|
starts with whitespace continues a logical line.
|
||||||
.PP
|
.SH "TABLE SEARCH ORDER"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
With lookups from indexed files such as DB or DBM, or from networked
|
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
|
tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
listed below:
|
listed below:
|
||||||
.IP "\fIuser\fR@\fIdomain address\fR"
|
.IP "\fIuser\fR@\fIdomain address\fR"
|
||||||
\fIuser\fR@\fIdomain\fR is replaced by \fIaddress\fR. This form
|
Replace \fIuser\fR@\fIdomain\fR by \fIaddress\fR. This form
|
||||||
has the highest precedence.
|
has the highest precedence.
|
||||||
.sp
|
.sp
|
||||||
This is useful to clean up addresses produced by legacy mail systems.
|
This is useful to clean up addresses produced by legacy mail systems.
|
||||||
It can also be used to produce \fIFirstname.Lastname\fR style
|
It can also be used to produce \fIFirstname.Lastname\fR style
|
||||||
addresses, but see below for a simpler solution.
|
addresses, but see below for a simpler solution.
|
||||||
.IP "\fIuser address\fR"
|
.IP "\fIuser address\fR"
|
||||||
\fIuser\fR@\fIsite\fR is replaced by \fIaddress\fR when \fIsite\fR is
|
Replace \fIuser\fR@\fIsite\fR by \fIaddress\fR when \fIsite\fR is
|
||||||
equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
||||||
$\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
$\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
||||||
or $\fBproxy_interfaces\fR.
|
or $\fBproxy_interfaces\fR.
|
||||||
@@ -87,7 +92,7 @@ or $\fBproxy_interfaces\fR.
|
|||||||
This form is useful for replacing login names by
|
This form is useful for replacing login names by
|
||||||
\fIFirstname.Lastname\fR.
|
\fIFirstname.Lastname\fR.
|
||||||
.IP "@\fIdomain address\fR"
|
.IP "@\fIdomain address\fR"
|
||||||
Every address in \fIdomain\fR is replaced by \fIaddress\fR.
|
Replace other addresses in \fIdomain\fR by \fIaddress\fR.
|
||||||
This form has the lowest precedence.
|
This form has the lowest precedence.
|
||||||
.PP
|
.PP
|
||||||
In all the above forms, when \fIaddress\fR has the form
|
In all the above forms, when \fIaddress\fR has the form
|
||||||
@@ -168,7 +173,7 @@ addresses.
|
|||||||
A list of address rewriting or forwarding mechanisms that propagate
|
A list of address rewriting or forwarding mechanisms that propagate
|
||||||
an address extension from the original address to the result.
|
an address extension from the original address to the result.
|
||||||
Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
\fBforward\fR, or \fBinclude\fR.
|
\fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
|
||||||
.PP
|
.PP
|
||||||
Other parameters of interest:
|
Other parameters of interest:
|
||||||
.IP \fBinet_interfaces\fR
|
.IP \fBinet_interfaces\fR
|
||||||
|
@@ -57,7 +57,7 @@ are lines whose first non-whitespace character is a `#'.
|
|||||||
.IP "multi-line text"
|
.IP "multi-line text"
|
||||||
A logical line starts with non-whitespace text. A line that
|
A logical line starts with non-whitespace text. A line that
|
||||||
starts with whitespace continues a logical line.
|
starts with whitespace continues a logical line.
|
||||||
.SH "SEARCH ORDER"
|
.SH "TABLE SEARCH ORDER"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
|
244
postfix/man/man5/generics.5
Normal file
244
postfix/man/man5/generics.5
Normal file
@@ -0,0 +1,244 @@
|
|||||||
|
.TH GENERICS 5
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
.SH NAME
|
||||||
|
generics
|
||||||
|
\-
|
||||||
|
Postfix generics table format
|
||||||
|
.SH "SYNOPSIS"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
\fBpostmap /etc/postfix/generics\fR
|
||||||
|
|
||||||
|
\fBpostmap -q "\fIstring\fB" /etc/postfix/generics\fR
|
||||||
|
|
||||||
|
\fBpostmap -q - /etc/postfix/generics <\fIinputfile\fR
|
||||||
|
.SH DESCRIPTION
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
The optional \fBgenerics\fR(5) table specifies an address
|
||||||
|
mapping that applies when mail is delivered. This is the
|
||||||
|
opposite of \fBcanonical\fR(5) mapping, which applies when
|
||||||
|
mail is received.
|
||||||
|
|
||||||
|
Typically, one would use the \fBgenerics\fR(5) table on a
|
||||||
|
system that does not have a valid Internet domain name and
|
||||||
|
that uses something like \fIlocaldomain.local\fR instead.
|
||||||
|
The \fBgenerics\fR(5) table is then used by the \fBsmtp\fR(8)
|
||||||
|
client to transform local mail addresses into valid Internet
|
||||||
|
mail addresses when mail has to be sent across the Internet.
|
||||||
|
See the EXAMPLE section at the end of this document.
|
||||||
|
|
||||||
|
The \fBgenerics\fR(5) mapping affects both message header
|
||||||
|
addresses (i.e. addresses that appear inside messages) and
|
||||||
|
message envelope addresses (for example, the addresses that
|
||||||
|
are used in SMTP protocol commands).
|
||||||
|
|
||||||
|
Normally, the \fBgenerics\fR(5) 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/generics\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, or lookups
|
||||||
|
can be directed to TCP-based server. In that case, the lookups are
|
||||||
|
done in a slightly different way as described below under
|
||||||
|
"REGULAR EXPRESSION TABLES" and "TCP-BASED TABLES".
|
||||||
|
.SH "TABLE FORMAT"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
The input format for the \fBpostmap\fR(1) command is as follows:
|
||||||
|
.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.
|
||||||
|
.SH "TABLE SEARCH ORDER"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
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\fR"
|
||||||
|
Replace \fIuser\fR@\fIdomain\fR by \fIaddress\fR. This form
|
||||||
|
has the highest precedence.
|
||||||
|
.IP "\fIuser address\fR"
|
||||||
|
Replace \fIuser\fR@\fIsite\fR by \fIaddress\fR when \fIsite\fR is
|
||||||
|
equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
||||||
|
$\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
||||||
|
or $\fBproxy_interfaces\fR.
|
||||||
|
.IP "@\fIdomain address\fR"
|
||||||
|
Replace other addresses in \fIdomain\fR by \fIaddress\fR.
|
||||||
|
This form has the lowest precedence.
|
||||||
|
.PP
|
||||||
|
In all the above forms, the result \fIaddress\fR must have
|
||||||
|
the form \fIusername@domainname\fR.
|
||||||
|
.SH "ADDRESS EXTENSION"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.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.
|
||||||
|
|
||||||
|
The \fBpropagate_unmatched_extensions\fR parameter controls whether
|
||||||
|
an unmatched address extension (\fI+foo\fR) is propagated to the
|
||||||
|
result of table lookup.
|
||||||
|
.SH "REGULAR EXPRESSION TABLES"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.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.
|
||||||
|
.SH "TCP-BASED TABLES"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
This section describes how the table lookups change when lookups
|
||||||
|
are directed to a TCP-based server. For a description of the TCP
|
||||||
|
client/server lookup protocol, see \fBtcp_table\fR(5).
|
||||||
|
This feature is not available up to and including Postfix version 2.2.
|
||||||
|
|
||||||
|
Each lookup operation uses the entire address once. 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.
|
||||||
|
|
||||||
|
Results are the same as with indexed file lookups.
|
||||||
|
.SH "EXAMPLE"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
The following shows a generic mapping with an indexed file.
|
||||||
|
When mail is sent to a remote host via SMTP, this replaces
|
||||||
|
\fIhis@localdomain.local\fR by his ISP mail address, replaces
|
||||||
|
\fIher@localdomain.local\fR by her ISP mail address, and
|
||||||
|
replaces other local addresses by his ISP account, with
|
||||||
|
an address extension of \fI+local\fR (this example assumes
|
||||||
|
that the ISP supports "+" style address extensions).
|
||||||
|
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
/etc/postfix/main.cf:
|
||||||
|
.in +4
|
||||||
|
smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
.in -4
|
||||||
|
|
||||||
|
/etc/postfix/generics:
|
||||||
|
.in +4
|
||||||
|
his@localdomain.local hisaccount@hisisp.example
|
||||||
|
her@localdomain.local heraccount@herisp.example
|
||||||
|
@localdomain.local hisaccount+local@hisisp.example
|
||||||
|
.in -4
|
||||||
|
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
Execute the command "\fBpostmap /etc/postfix/generics\fR"
|
||||||
|
whenever the table is changed. Instead of \fBhash\fR, some
|
||||||
|
systems use \fBdbm\fR database files. To find out what
|
||||||
|
tables your system supports use the command "\fBpostconf
|
||||||
|
-m\fR".
|
||||||
|
.SH BUGS
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
The table format does not understand quoting conventions.
|
||||||
|
.SH "CONFIGURATION PARAMETERS"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
The following \fBmain.cf\fR parameters are especially relevant.
|
||||||
|
The text below provides only a parameter summary. See
|
||||||
|
\fBpostconf\fR(5) for more details including examples.
|
||||||
|
.IP \fBsmtp_generics_maps\fR
|
||||||
|
Address mapping lookup table for envelope and header sender
|
||||||
|
and recipient addresses while delivering mail via SMTP.
|
||||||
|
.IP \fBpropagate_unmatched_extensions\fR
|
||||||
|
A list of address rewriting or forwarding mechanisms that propagate
|
||||||
|
an address extension from the original address to the result.
|
||||||
|
Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
|
\fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
|
||||||
|
.PP
|
||||||
|
Other parameters of interest:
|
||||||
|
.IP \fBinet_interfaces\fR
|
||||||
|
The network interface addresses that this system receives mail on.
|
||||||
|
You need to stop and start Postfix when this parameter changes.
|
||||||
|
.IP \fBproxy_interfaces\fR
|
||||||
|
Other interfaces that this machine receives mail on by way of a
|
||||||
|
proxy agent or network address translator.
|
||||||
|
.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.
|
||||||
|
.SH "SEE ALSO"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
postmap(1), Postfix lookup table manager
|
||||||
|
postconf(5), configuration parameters
|
||||||
|
smtp(8), Postfix SMTP client
|
||||||
|
.SH "README FILES"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
Use "\fBpostconf readme_directory\fR" or
|
||||||
|
"\fBpostconf html_directory\fR" to locate this information.
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
DATABASE_README, Postfix lookup table overview
|
||||||
|
ADDRESS_REWRITING_README, address rewriting guide
|
||||||
|
.SH "LICENSE"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
|
The Secure Mailer license must be distributed with this software.
|
||||||
|
.SH "HISTORY"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
A genericstable feature appears in the Sendmail MTA.
|
||||||
|
|
||||||
|
This feature is available in Postfix 2.2 and later.
|
||||||
|
.SH "AUTHOR(S)"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
Wietse Venema
|
||||||
|
IBM T.J. Watson Research
|
||||||
|
P.O. Box 704
|
||||||
|
Yorktown Heights, NY 10598, USA
|
@@ -3246,21 +3246,10 @@ This is needed when the local machine does not have its own Internet
|
|||||||
domain name, but uses something like \fIlocaldomain.local\fR
|
domain name, but uses something like \fIlocaldomain.local\fR
|
||||||
instead.
|
instead.
|
||||||
.PP
|
.PP
|
||||||
The table search order is described below. The search terminates
|
The table format and lookups are documented in \fBgenerics\fR(5);
|
||||||
when a match is found. In other words, the search is non-recursive.
|
examples are shown in the ADDRESS_REWRITING_README and
|
||||||
.IP "\fIuser@domain.tld address\fR"
|
STANDARD_CONFIGURATION_README documents.
|
||||||
Replace \fIuser@domain.tld\fR by \fIaddress\fR. This
|
|
||||||
form has the highest precedence.
|
|
||||||
.IP "\fIuser address\fR"
|
|
||||||
Replace \fIuser@site\fR by \fIaddress\fR when \fIsite\fR is
|
|
||||||
equal to $myorigin, when \fIsite\fR is listed in $mydestination,
|
|
||||||
or when it matches $inet_interfaces or $proxy_interfaces.
|
|
||||||
.IP "\fI@domain.tld address\fR"
|
|
||||||
Replace all other addresses in \fIdomain.tld\fR by
|
|
||||||
\fIaddress\fR. This form has the lowest preference.
|
|
||||||
.PP
|
.PP
|
||||||
In all cases \fIaddress\fR must specify a username and a
|
|
||||||
domain.
|
|
||||||
This feature is available in Postfix 2.2 and later.
|
This feature is available in Postfix 2.2 and later.
|
||||||
.SH smtp_helo_name (default: $myhostname)
|
.SH smtp_helo_name (default: $myhostname)
|
||||||
The hostname to send in the SMTP EHLO or HELO command.
|
The hostname to send in the SMTP EHLO or HELO command.
|
||||||
|
@@ -51,7 +51,11 @@ are lines whose first non-whitespace character is a `#'.
|
|||||||
.IP \(bu
|
.IP \(bu
|
||||||
A logical line starts with non-whitespace text. A line that
|
A logical line starts with non-whitespace text. A line that
|
||||||
starts with whitespace continues a logical line.
|
starts with whitespace continues a logical line.
|
||||||
.PP
|
.SH "TABLE SEARCH ORDER"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
With lookups from indexed files such as DB or DBM, or from networked
|
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
|
tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
listed below:
|
listed below:
|
||||||
@@ -63,7 +67,7 @@ Matches \fIuser\fR@\fIsite\fR when \fIsite\fR is $\fBmyorigin\fR,
|
|||||||
when \fIsite\fR is listed in $\fBmydestination\fR, or when \fIsite\fR
|
when \fIsite\fR is listed in $\fBmydestination\fR, or when \fIsite\fR
|
||||||
is listed in $\fBinet_interfaces\fR or $\fBproxy_interfaces\fR.
|
is listed in $\fBinet_interfaces\fR or $\fBproxy_interfaces\fR.
|
||||||
.IP @\fIdomain\fR
|
.IP @\fIdomain\fR
|
||||||
Matches every address in \fIdomain\fR. This form has the lowest
|
Matches every other address in \fIdomain\fR. This form has the lowest
|
||||||
precedence.
|
precedence.
|
||||||
.SH "ADDRESS EXTENSION"
|
.SH "ADDRESS EXTENSION"
|
||||||
.na
|
.na
|
||||||
|
@@ -73,7 +73,7 @@ a domain name hierarchy, as described in section "TABLE LOOKUP".
|
|||||||
The \fIresult\fR is of the form \fItransport:nexthop\fR and
|
The \fIresult\fR is of the form \fItransport:nexthop\fR and
|
||||||
specifies how or where to deliver mail. This is described in
|
specifies how or where to deliver mail. This is described in
|
||||||
section "RESULT FORMAT".
|
section "RESULT FORMAT".
|
||||||
.SH "TABLE LOOKUP"
|
.SH "TABLE SEARCH ORDER"
|
||||||
.na
|
.na
|
||||||
.nf
|
.nf
|
||||||
.ad
|
.ad
|
||||||
@@ -82,17 +82,17 @@ 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
|
tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
listed below:
|
listed below:
|
||||||
.IP "\fIuser+extension@domain transport\fR:\fInexthop\fR"
|
.IP "\fIuser+extension@domain transport\fR:\fInexthop\fR"
|
||||||
Mail for \fIuser+extension@domain\fR is delivered through
|
Deliver mail for \fIuser+extension@domain\fR through
|
||||||
\fItransport\fR to
|
\fItransport\fR to
|
||||||
\fInexthop\fR.
|
\fInexthop\fR.
|
||||||
.IP "\fIuser@domain transport\fR:\fInexthop\fR"
|
.IP "\fIuser@domain transport\fR:\fInexthop\fR"
|
||||||
Mail for \fIuser@domain\fR is delivered through \fItransport\fR to
|
Deliver mail for \fIuser@domain\fR through \fItransport\fR to
|
||||||
\fInexthop\fR.
|
\fInexthop\fR.
|
||||||
.IP "\fIdomain transport\fR:\fInexthop\fR"
|
.IP "\fIdomain transport\fR:\fInexthop\fR"
|
||||||
Mail for \fIdomain\fR is delivered through \fItransport\fR to
|
Deliver mail for \fIdomain\fR through \fItransport\fR to
|
||||||
\fInexthop\fR.
|
\fInexthop\fR.
|
||||||
.IP "\fI.domain transport\fR:\fInexthop\fR"
|
.IP "\fI.domain transport\fR:\fInexthop\fR"
|
||||||
Mail for any subdomain of \fIdomain\fR is delivered through
|
Deliver mail for any subdomain of \fIdomain\fR through
|
||||||
\fItransport\fR to \fInexthop\fR. This applies only when the
|
\fItransport\fR to \fInexthop\fR. This applies only when the
|
||||||
string \fBtransport_maps\fR is not listed in the
|
string \fBtransport_maps\fR is not listed in the
|
||||||
\fBparent_domain_matches_subdomains\fR configuration setting.
|
\fBparent_domain_matches_subdomains\fR configuration setting.
|
||||||
|
@@ -67,15 +67,19 @@ are lines whose first non-whitespace character is a `#'.
|
|||||||
.IP "multi-line text"
|
.IP "multi-line text"
|
||||||
A logical line starts with non-whitespace text. A line that
|
A logical line starts with non-whitespace text. A line that
|
||||||
starts with whitespace continues a logical line.
|
starts with whitespace continues a logical line.
|
||||||
.PP
|
.SH "TABLE SEARCH ORDER"
|
||||||
|
.na
|
||||||
|
.nf
|
||||||
|
.ad
|
||||||
|
.fi
|
||||||
With lookups from indexed files such as DB or DBM, or from networked
|
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
|
tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
listed below:
|
listed below:
|
||||||
.IP "\fIuser\fR@\fIdomain address, address, ...\fR"
|
.IP "\fIuser\fR@\fIdomain address, address, ...\fR"
|
||||||
Mail for \fIuser\fR@\fIdomain\fR is redirected to \fIaddress\fR.
|
Redirect mail for \fIuser\fR@\fIdomain\fR to \fIaddress\fR.
|
||||||
This form has the highest precedence.
|
This form has the highest precedence.
|
||||||
.IP "\fIuser address, address, ...\fR"
|
.IP "\fIuser address, address, ...\fR"
|
||||||
Mail for \fIuser\fR@\fIsite\fR is redirected to \fIaddress\fR when
|
Redirect mail for \fIuser\fR@\fIsite\fR to \fIaddress\fR when
|
||||||
\fIsite\fR is equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
\fIsite\fR is equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
||||||
$\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
$\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
||||||
or $\fBproxy_interfaces\fR.
|
or $\fBproxy_interfaces\fR.
|
||||||
@@ -84,7 +88,7 @@ This functionality overlaps with functionality of the local
|
|||||||
\fIaliases\fR(5) database. The difference is that \fBvirtual\fR(5)
|
\fIaliases\fR(5) database. The difference is that \fBvirtual\fR(5)
|
||||||
mapping can be applied to non-local addresses.
|
mapping can be applied to non-local addresses.
|
||||||
.IP "@\fIdomain address, address, ...\fR"
|
.IP "@\fIdomain address, address, ...\fR"
|
||||||
Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR.
|
Redirect mail for other users in \fIdomain\fR to \fIaddress\fR.
|
||||||
This form has the lowest precedence.
|
This form has the lowest precedence.
|
||||||
.PP
|
.PP
|
||||||
In all the above forms, when \fIaddress\fR has the form
|
In all the above forms, when \fIaddress\fR has the form
|
||||||
@@ -221,7 +225,7 @@ as the \fBmydestination\fR parameter.
|
|||||||
A list of address rewriting or forwarding mechanisms that propagate
|
A list of address rewriting or forwarding mechanisms that propagate
|
||||||
an address extension from the original address to the result.
|
an address extension from the original address to the result.
|
||||||
Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
\fBforward\fR, or \fBinclude\fR.
|
\fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
|
||||||
.PP
|
.PP
|
||||||
Other parameters of interest:
|
Other parameters of interest:
|
||||||
.IP \fBinet_interfaces\fR
|
.IP \fBinet_interfaces\fR
|
||||||
|
@@ -103,3 +103,11 @@ man/man1/postfix.1:44:.IP \fBflush\fR
|
|||||||
man/man8/oqmgr.8:55:.IP \fBbounce\fR
|
man/man8/oqmgr.8:55:.IP \fBbounce\fR
|
||||||
man/man8/qmgr.8:55:.IP \fBbounce\fR
|
man/man8/qmgr.8:55:.IP \fBbounce\fR
|
||||||
man/man8/trivial-rewrite.8:21:.IP \fBlocal\fR
|
man/man8/trivial-rewrite.8:21:.IP \fBlocal\fR
|
||||||
|
man/man5/aliases.5:140:\fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR,
|
||||||
|
man/man5/canonical.5:171:Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
|
man/man5/generics.5:11:\fBpostmap /etc/postfix/generics\fR
|
||||||
|
man/man5/generics.5:13:\fBpostmap -q "\fIstring\fB" /etc/postfix/generics\fR
|
||||||
|
man/man5/generics.5:15:\fBpostmap -q - /etc/postfix/generics <\fIinputfile\fR
|
||||||
|
man/man5/generics.5:189:Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
|
man/man5/postconf.5:2446:and \fBvirtual\fR is likely to cause problems when mail is forwarded
|
||||||
|
man/man5/postconf.5:4575:is \fBsmtpd\fR, corresponding to a SASL configuration file named
|
||||||
|
@@ -552,7 +552,7 @@ while (<>) {
|
|||||||
s/[<bB>]*access[<\/bB>]*\(5\)/<a href="access.5.html">$&<\/a>/g;
|
s/[<bB>]*access[<\/bB>]*\(5\)/<a href="access.5.html">$&<\/a>/g;
|
||||||
s/[<bB>]*aliases[<\/bB>]*\(5\)/<a href="aliases.5.html">$&<\/a>/g;
|
s/[<bB>]*aliases[<\/bB>]*\(5\)/<a href="aliases.5.html">$&<\/a>/g;
|
||||||
s/[<bB>]*canonical[<\/bB>]*\(5\)/<a href="canonical.5.html">$&<\/a>/g;
|
s/[<bB>]*canonical[<\/bB>]*\(5\)/<a href="canonical.5.html">$&<\/a>/g;
|
||||||
s/[<bB>]*etrn[<\/bB>]*\(5\)/<a href="etrn.5.html">$&<\/a>/g;
|
s/[<bB>]*gener[-<\/bB>]*\n* *[<bB>]*ics[<\/bB>]*\(5\)/<a href="generics.5.html">$&<\/a>/g;
|
||||||
s/[<bB>]*ldap[<\/bBiI>]*_[<\/iIbB>]*table[<\/bB>]*\(5\)/<a href="ldap_table.5.html">$&<\/a>/g;
|
s/[<bB>]*ldap[<\/bBiI>]*_[<\/iIbB>]*table[<\/bB>]*\(5\)/<a href="ldap_table.5.html">$&<\/a>/g;
|
||||||
s/[<bB>]*mas[-<\/bB>]*\n* *[<bB>]*ter[<\/bB>]*\(5\)/<a href="master.5.html">$&<\/a>/g;
|
s/[<bB>]*mas[-<\/bB>]*\n* *[<bB>]*ter[<\/bB>]*\(5\)/<a href="master.5.html">$&<\/a>/g;
|
||||||
s/[<bB>]*mysql[<\/bBiI>]*_[<\/iIbB>]*table[<\/bB>]*\(5\)/<a href="mysql_table.5.html">$&<\/a>/g;
|
s/[<bB>]*mysql[<\/bBiI>]*_[<\/iIbB>]*table[<\/bB>]*\(5\)/<a href="mysql_table.5.html">$&<\/a>/g;
|
||||||
|
@@ -946,11 +946,12 @@ a name such as <i>localdomain.local</i>. This can be a problem when
|
|||||||
you want to send mail over the Internet, because many mail servers
|
you want to send mail over the Internet, because many mail servers
|
||||||
reject mail addresses with invalid domain names. </p>
|
reject mail addresses with invalid domain names. </p>
|
||||||
|
|
||||||
<p> With the smtp_generics_maps parameter you can specify lookup
|
<p> With the smtp_generics_maps parameter you can specify generics(5)
|
||||||
tables that replace local mail addresses by valid Internet addresses
|
lookup tables that replace local mail addresses by valid Internet
|
||||||
when mail leaves the machine via SMTP. This mapping replaces envelope
|
addresses when mail leaves the machine via SMTP. The generics(5)
|
||||||
and header addresses, and is non-recursive. It does not happen when
|
mapping replaces envelope and header addresses, and is non-recursive.
|
||||||
you send mail between addresses on the local machine. </p>
|
It does not happen when you send mail between addresses on the
|
||||||
|
local machine. </p>
|
||||||
|
|
||||||
<p> This feature is available in Postfix version 2.2 and later.</p>
|
<p> This feature is available in Postfix version 2.2 and later.</p>
|
||||||
|
|
||||||
@@ -962,18 +963,18 @@ you send mail between addresses on the local machine. </p>
|
|||||||
smtp_generics_maps = hash:/etc/postfix/generics
|
smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
|
||||||
/etc/postfix/generics:
|
/etc/postfix/generics:
|
||||||
you@localdomain.local youraccount@yourisp.example
|
his@localdomain.local hisaccount@hisisp.example
|
||||||
her@localdomain.local heraccount@herisp.example
|
her@localdomain.local heraccount@herisp.example
|
||||||
@localdomain.local youraccount+local@yourisp.example
|
@localdomain.local hisaccount+local@hisisp.example
|
||||||
</pre>
|
</pre>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> When mail is sent to a remote host via SMTP, this replaces your
|
<p> When mail is sent to a remote host via SMTP, this replaces
|
||||||
local mail address <i>you@localdomain.local</i> by your ISP mail
|
<i>his@localdomain.local</i> by his ISP mail address, replaces
|
||||||
address, replaces <i>her@localdomain.local</i> by her ISP mail
|
<i>her@localdomain.local</i> by her ISP mail address, and replaces
|
||||||
address, and replaces all other local addresses by your ISP account,
|
other local addresses by his ISP account, with an address extension
|
||||||
with an address extension of +<i>local</i> (this example assumes
|
of +<i>local</i> (this example assumes that the ISP supports "+"
|
||||||
that the ISP supports "+" style address extensions). </p>
|
style address extensions). </p>
|
||||||
|
|
||||||
<h3> <a name="aliases"> Local alias database </a> </h3>
|
<h3> <a name="aliases"> Local alias database </a> </h3>
|
||||||
|
|
||||||
|
@@ -3,7 +3,8 @@ SHELL = /bin/sh
|
|||||||
# For now, just hard-coded rules.
|
# For now, just hard-coded rules.
|
||||||
|
|
||||||
CONFIG = ../conf/access ../conf/aliases ../conf/canonical ../conf/relocated \
|
CONFIG = ../conf/access ../conf/aliases ../conf/canonical ../conf/relocated \
|
||||||
../conf/transport ../conf/virtual ../conf/header_checks
|
../conf/transport ../conf/virtual ../conf/header_checks \
|
||||||
|
../conf/generics
|
||||||
|
|
||||||
HTML = ../html/ADDRESS_CLASS_README.html \
|
HTML = ../html/ADDRESS_CLASS_README.html \
|
||||||
../html/ADDRESS_REWRITING_README.html \
|
../html/ADDRESS_REWRITING_README.html \
|
||||||
@@ -104,6 +105,9 @@ clobber:
|
|||||||
../conf/canonical: canonical
|
../conf/canonical: canonical
|
||||||
$(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
|
$(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
|
||||||
|
|
||||||
|
../conf/generics: generics
|
||||||
|
$(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
|
||||||
|
|
||||||
../conf/header_checks: header_checks
|
../conf/header_checks: header_checks
|
||||||
$(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
|
$(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
|
||||||
|
|
||||||
|
@@ -56,7 +56,7 @@ site</a>
|
|||||||
<li><a href="#dialup">Postfix on a dialup machine</a>
|
<li><a href="#dialup">Postfix on a dialup machine</a>
|
||||||
|
|
||||||
<li><a href="#fantasy">Postfix on hosts without a real
|
<li><a href="#fantasy">Postfix on hosts without a real
|
||||||
hostname</a>
|
Internet hostname</a>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ what is covered in the BASIC_CONFIGURATION_README document: </p>
|
|||||||
</blockquote>
|
</blockquote>
|
||||||
|
|
||||||
<p> See also the section "<a href="#fantasy">Postfix on hosts without
|
<p> See also the section "<a href="#fantasy">Postfix on hosts without
|
||||||
a real hostname</a>" if this is applicable to your configuration.
|
a real Internet hostname</a>" if this is applicable to your configuration.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<h2><a name="null_client">Postfix on a null client</a></h2>
|
<h2><a name="null_client">Postfix on a null client</a></h2>
|
||||||
@@ -610,10 +610,10 @@ href="#local_network">local area network</a> section above. </p>
|
|||||||
combine this with basic configuration information as discussed the
|
combine this with basic configuration information as discussed the
|
||||||
first half of this document. </p>
|
first half of this document. </p>
|
||||||
|
|
||||||
<p> If you do not have your own hostname (as with dynamic IP
|
<p> If you do not have your own hostname and IP address (usually
|
||||||
addressing) then you should also study the section on "<a
|
with dialup, cable TV or DSL connections) then you should also
|
||||||
href="#fantasy">Postfix on hosts without a real hostname</a>".
|
study the section on "<a href="#fantasy">Postfix on hosts without
|
||||||
</p>
|
a real Internet hostname</a>". </p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
@@ -689,23 +689,71 @@ newly-posted mail is flushed from the queue. </p>
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h2><a name="fantasy">Postfix on hosts without a real hostname</a></h2>
|
<h2><a name="fantasy">Postfix on hosts without a real Internet
|
||||||
|
hostname</a></h2>
|
||||||
|
|
||||||
<p> This section is for hosts that don't have an Internet hostname.
|
<p> This section is for hosts that don't have their own Internet
|
||||||
Typically these are systems that get a dynamic IP address via DHCP
|
hostname. Typically these are systems that get a dynamic IP address
|
||||||
or via dialup. Postfix will let you send and receive mail just fine
|
via DHCP or via dialup. Postfix will let you send and receive mail
|
||||||
between accounts on a machine with a fantasy name. However, you
|
just fine between accounts on a machine with a fantasy name. However,
|
||||||
cannot use a fantasy hostname in your email address when sending
|
you cannot use a fantasy hostname in your email address when sending
|
||||||
mail into the Internet, because no-one would be able to reply to
|
mail into the Internet, because no-one would be able to reply to
|
||||||
your mail. In fact, more and more sites refuse mail from non-existent
|
your mail. In fact, more and more sites refuse mail addresses with
|
||||||
domain names. </p>
|
non-existent domain names. </p>
|
||||||
|
|
||||||
<p> The perfect solution would be for Postfix to do a mapping from
|
<p> Note: the following information is Postfix version dependent.
|
||||||
local fantasy email addresses to valid Internet addresses when mail
|
To find out what Postfix version you have, execute the command
|
||||||
leaves the machine (similar to Sendmail's generics table). This is
|
"<b>postconf mail_version</b>". </p>
|
||||||
planned for the near future. </p>
|
|
||||||
|
|
||||||
<p> In the mean time, the solution with Postfix is to use valid
|
<h3>Postfix version 2.2 and later </h3>
|
||||||
|
|
||||||
|
<p> Postfix 2.2 uses the generics(5) address mapping to replace
|
||||||
|
local fantasy email addresses by valid Internet addresses. This
|
||||||
|
mapping happens ONLY when mail leaves the machine; not when you
|
||||||
|
send mail between users on the same machine. </p>
|
||||||
|
|
||||||
|
<p> The following example presents additional configuration. You
|
||||||
|
need to combine this with basic configuration information as
|
||||||
|
discussed the first half of this document. </p>
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<pre>
|
||||||
|
1 /etc/postfix/main.cf:
|
||||||
|
2 smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
3
|
||||||
|
4 /etc/postfix/generics:
|
||||||
|
5 his@localdomain.local hisaccount@hisisp.example
|
||||||
|
6 her@localdomain.local heraccount@herisp.example
|
||||||
|
7 @localdomain.local hisaccount+local@hisisp.example
|
||||||
|
</pre>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
<p> When mail is sent to a remote host via SMTP: </p>
|
||||||
|
|
||||||
|
<ul>
|
||||||
|
|
||||||
|
<li> <p> Line 5 replaces <i>his@localdomain.local</i> by his ISP
|
||||||
|
mail address, </p>
|
||||||
|
|
||||||
|
<li> <p> Line 6 replaces <i>her@localdomain.local</i> by her ISP
|
||||||
|
mail address, and </p>
|
||||||
|
|
||||||
|
<li> <p> Line 7 replaces other local addresses by his ISP account,
|
||||||
|
with an address extension of +<i>local</i> (this example assumes
|
||||||
|
that the ISP supports "+" style address extensions). </p>
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<p>Specify <b>dbm</b> instead of <b>hash</b> if your system uses
|
||||||
|
<b>dbm</b> files instead of <b>db</b> files. To find out what lookup
|
||||||
|
tables Postfix supports, use the command "<b>postconf -m</b>". </p>
|
||||||
|
|
||||||
|
<p> Execute the command "<b>postmap /etc/postfix/generics</b>"
|
||||||
|
whenever you change the generics table. </p>
|
||||||
|
|
||||||
|
<h3>Postfix version 2.1 and earlier </h3>
|
||||||
|
|
||||||
|
<p> The solution with older Postfix systems is to use valid
|
||||||
Internet addresses where possible, and to let Postfix map valid
|
Internet addresses where possible, and to let Postfix map valid
|
||||||
Internet addresses to local fantasy addresses. With this, you can
|
Internet addresses to local fantasy addresses. With this, you can
|
||||||
send mail to the Internet and to local fantasy addresses, including
|
send mail to the Internet and to local fantasy addresses, including
|
||||||
@@ -753,6 +801,16 @@ but is convenient.
|
|||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<p>Specify <b>dbm</b> instead of <b>hash</b> if your system uses
|
||||||
|
<b>dbm</b> files instead of <b>db</b> files. To find out what lookup
|
||||||
|
tables Postfix supports, use the command "<b>postconf -m</b>". </p>
|
||||||
|
|
||||||
|
<p> Execute the command "<b>postmap /etc/postfix/canonical</b>"
|
||||||
|
whenever you change the canonical table. </p>
|
||||||
|
|
||||||
|
<p> Execute the command "<b>postmap /etc/postfix/virtual</b>"
|
||||||
|
whenever you change the virtual table. </p>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
@@ -125,7 +125,8 @@
|
|||||||
# A list of address rewriting or forwarding mechanisms that
|
# A list of address rewriting or forwarding mechanisms that
|
||||||
# propagate an address extension from the original address
|
# propagate an address extension from the original address
|
||||||
# to the result. Specify zero or more of \fBcanonical\fR,
|
# to the result. Specify zero or more of \fBcanonical\fR,
|
||||||
# \fBvirtual\fR, \fBalias\fR, \fBforward\fR, or \fBinclude\fR.
|
# \fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR,
|
||||||
|
# or \fBgenerics\fR.
|
||||||
# .IP \fBowner_request_special\fR
|
# .IP \fBowner_request_special\fR
|
||||||
# Give special treatment to \fBowner-\fIlistname\fR and
|
# Give special treatment to \fBowner-\fIlistname\fR and
|
||||||
# \fIlistname\fB-request\fR
|
# \fIlistname\fB-request\fR
|
||||||
|
@@ -12,7 +12,8 @@
|
|||||||
# DESCRIPTION
|
# DESCRIPTION
|
||||||
# The optional \fBcanonical\fR(5) table specifies an address mapping for
|
# The optional \fBcanonical\fR(5) table specifies an address mapping for
|
||||||
# local and non-local addresses. The mapping is used by the
|
# local and non-local addresses. The mapping is used by the
|
||||||
# \fBcleanup\fR(8) daemon. The address mapping is recursive.
|
# \fBcleanup\fR(8) daemon, before mail is stored into the
|
||||||
|
# queue. The address mapping is recursive.
|
||||||
#
|
#
|
||||||
# Normally, the \fBcanonical\fR(5) table is specified as a text file
|
# Normally, the \fBcanonical\fR(5) table is specified as a text file
|
||||||
# that serves as input to the \fBpostmap\fR(1) command.
|
# that serves as input to the \fBpostmap\fR(1) command.
|
||||||
@@ -49,7 +50,7 @@
|
|||||||
# TABLE FORMAT
|
# TABLE FORMAT
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
make# The input format for the \fBpostmap\fR(1) command is as follows:
|
# The input format for the \fBpostmap\fR(1) command is as follows:
|
||||||
# .IP "\fIpattern result\fR"
|
# .IP "\fIpattern result\fR"
|
||||||
# When \fIpattern\fR matches a mail address, replace it by the
|
# When \fIpattern\fR matches a mail address, replace it by the
|
||||||
# corresponding \fIresult\fR.
|
# corresponding \fIresult\fR.
|
||||||
@@ -59,19 +60,21 @@ make# The input format for the \fBpostmap\fR(1) command is as follows:
|
|||||||
# .IP "multi-line text"
|
# .IP "multi-line text"
|
||||||
# A logical line starts with non-whitespace text. A line that
|
# A logical line starts with non-whitespace text. A line that
|
||||||
# starts with whitespace continues a logical line.
|
# starts with whitespace continues a logical line.
|
||||||
# .PP
|
# TABLE SEARCH ORDER
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
# With lookups from indexed files such as DB or DBM, or from networked
|
# 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
|
# tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
# listed below:
|
# listed below:
|
||||||
# .IP "\fIuser\fR@\fIdomain address\fR"
|
# .IP "\fIuser\fR@\fIdomain address\fR"
|
||||||
# \fIuser\fR@\fIdomain\fR is replaced by \fIaddress\fR. This form
|
# Replace \fIuser\fR@\fIdomain\fR by \fIaddress\fR. This form
|
||||||
# has the highest precedence.
|
# has the highest precedence.
|
||||||
# .sp
|
# .sp
|
||||||
# This is useful to clean up addresses produced by legacy mail systems.
|
# This is useful to clean up addresses produced by legacy mail systems.
|
||||||
# It can also be used to produce \fIFirstname.Lastname\fR style
|
# It can also be used to produce \fIFirstname.Lastname\fR style
|
||||||
# addresses, but see below for a simpler solution.
|
# addresses, but see below for a simpler solution.
|
||||||
# .IP "\fIuser address\fR"
|
# .IP "\fIuser address\fR"
|
||||||
# \fIuser\fR@\fIsite\fR is replaced by \fIaddress\fR when \fIsite\fR is
|
# Replace \fIuser\fR@\fIsite\fR by \fIaddress\fR when \fIsite\fR is
|
||||||
# equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
# equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
||||||
# $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
# $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
||||||
# or $\fBproxy_interfaces\fR.
|
# or $\fBproxy_interfaces\fR.
|
||||||
@@ -79,7 +82,7 @@ make# The input format for the \fBpostmap\fR(1) command is as follows:
|
|||||||
# This form is useful for replacing login names by
|
# This form is useful for replacing login names by
|
||||||
# \fIFirstname.Lastname\fR.
|
# \fIFirstname.Lastname\fR.
|
||||||
# .IP "@\fIdomain address\fR"
|
# .IP "@\fIdomain address\fR"
|
||||||
# Every address in \fIdomain\fR is replaced by \fIaddress\fR.
|
# Replace other addresses in \fIdomain\fR by \fIaddress\fR.
|
||||||
# This form has the lowest precedence.
|
# This form has the lowest precedence.
|
||||||
# .PP
|
# .PP
|
||||||
# In all the above forms, when \fIaddress\fR has the form
|
# In all the above forms, when \fIaddress\fR has the form
|
||||||
@@ -150,7 +153,7 @@ make# The input format for the \fBpostmap\fR(1) command is as follows:
|
|||||||
# A list of address rewriting or forwarding mechanisms that propagate
|
# A list of address rewriting or forwarding mechanisms that propagate
|
||||||
# an address extension from the original address to the result.
|
# an address extension from the original address to the result.
|
||||||
# Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
# Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
# \fBforward\fR, or \fBinclude\fR.
|
# \fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
|
||||||
# .PP
|
# .PP
|
||||||
# Other parameters of interest:
|
# Other parameters of interest:
|
||||||
# .IP \fBinet_interfaces\fR
|
# .IP \fBinet_interfaces\fR
|
||||||
|
@@ -49,7 +49,7 @@
|
|||||||
# .IP "multi-line text"
|
# .IP "multi-line text"
|
||||||
# A logical line starts with non-whitespace text. A line that
|
# A logical line starts with non-whitespace text. A line that
|
||||||
# starts with whitespace continues a logical line.
|
# starts with whitespace continues a logical line.
|
||||||
# SEARCH ORDER
|
# TABLE SEARCH ORDER
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
# Patterns are applied in the order as specified in the table, until a
|
# Patterns are applied in the order as specified in the table, until a
|
||||||
|
213
postfix/proto/generics
Normal file
213
postfix/proto/generics
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
#++
|
||||||
|
# NAME
|
||||||
|
# generics 5
|
||||||
|
# SUMMARY
|
||||||
|
# Postfix generics table format
|
||||||
|
# SYNOPSIS
|
||||||
|
# \fBpostmap /etc/postfix/generics\fR
|
||||||
|
#
|
||||||
|
# \fBpostmap -q "\fIstring\fB" /etc/postfix/generics\fR
|
||||||
|
#
|
||||||
|
# \fBpostmap -q - /etc/postfix/generics <\fIinputfile\fR
|
||||||
|
# DESCRIPTION
|
||||||
|
# The optional \fBgenerics\fR(5) table specifies an address
|
||||||
|
# mapping that applies when mail is delivered. This is the
|
||||||
|
# opposite of \fBcanonical\fR(5) mapping, which applies when
|
||||||
|
# mail is received.
|
||||||
|
#
|
||||||
|
# Typically, one would use the \fBgenerics\fR(5) table on a
|
||||||
|
# system that does not have a valid Internet domain name and
|
||||||
|
# that uses something like \fIlocaldomain.local\fR instead.
|
||||||
|
# The \fBgenerics\fR(5) table is then used by the \fBsmtp\fR(8)
|
||||||
|
# client to transform local mail addresses into valid Internet
|
||||||
|
# mail addresses when mail has to be sent across the Internet.
|
||||||
|
# See the EXAMPLE section at the end of this document.
|
||||||
|
#
|
||||||
|
# The \fBgenerics\fR(5) mapping affects both message header
|
||||||
|
# addresses (i.e. addresses that appear inside messages) and
|
||||||
|
# message envelope addresses (for example, the addresses that
|
||||||
|
# are used in SMTP protocol commands).
|
||||||
|
#
|
||||||
|
# Normally, the \fBgenerics\fR(5) 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/generics\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, or lookups
|
||||||
|
# can be directed to TCP-based server. In that case, the lookups are
|
||||||
|
# done in a slightly different way as described below under
|
||||||
|
# "REGULAR EXPRESSION TABLES" and "TCP-BASED TABLES".
|
||||||
|
# TABLE FORMAT
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# The input format for the \fBpostmap\fR(1) command is as follows:
|
||||||
|
# .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.
|
||||||
|
# TABLE SEARCH ORDER
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# 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\fR"
|
||||||
|
# Replace \fIuser\fR@\fIdomain\fR by \fIaddress\fR. This form
|
||||||
|
# has the highest precedence.
|
||||||
|
# .IP "\fIuser address\fR"
|
||||||
|
# Replace \fIuser\fR@\fIsite\fR by \fIaddress\fR when \fIsite\fR is
|
||||||
|
# equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
||||||
|
# $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
||||||
|
# or $\fBproxy_interfaces\fR.
|
||||||
|
# .IP "@\fIdomain address\fR"
|
||||||
|
# Replace other addresses in \fIdomain\fR by \fIaddress\fR.
|
||||||
|
# This form has the lowest precedence.
|
||||||
|
# .PP
|
||||||
|
# In all the above forms, the result \fIaddress\fR must have
|
||||||
|
# the form \fIusername@domainname\fR.
|
||||||
|
# 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.
|
||||||
|
#
|
||||||
|
# The \fBpropagate_unmatched_extensions\fR parameter controls whether
|
||||||
|
# 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.
|
||||||
|
# TCP-BASED TABLES
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# This section describes how the table lookups change when lookups
|
||||||
|
# are directed to a TCP-based server. For a description of the TCP
|
||||||
|
# client/server lookup protocol, see \fBtcp_table\fR(5).
|
||||||
|
# This feature is not available up to and including Postfix version 2.2.
|
||||||
|
#
|
||||||
|
# Each lookup operation uses the entire address once. 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.
|
||||||
|
#
|
||||||
|
# Results are the same as with indexed file lookups.
|
||||||
|
# EXAMPLE
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# The following shows a generic mapping with an indexed file.
|
||||||
|
# When mail is sent to a remote host via SMTP, this replaces
|
||||||
|
# \fIhis@localdomain.local\fR by his ISP mail address, replaces
|
||||||
|
# \fIher@localdomain.local\fR by her ISP mail address, and
|
||||||
|
# replaces other local addresses by his ISP account, with
|
||||||
|
# an address extension of \fI+local\fR (this example assumes
|
||||||
|
# that the ISP supports "+" style address extensions).
|
||||||
|
#
|
||||||
|
# .na
|
||||||
|
# .nf
|
||||||
|
# /etc/postfix/main.cf:
|
||||||
|
# .in +4
|
||||||
|
# smtp_generics_maps = hash:/etc/postfix/generics
|
||||||
|
# .in -4
|
||||||
|
#
|
||||||
|
# /etc/postfix/generics:
|
||||||
|
# .in +4
|
||||||
|
# his@localdomain.local hisaccount@hisisp.example
|
||||||
|
# her@localdomain.local heraccount@herisp.example
|
||||||
|
# @localdomain.local hisaccount+local@hisisp.example
|
||||||
|
# .in -4
|
||||||
|
#
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# Execute the command "\fBpostmap /etc/postfix/generics\fR"
|
||||||
|
# whenever the table is changed. Instead of \fBhash\fR, some
|
||||||
|
# systems use \fBdbm\fR database files. To find out what
|
||||||
|
# tables your system supports use the command "\fBpostconf
|
||||||
|
# -m\fR".
|
||||||
|
# BUGS
|
||||||
|
# The table format does not understand quoting conventions.
|
||||||
|
# CONFIGURATION PARAMETERS
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# The following \fBmain.cf\fR parameters are especially relevant.
|
||||||
|
# The text below provides only a parameter summary. See
|
||||||
|
# \fBpostconf\fR(5) for more details including examples.
|
||||||
|
# .IP \fBsmtp_generics_maps\fR
|
||||||
|
# Address mapping lookup table for envelope and header sender
|
||||||
|
# and recipient addresses while delivering mail via SMTP.
|
||||||
|
# .IP \fBpropagate_unmatched_extensions\fR
|
||||||
|
# A list of address rewriting or forwarding mechanisms that propagate
|
||||||
|
# an address extension from the original address to the result.
|
||||||
|
# Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
|
# \fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
|
||||||
|
# .PP
|
||||||
|
# Other parameters of interest:
|
||||||
|
# .IP \fBinet_interfaces\fR
|
||||||
|
# The network interface addresses that this system receives mail on.
|
||||||
|
# You need to stop and start Postfix when this parameter changes.
|
||||||
|
# .IP \fBproxy_interfaces\fR
|
||||||
|
# Other interfaces that this machine receives mail on by way of a
|
||||||
|
# proxy agent or network address translator.
|
||||||
|
# .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
|
||||||
|
# postmap(1), Postfix lookup table manager
|
||||||
|
# postconf(5), configuration parameters
|
||||||
|
# smtp(8), Postfix SMTP client
|
||||||
|
# README FILES
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# Use "\fBpostconf readme_directory\fR" or
|
||||||
|
# "\fBpostconf html_directory\fR" to locate this information.
|
||||||
|
# .na
|
||||||
|
# .nf
|
||||||
|
# DATABASE_README, Postfix lookup table overview
|
||||||
|
# ADDRESS_REWRITING_README, address rewriting guide
|
||||||
|
# LICENSE
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
|
# The Secure Mailer license must be distributed with this software.
|
||||||
|
# HISTORY
|
||||||
|
# A genericstable feature appears in the Sendmail MTA.
|
||||||
|
#
|
||||||
|
# This feature is available in Postfix 2.2 and later.
|
||||||
|
# AUTHOR(S)
|
||||||
|
# Wietse Venema
|
||||||
|
# IBM T.J. Watson Research
|
||||||
|
# P.O. Box 704
|
||||||
|
# Yorktown Heights, NY 10598, USA
|
||||||
|
#--
|
@@ -8248,31 +8248,8 @@ This is needed when the local machine does not have its own Internet
|
|||||||
domain name, but uses something like <i>localdomain.local</i>
|
domain name, but uses something like <i>localdomain.local</i>
|
||||||
instead. </p>
|
instead. </p>
|
||||||
|
|
||||||
<p> The table search order is described below. The search terminates
|
<p> The table format and lookups are documented in generics(5);
|
||||||
when a match is found. In other words, the search is non-recursive.
|
examples are shown in the ADDRESS_REWRITING_README and
|
||||||
</p>
|
STANDARD_CONFIGURATION_README documents. </p>
|
||||||
|
|
||||||
<dl>
|
<p> This feature is available in Postfix 2.2 and later. </p>
|
||||||
|
|
||||||
<dt> <i>user@domain.tld address</i> </dt>
|
|
||||||
|
|
||||||
<dd> <p> Replace <i>user@domain.tld</i> by <i>address</i>. This
|
|
||||||
form has the highest precedence. </p> </dd>
|
|
||||||
|
|
||||||
<dt> <i>user address</i> </dt>
|
|
||||||
|
|
||||||
<dd> <p> Replace <i>user@site</i> by <i>address</i> when <i>site</i> is
|
|
||||||
equal to $myorigin, when <i>site</i> is listed in $mydestination,
|
|
||||||
or when it matches $inet_interfaces or $proxy_interfaces. </p>
|
|
||||||
</dd>
|
|
||||||
|
|
||||||
<dt> <i>@domain.tld address</i> </dt>
|
|
||||||
|
|
||||||
<dd> <p> Replace all other addresses in <i>domain.tld</i> by
|
|
||||||
<i>address</i>. This form has the lowest preference. </p> </dd>
|
|
||||||
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<p> In all cases <i>address</i> must specify a username and a
|
|
||||||
domain. </p> <p> This feature is available in Postfix 2.2 and later.
|
|
||||||
</p>
|
|
||||||
|
@@ -43,7 +43,9 @@
|
|||||||
# .IP \(bu
|
# .IP \(bu
|
||||||
# A logical line starts with non-whitespace text. A line that
|
# A logical line starts with non-whitespace text. A line that
|
||||||
# starts with whitespace continues a logical line.
|
# starts with whitespace continues a logical line.
|
||||||
# .PP
|
# TABLE SEARCH ORDER
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
# With lookups from indexed files such as DB or DBM, or from networked
|
# 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
|
# tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
# listed below:
|
# listed below:
|
||||||
@@ -55,7 +57,7 @@
|
|||||||
# when \fIsite\fR is listed in $\fBmydestination\fR, or when \fIsite\fR
|
# when \fIsite\fR is listed in $\fBmydestination\fR, or when \fIsite\fR
|
||||||
# is listed in $\fBinet_interfaces\fR or $\fBproxy_interfaces\fR.
|
# is listed in $\fBinet_interfaces\fR or $\fBproxy_interfaces\fR.
|
||||||
# .IP @\fIdomain\fR
|
# .IP @\fIdomain\fR
|
||||||
# Matches every address in \fIdomain\fR. This form has the lowest
|
# Matches other addresses in \fIdomain\fR. This form has the lowest
|
||||||
# precedence.
|
# precedence.
|
||||||
# ADDRESS EXTENSION
|
# ADDRESS EXTENSION
|
||||||
# .fi
|
# .fi
|
||||||
|
@@ -65,24 +65,24 @@
|
|||||||
# The \fIresult\fR is of the form \fItransport:nexthop\fR and
|
# The \fIresult\fR is of the form \fItransport:nexthop\fR and
|
||||||
# specifies how or where to deliver mail. This is described in
|
# specifies how or where to deliver mail. This is described in
|
||||||
# section "RESULT FORMAT".
|
# section "RESULT FORMAT".
|
||||||
# TABLE LOOKUP
|
# TABLE SEARCH ORDER
|
||||||
# .ad
|
# .ad
|
||||||
# .fi
|
# .fi
|
||||||
# With lookups from indexed files such as DB or DBM, or from networked
|
# 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
|
# tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
# listed below:
|
# listed below:
|
||||||
# .IP "\fIuser+extension@domain transport\fR:\fInexthop\fR"
|
# .IP "\fIuser+extension@domain transport\fR:\fInexthop\fR"
|
||||||
# Mail for \fIuser+extension@domain\fR is delivered through
|
# Deliver mail for \fIuser+extension@domain\fR through
|
||||||
# \fItransport\fR to
|
# \fItransport\fR to
|
||||||
# \fInexthop\fR.
|
# \fInexthop\fR.
|
||||||
# .IP "\fIuser@domain transport\fR:\fInexthop\fR"
|
# .IP "\fIuser@domain transport\fR:\fInexthop\fR"
|
||||||
# Mail for \fIuser@domain\fR is delivered through \fItransport\fR to
|
# Deliver mail for \fIuser@domain\fR through \fItransport\fR to
|
||||||
# \fInexthop\fR.
|
# \fInexthop\fR.
|
||||||
# .IP "\fIdomain transport\fR:\fInexthop\fR"
|
# .IP "\fIdomain transport\fR:\fInexthop\fR"
|
||||||
# Mail for \fIdomain\fR is delivered through \fItransport\fR to
|
# Deliver mail for \fIdomain\fR through \fItransport\fR to
|
||||||
# \fInexthop\fR.
|
# \fInexthop\fR.
|
||||||
# .IP "\fI.domain transport\fR:\fInexthop\fR"
|
# .IP "\fI.domain transport\fR:\fInexthop\fR"
|
||||||
# Mail for any subdomain of \fIdomain\fR is delivered through
|
# Deliver mail for any subdomain of \fIdomain\fR through
|
||||||
# \fItransport\fR to \fInexthop\fR. This applies only when the
|
# \fItransport\fR to \fInexthop\fR. This applies only when the
|
||||||
# string \fBtransport_maps\fR is not listed in the
|
# string \fBtransport_maps\fR is not listed in the
|
||||||
# \fBparent_domain_matches_subdomains\fR configuration setting.
|
# \fBparent_domain_matches_subdomains\fR configuration setting.
|
||||||
|
@@ -59,15 +59,17 @@
|
|||||||
# .IP "multi-line text"
|
# .IP "multi-line text"
|
||||||
# A logical line starts with non-whitespace text. A line that
|
# A logical line starts with non-whitespace text. A line that
|
||||||
# starts with whitespace continues a logical line.
|
# starts with whitespace continues a logical line.
|
||||||
# .PP
|
# TABLE SEARCH ORDER
|
||||||
|
# .ad
|
||||||
|
# .fi
|
||||||
# With lookups from indexed files such as DB or DBM, or from networked
|
# 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
|
# tables such as NIS, LDAP or SQL, patterns are tried in the order as
|
||||||
# listed below:
|
# listed below:
|
||||||
# .IP "\fIuser\fR@\fIdomain address, address, ...\fR"
|
# .IP "\fIuser\fR@\fIdomain address, address, ...\fR"
|
||||||
# Mail for \fIuser\fR@\fIdomain\fR is redirected to \fIaddress\fR.
|
# Redirect mail for \fIuser\fR@\fIdomain\fR to \fIaddress\fR.
|
||||||
# This form has the highest precedence.
|
# This form has the highest precedence.
|
||||||
# .IP "\fIuser address, address, ...\fR"
|
# .IP "\fIuser address, address, ...\fR"
|
||||||
# Mail for \fIuser\fR@\fIsite\fR is redirected to \fIaddress\fR when
|
# Redirect mail for \fIuser\fR@\fIsite\fR to \fIaddress\fR when
|
||||||
# \fIsite\fR is equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
# \fIsite\fR is equal to $\fBmyorigin\fR, when \fIsite\fR is listed in
|
||||||
# $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
# $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
|
||||||
# or $\fBproxy_interfaces\fR.
|
# or $\fBproxy_interfaces\fR.
|
||||||
@@ -76,7 +78,7 @@
|
|||||||
# \fIaliases\fR(5) database. The difference is that \fBvirtual\fR(5)
|
# \fIaliases\fR(5) database. The difference is that \fBvirtual\fR(5)
|
||||||
# mapping can be applied to non-local addresses.
|
# mapping can be applied to non-local addresses.
|
||||||
# .IP "@\fIdomain address, address, ...\fR"
|
# .IP "@\fIdomain address, address, ...\fR"
|
||||||
# Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR.
|
# Redirect mail for other users in \fIdomain\fR to \fIaddress\fR.
|
||||||
# This form has the lowest precedence.
|
# This form has the lowest precedence.
|
||||||
# .PP
|
# .PP
|
||||||
# In all the above forms, when \fIaddress\fR has the form
|
# In all the above forms, when \fIaddress\fR has the form
|
||||||
@@ -201,7 +203,7 @@
|
|||||||
# A list of address rewriting or forwarding mechanisms that propagate
|
# A list of address rewriting or forwarding mechanisms that propagate
|
||||||
# an address extension from the original address to the result.
|
# an address extension from the original address to the result.
|
||||||
# Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
# Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
|
||||||
# \fBforward\fR, or \fBinclude\fR.
|
# \fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
|
||||||
# .PP
|
# .PP
|
||||||
# Other parameters of interest:
|
# Other parameters of interest:
|
||||||
# .IP \fBinet_interfaces\fR
|
# .IP \fBinet_interfaces\fR
|
||||||
|
@@ -278,6 +278,7 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
|
|||||||
{
|
{
|
||||||
const char *optional_text = value + strcspn(value, " \t");
|
const char *optional_text = value + strcspn(value, " \t");
|
||||||
int command_len = optional_text - value;
|
int command_len = optional_text - value;
|
||||||
|
VSTRING *bp;
|
||||||
|
|
||||||
while (*optional_text && ISSPACE(*optional_text))
|
while (*optional_text && ISSPACE(*optional_text))
|
||||||
optional_text++;
|
optional_text++;
|
||||||
@@ -341,15 +342,22 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
|
|||||||
if (STREQUAL(value, "REPLACE", command_len)) {
|
if (STREQUAL(value, "REPLACE", command_len)) {
|
||||||
if (*optional_text == 0) {
|
if (*optional_text == 0) {
|
||||||
msg_warn("REPLACE action without text in %s map", map_class);
|
msg_warn("REPLACE action without text in %s map", map_class);
|
||||||
} else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0
|
return (CLEANUP_ACT_KEEP);
|
||||||
&& !is_header(optional_text)) {
|
} else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0) {
|
||||||
msg_warn("bad REPLACE header text \"%s\" in %s map, "
|
if (!is_header(optional_text)) {
|
||||||
"need \"headername: headervalue\"",
|
msg_warn("bad REPLACE header text \"%s\" in %s map, "
|
||||||
optional_text, map_class);
|
"need \"headername: headervalue\"",
|
||||||
|
optional_text, map_class);
|
||||||
|
return (CLEANUP_ACT_KEEP);
|
||||||
|
}
|
||||||
|
/* XXX Impedance mismatch. */
|
||||||
|
bp = vstring_strcpy(vstring_alloc(100), optional_text);
|
||||||
|
cleanup_out_header(state, bp);
|
||||||
|
vstring_free(bp);
|
||||||
} else {
|
} else {
|
||||||
cleanup_act_log(state, "replace", context, buf, optional_text);
|
|
||||||
cleanup_out_string(state, REC_TYPE_NORM, optional_text);
|
cleanup_out_string(state, REC_TYPE_NORM, optional_text);
|
||||||
}
|
}
|
||||||
|
cleanup_act_log(state, "replace", context, buf, optional_text);
|
||||||
return (CLEANUP_ACT_DROP);
|
return (CLEANUP_ACT_DROP);
|
||||||
}
|
}
|
||||||
if (STREQUAL(value, "REDIRECT", command_len)) {
|
if (STREQUAL(value, "REDIRECT", command_len)) {
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* Patches change the patchlevel and the release date. Snapshots change the
|
* Patches change the patchlevel and the release date. Snapshots change the
|
||||||
* release date only.
|
* release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20050206"
|
#define MAIL_RELEASE_DATE "20050207"
|
||||||
#define MAIL_VERSION_NUMBER "2.2"
|
#define MAIL_VERSION_NUMBER "2.2"
|
||||||
|
|
||||||
#define VAR_MAIL_VERSION "mail_version"
|
#define VAR_MAIL_VERSION "mail_version"
|
||||||
|
@@ -149,12 +149,15 @@
|
|||||||
/* postalias(1), create/update/query alias database
|
/* postalias(1), create/update/query alias database
|
||||||
/* postcat(1), examine Postfix queue file
|
/* postcat(1), examine Postfix queue file
|
||||||
/* postconf(1), Postfix configuration utility
|
/* postconf(1), Postfix configuration utility
|
||||||
|
/* postfix(1), Postfix control program
|
||||||
/* postkick(1), trigger Postfix daemon
|
/* postkick(1), trigger Postfix daemon
|
||||||
/* postlock(1), Postfix-compatible locking
|
/* postlock(1), Postfix-compatible locking
|
||||||
/* postlog(1), Postfix-compatible logging
|
/* postlog(1), Postfix-compatible logging
|
||||||
/* postmap(1), Postfix lookup table manager
|
/* postmap(1), Postfix lookup table manager
|
||||||
/* postqueue(1), Postfix mail queue control
|
/* postqueue(1), Postfix mail queue control
|
||||||
/* postsuper(1), Postfix housekeeping
|
/* postsuper(1), Postfix housekeeping
|
||||||
|
/* mailq(1), Sendmail compatibility interface
|
||||||
|
/* newaliases(1), Sendmail compatibility interface
|
||||||
/* sendmail(1), Sendmail compatibility interface
|
/* sendmail(1), Sendmail compatibility interface
|
||||||
/*
|
/*
|
||||||
/* Postfix configuration:
|
/* Postfix configuration:
|
||||||
@@ -164,8 +167,9 @@
|
|||||||
/* Table-driven mechanisms:
|
/* Table-driven mechanisms:
|
||||||
/* access(5), Postfix SMTP access control table
|
/* access(5), Postfix SMTP access control table
|
||||||
/* aliases(5), Postfix alias database
|
/* aliases(5), Postfix alias database
|
||||||
/* header_checks(5), body_checks(5), content inspection
|
/* canonical(5), Postfix input address rewriting
|
||||||
/* canonical(5), Postfix address rewriting
|
/* generics(5), Postfix output address rewriting
|
||||||
|
/* header_checks(5), body_checks(5), Postfix content inspection
|
||||||
/* relocated(5), Users that have moved
|
/* relocated(5), Users that have moved
|
||||||
/* transport(5), Postfix routing table
|
/* transport(5), Postfix routing table
|
||||||
/* virtual(5), Postfix virtual aliasing
|
/* virtual(5), Postfix virtual aliasing
|
||||||
|
Reference in New Issue
Block a user