]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.2-20050207
authorWietse Venema <wietse@porcupine.org>
Mon, 7 Feb 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:30:37 +0000 (06:30 +0000)
49 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_REWRITING_README
postfix/README_FILES/STANDARD_CONFIGURATION_README
postfix/conf/aliases
postfix/conf/canonical
postfix/conf/generics [new file with mode: 0644]
postfix/conf/postfix-files
postfix/conf/relocated
postfix/conf/transport
postfix/conf/virtual
postfix/html/ADDRESS_REWRITING_README.html
postfix/html/Makefile.in
postfix/html/STANDARD_CONFIGURATION_README.html
postfix/html/aliases.5.html
postfix/html/canonical.5.html
postfix/html/cidr_table.5.html
postfix/html/generics.5.html [new file with mode: 0644]
postfix/html/postconf.5.html
postfix/html/postfix-manuals.html
postfix/html/postfix.1.html
postfix/html/relocated.5.html
postfix/html/transport.5.html
postfix/html/virtual.5.html
postfix/man/Makefile.in
postfix/man/man1/postfix.1
postfix/man/man5/aliases.5
postfix/man/man5/canonical.5
postfix/man/man5/cidr_table.5
postfix/man/man5/generics.5 [new file with mode: 0644]
postfix/man/man5/postconf.5
postfix/man/man5/relocated.5
postfix/man/man5/transport.5
postfix/man/man5/virtual.5
postfix/mantools/manlint.stop
postfix/mantools/postlink
postfix/proto/ADDRESS_REWRITING_README.html
postfix/proto/Makefile.in
postfix/proto/STANDARD_CONFIGURATION_README.html
postfix/proto/aliases
postfix/proto/canonical
postfix/proto/cidr_table
postfix/proto/generics [new file with mode: 0644]
postfix/proto/postconf.proto
postfix/proto/relocated
postfix/proto/transport
postfix/proto/virtual
postfix/src/cleanup/cleanup_message.c
postfix/src/global/mail_version.h
postfix/src/postfix/postfix.c

index 9dc7db36c1ac191072d668095a4f2beafeab2910..f710bce07ecace901d05dcd192a8d0977070dc57 100644 (file)
@@ -10286,19 +10286,28 @@ Apologies for any names omitted.
        Cleanup: don't panic in mymalloc() when master can't find
        any IP addresses. LaMont Jones. File: master/master_ent.c.
 
-Open problems:
+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.
 
-       Med: document generics mapping in BASIC_CONFIGURATION_README.
+       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.
 
-       Med: local and remote source port and IP address for
-       smtpd policy hook.
+       Bugfix: the header_checks REPLACE action should not drop
+       the input when the action is NOT executed. File:
+       cleanup/cleanup_message.c.
+
+Open problems:
+
+       Med: local and remote source port and IP address for smtpd
+       policy hook.
 
        Med: smtp_connect_timeout_budget (default: 2x smtp_connect_timeout)
        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
        when comparing against local IP addresses?
 
index 183eb8896214f4952402426c4c6c8f3064f21792..d3f3e0f4577526b9db606265e6ead417cf259844 100644 (file)
@@ -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
 names.
 
-With the smtp_generics_maps parameter you can specify lookup tables that
-replace local mail addresses by valid Internet addresses when mail leaves the
-machine via SMTP. This mapping replaces envelope and header addresses, and is
-non-recursive. It does not happen when you send mail between addresses on the
-local machine.
+With the smtp_generics_maps parameter you can specify generics(5) lookup tables
+that replace local mail addresses by valid Internet addresses when mail leaves
+the machine via SMTP. The generics(5) mapping replaces envelope and header
+addresses, and is non-recursive. It does not happen when you send mail between
+addresses on the local machine.
 
 This feature is available in Postfix version 2.2 and later.
 
@@ -621,15 +621,15 @@ Example:
         smtp_generics_maps = hash:/etc/postfix/generics
 
     /etc/postfix/generics:
-        you@localdomain.local          youraccount@yourisp.example
+        his@localdomain.local          hisaccount@hisisp.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
-address you@localdomain.local by your ISP mail address, replaces
-her@localdomain.local by her ISP mail address, and replaces all other local
-addresses by your ISP account, with an address extension of +local (this
-example assumes that the ISP supports "+" style address extensions).
+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).
 
 L\bLo\boc\bca\bal\bl a\bal\bli\bia\bas\bs d\bda\bat\bta\bab\bba\bas\bse\be
 
index 7c177af93108a42b76ff60971d3d0aa37e678077..755b939ad15443117b4d070f2cacc1711a92232f 100644 (file)
@@ -25,7 +25,7 @@ in specific environments.
   * Running Postfix behind a firewall
   * Configuring Postfix as MX host for a remote site
   * Postfix on a dialup machine
-  * Postfix on hosts without a real hostname
+  * Postfix on hosts without a real Internet hostname
 
 P\bPo\bos\bst\btf\bfi\bix\bx o\bon\bn a\ba s\bst\bta\ban\bnd\bd-\b-a\bal\blo\bon\bne\be I\bIn\bnt\bte\ber\brn\bne\bet\bt h\bho\bos\bst\bt
 
@@ -49,8 +49,8 @@ document:
         mynetworks_style = host
         relay_domains =
 
-See also the section "Postfix on hosts without a real hostname" if this is
-applicable to your configuration.
+See also the section "Postfix on hosts without a real Internet hostname" if
+this is applicable to your configuration.
 
 P\bPo\bos\bst\btf\bfi\bix\bx o\bon\bn a\ba n\bnu\bul\bll\bl c\bcl\bli\bie\ben\bnt\bt
 
@@ -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
 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
-should also study the section on "Postfix on hosts without a real hostname".
+If you do not have your own hostname and IP address (usually with dialup, cable
+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.
     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 "s\bse\ben\bnd\bdm\bma\bai\bil\bl -\b-q\bq" command every now and then while the dialup link is up,
     so that newly-posted mail is flushed from the queue.
 
-P\bPo\bos\bst\btf\bfi\bix\bx o\bon\bn h\bho\bos\bst\bts\bs w\bwi\bit\bth\bho\bou\but\bt a\ba r\bre\bea\bal\bl h\bho\bos\bst\btn\bna\bam\bme\be
+P\bPo\bos\bst\btf\bfi\bix\bx o\bon\bn h\bho\bos\bst\bts\bs w\bwi\bit\bth\bho\bou\but\bt a\ba r\bre\bea\bal\bI\bIn\bnt\bte\ber\brn\bne\bet\bh\bho\bos\bst\btn\bna\bam\bme\be
 
-This section is for hosts that don't have an Internet hostname. Typically these
-are systems that get a dynamic IP address via DHCP or via dialup. Postfix will
-let you send and receive mail just fine between accounts on a machine with a
-fantasy name. However, 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
-your mail. In fact, more and more sites refuse mail from non-existent domain
-names.
+This section is for hosts that don't have their own Internet hostname.
+Typically these are systems that get a dynamic IP address via DHCP or via
+dialup. Postfix will let you send and receive mail just fine between accounts
+on a machine with a fantasy name. However, 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 your mail. In fact, more and more sites refuse mail addresses
+with non-existent domain names.
 
-The perfect solution would be for Postfix to do a mapping from local fantasy
-email addresses to valid Internet addresses when mail leaves the machine
-(similar to Sendmail's generics table). This is planned for the near future.
+Note: the following information is Postfix version dependent. To find out what
+Postfix version you have, execute the command "p\bpo\bos\bst\btc\bco\bon\bnf\bf m\bma\bai\bil\bl_\b_v\bve\ber\brs\bsi\bio\bon\bn".
+
+P\bPo\bos\bst\btf\bfi\bix\bx v\bve\ber\brs\bsi\bio\bon\bn 2\b2.\b.2\b2 a\ban\bnd\bd l\bla\bat\bte\ber\br
+
+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,
 
-In the mean time, the solution with Postfix is to use valid Internet addresses
+  * 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 d\bdb\bbm\bm instead of h\bha\bas\bsh\bh if your system uses d\bdb\bbm\bm files instead of d\bdb\bb files.
+To find out what lookup tables Postfix supports, use the command "p\bpo\bos\bst\btc\bco\bon\bnf\bf -\b-m\bm".
+
+Execute the command "p\bpo\bos\bst\btm\bma\bap\bp /\b/e\bet\btc\bc/\b/p\bpo\bos\bst\btf\bfi\bix\bx/\b/g\bge\ben\bne\ber\bri\bic\bcs\bs" whenever you change the
+generics table.
+
+P\bPo\bos\bst\btf\bfi\bix\bx v\bve\ber\brs\bsi\bio\bon\bn 2\b2.\b.1\b1 a\ban\bnd\bd e\bea\bar\brl\bli\bie\ber\br
+
+The solution with older Postfix systems is to use valid Internet addresses
 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, 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
     convenient.
 
+Specify d\bdb\bbm\bm instead of h\bha\bas\bsh\bh if your system uses d\bdb\bbm\bm files instead of d\bdb\bb files.
+To find out what lookup tables Postfix supports, use the command "p\bpo\bos\bst\btc\bco\bon\bnf\bf -\b-m\bm".
+
+Execute the command "p\bpo\bos\bst\btm\bma\bap\bp /\b/e\bet\btc\bc/\b/p\bpo\bos\bst\btf\bfi\bix\bx/\b/c\bca\ban\bno\bon\bni\bic\bca\bal\bl" whenever you change the
+canonical table.
+
+Execute the command "p\bpo\bos\bst\btm\bma\bap\bp /\b/e\bet\btc\bc/\b/p\bpo\bos\bst\btf\bfi\bix\bx/\b/v\bvi\bir\brt\btu\bua\bal\bl" whenever you change the
+virtual table.
+
index 93563868893ac91b46c968b77aacf9e3c02c6805..b13f4047ce8139094998b9db4cda00df50cf0ae2 100644 (file)
@@ -180,8 +180,8 @@ decode:             root
 #               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,  or
-#               include.
+#               more  of  canonical,   virtual,   alias,   forward,
+#               include, or generics.
 # 
 #        owner_request_special
 #               Give  special treatment to owner-listname and list-
index e2eacf381a940572eb564b9f4857b27b14f1299f..d835107cc845c49fd9dc9fadbcf9d86dfaaa2133 100644 (file)
@@ -13,8 +13,8 @@
 # DESCRIPTION
 #        The  optional canonical(5) table specifies an address map-
 #        ping for local and non-local  addresses.  The  mapping  is
-#        used  by  the  cleanup(8)  daemon.  The address mapping is
-#        recursive.
+#        used  by the cleanup(8) daemon, before mail is stored into
+#        the queue.  The address mapping is recursive.
 # 
 #        Normally, the canonical(5) table is specified  as  a  text
 #        file  that serves as input to the postmap(1) command.  The
@@ -53,8 +53,7 @@
 #        aliasing.  Use the aliases(5) map for that purpose.
 # 
 # TABLE FORMAT
-#        make#   The input format for the postmap(1) command is  as
-#        follows:
+#        The input format for the postmap(1) command is as follows:
 # 
 #        pattern result
 #               When  pattern matches a mail address, replace it by
 #               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
-#               user@domain is replaced by address. This  form  has
-#               the highest precedence.
+#               Replace user@domain by address. This form  has  the
+#               highest precedence.
 # 
 #               This  is  useful  to clean up addresses produced by
 #               legacy mail systems.  It can also be used  to  pro-
 #               below for a simpler solution.
 # 
 #        user address
-#               user@site is replaced by address when site is equal
-#               to  $myorigin,  when  site is listed in $mydestina-
-#               tion, or when it is listed in  $inet_interfaces  or
+#               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.
 # 
 #               This  form  is  useful for replacing login names by
 #               Firstname.Lastname.
 # 
 #        @domain address
-#               Every address in domain  is  replaced  by  address.
-#               This form has the lowest precedence.
+#               Replace other addresses in domain by address.  This
+#               form has the lowest precedence.
 # 
 #        In  all the above forms, when address has the form @other-
 #        domain, the result is the same user in otherdomain.
 #               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,  or
-#               include.
+#               more  of  canonical,   virtual,   alias,   forward,
+#               include, or generics.
 # 
 #        Other parameters of interest:
 # 
diff --git a/postfix/conf/generics b/postfix/conf/generics
new file mode 100644 (file)
index 0000000..164226a
--- /dev/null
@@ -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)
index a403fa1eb599c9135221029c38b59a48a0a15399..f7a5e805fb0708c2bea86cca4ca3195fe5c4488d 100644 (file)
@@ -106,6 +106,7 @@ $config_directory/access:f:root:-:644:p
 $config_directory/aliases:f:root:-:644:p
 $config_directory/canonical:f:root:-:644:p
 $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/install.cf:f:root:-:644:o
 $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/canonical.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/ldap_table.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/error.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/index.html:f:root:-:644
 $html_directory/ldap_table.5.html:f:root:-:644
index 0cd3ff083758f86755ef8269c776a572359d41bc..8be26a4a799eb593669faf96c3a4c442dab7d4da 100644 (file)
@@ -48,6 +48,7 @@
 #               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:
@@ -61,8 +62,8 @@
 #               in $inet_interfaces or $proxy_interfaces.
 # 
 #        @domain
-#               Matches  every address in domain. This form has the
-#               lowest precedence.
+#               Matches  every  other  address in domain. This form
+#               has the lowest precedence.
 # 
 # ADDRESS EXTENSION
 #        When a mail address localpart contains the optional recip-
index ab3edc8b39b6f35bb7a08b75060468532ffda838..2df6aed47709adf682b33177208efd4cce0851b2 100644 (file)
 #        how or where to deliver mail. This is described in section
 #        "RESULT FORMAT".
 # 
-# TABLE LOOKUP
+# 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+extension@domain transport:nexthop
-#               Mail for user+extension@domain is delivered through
+#               Deliver  mail  for  user+extension@domain   through
 #               transport to nexthop.
 # 
 #        user@domain transport:nexthop
-#               Mail for user@domain is delivered through transport
-#               to nexthop.
+#               Deliver  mail  for user@domain through transport to
+#               nexthop.
 # 
 #        domain transport:nexthop
-#               Mail for domain is delivered through  transport  to
-#               nexthop.
+#               Deliver mail for domain through transport  to  nex-
+#               thop.
 # 
 #        .domain transport:nexthop
-#               Mail  for  any  subdomain  of  domain  is delivered
-#               through transport to  nexthop.  This  applies  only
-#               when the string transport_maps is not listed in the
-#               parent_domain_matches_subdomains configuration set-
+#               Deliver  mail  for  any subdomain of domain through
+#               transport to nexthop. This applies  only  when  the
+#               string  transport_maps  is  not  listed in the par-
+#               ent_domain_matches_subdomains  configuration   set-
 #               ting.   Otherwise, a domain name matches itself and
 #               its subdomains.
 # 
index 43e2703e48c1f32b3927d52b33c05c905338de0c..9e8bdf31eb343217e5659914a4545dc9a49f58cb 100644 (file)
 #               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, address, ...
-#               Mail  for  user@domain  is  redirected  to address.
-#               This form has the highest precedence.
+#               Redirect  mail  for  user@domain  to address.  This
+#               form has the highest precedence.
 # 
 #        user address, address, ...
-#               Mail for user@site is redirected  to  address  when
-#               site  is equal to $myorigin, when site is listed in
-#               $mydestination,   or   when   it   is   listed   in
-#               $inet_interfaces or $proxy_interfaces.
+#               Redirect mail for user@site to address when site is
+#               equal  to $myorigin, when site is listed in $mydes-
+#               tination, or when it is listed in  $inet_interfaces
+#               or $proxy_interfaces.
 # 
 #               This  functionality  overlaps with functionality of
 #               the local aliases(5) database.  The  difference  is
@@ -91,8 +92,8 @@
 #               addresses.
 # 
 #        @domain address, address, ...
-#               Mail for  any  user  in  domain  is  redirected  to
-#               address.  This form has the lowest precedence.
+#               Redirect mail for other users in domain to address.
+#               This form has the lowest precedence.
 # 
 #        In  all the above forms, when address has the form @other-
 #        domain, the result is the same user in otherdomain.   This
 #               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,  or
-#               include.
+#               more  of  canonical,   virtual,   alias,   forward,
+#               include, or generics.
 # 
 #        Other parameters of interest:
 # 
index d95fcb50bf1aa8aeeb4dc1ce9c0b58429d0dec62..e0a606eedf61e9b5dd47eb9e923ae64142518aba 100644 (file)
@@ -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
 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
-tables that replace local mail addresses by valid Internet addresses
-when mail leaves the machine via SMTP. This mapping replaces envelope
-and header addresses, and is non-recursive. It does not happen when
-you send mail between addresses on the local machine. </p>
+<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>
+lookup tables that replace local mail addresses by valid Internet
+addresses when mail leaves the machine via SMTP. The <a href="generics.5.html">generics(5)</a>
+mapping replaces envelope and header addresses, and is non-recursive.
+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>
 
@@ -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
 
 /etc/postfix/generics:
-    you@localdomain.local              youraccount@yourisp.example
+    his@localdomain.local              hisaccount@hisisp.example
     her@localdomain.local              heraccount@herisp.example
-    @localdomain.local                 youraccount+local@yourisp.example
+    @localdomain.local                 hisaccount+local@hisisp.example
 </pre>
 </blockquote>
 
-<p> When mail is sent to a remote host via SMTP, this replaces your
-local mail address <i>you@localdomain.local</i> by your ISP mail
-address, replaces <i>her@localdomain.local</i> by her ISP mail
-address, and replaces all other local addresses by your ISP account,
-with an address extension of +<i>local</i> (this example assumes
-that the ISP supports "+" style address extensions).  </p>
+<p> 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).  </p>
 
 <h3> <a name="aliases"> Local alias database </a> </h3>
 
index e573cb5a44265221c3737d4dfea09a73b5f45ee4..39dd1a7329da510c0e23e5f17b7f5e1e8c91d25c 100644 (file)
@@ -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 \
        cidr_table.5.html tcp_table.5.html header_checks.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
 AWK    = awk '{ print; if (NR == 2) print ".pl 9999\n.ll 65" }'
 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; \
        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
        PATH=../mantools:$$PATH; \
        srctoman - $? | $(AWK) | nroff -man | uniq | $(MAN2HTML) | postlink >$@
index 855747fca350b6313304fec05cc941f06f70e8fc..5febf71302858eca41f05d69d4a601da851b2609 100644 (file)
@@ -56,7 +56,7 @@ site</a>
 <li><a href="#dialup">Postfix on a dialup machine</a>
 
 <li><a href="#fantasy">Postfix on hosts without a real
-hostname</a>
+Internet hostname</a>
 
 </ul>
 
@@ -88,7 +88,7 @@ what is covered in the <a href="BASIC_CONFIGURATION_README.html">BASIC_CONFIGURA
 </blockquote>
 
 <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>
 
 <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
 first half of this document. </p>
 
-<p> If you do not have your own hostname (as with dynamic IP
-addressing) then you should also study the section on "<a
-href="#fantasy">Postfix on hosts without a real hostname</a>".
-</p>
+<p> If you do not have your own hostname and IP address (usually
+with dialup, cable TV or DSL connections) then you should also
+study the section on "<a href="#fantasy">Postfix on hosts without
+a real Internet hostname</a>".  </p>
 
 <ul>
 
@@ -689,23 +689,71 @@ newly-posted mail is flushed from the queue. </p>
 
 </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.
-Typically these are systems that get a dynamic IP address via DHCP
-or via dialup. Postfix will let you send and receive mail just fine
-between accounts on a machine with a fantasy name. However, you
-cannot use a fantasy hostname in your email address when sending
+<p> This section is for hosts that don't have their own Internet
+hostname.  Typically these are systems that get a dynamic IP address
+via DHCP or via dialup. Postfix will let you send and receive mail
+just fine between accounts on a machine with a fantasy name. However,
+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
-your mail. In fact, more and more sites refuse mail from non-existent
-domain names. </p>
+your mail. In fact, more and more sites refuse mail addresses with
+non-existent domain names. </p>
+
+<p> Note: the following information is Postfix version dependent.
+To find out what Postfix version you have, execute the command
+"<b>postconf <a href="postconf.5.html#mail_version">mail_version</a></b>". </p>
+
+<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>
 
-<p> The perfect solution would be for Postfix to do a mapping from
-local fantasy email addresses to valid Internet addresses when mail
-leaves the machine (similar to Sendmail's generics table). This is
-planned for the near future. </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> In the mean time, the solution with Postfix is to use valid
+<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 to local fantasy addresses. With this, you can
 send mail to the Internet and to local fantasy addresses, including
@@ -753,6 +801,16 @@ but is convenient.
 
 </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>
 
 </html>
index 3a13f7cb1c3fc603c0565abe817ff9900eb98313..38f242c58002ca355a0947323931563dd4bff34f 100644 (file)
@@ -148,8 +148,8 @@ ALIASES(5)                                             ALIASES(5)
               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>,  or
-              <b>include</b>.
+              more  of  <b>canonical</b>,   <b>virtual</b>,   <b>alias</b>,   <b>forward</b>,
+              <b>include</b>, or <b>generics</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>
index 62c373586d186b0ebc984d0846c68becbc14741d..6cb0a1b4f311dc2eb8e9bc3a4eaaee3765024a2a 100644 (file)
@@ -19,8 +19,8 @@ CANONICAL(5)                                         CANONICAL(5)
 <b>DESCRIPTION</b>
        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
-       used  by  the  <a href="cleanup.8.html"><b>cleanup</b>(8)</a>  daemon.  The address mapping is
-       recursive.
+       used  by the <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon, before mail is stored into
+       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
        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.
 
 <b>TABLE FORMAT</b>
-       make#   The input format for the <a href="postmap.1.html"><b>postmap</b>(1)</a> command is  as
-       follows:
+       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
@@ -76,13 +75,14 @@ CANONICAL(5)                                         CANONICAL(5)
               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>
-              <i>user</i>@<i>domain</i> is replaced by <i>address</i>. This  form  has
-              the highest precedence.
+              Replace <i>user</i>@<i>domain</i> by <i>address</i>. This form  has  the
+              highest precedence.
 
               This  is  useful  to clean up addresses produced by
               legacy mail systems.  It can also be used  to  pro-
@@ -90,17 +90,17 @@ CANONICAL(5)                                         CANONICAL(5)
               below for a simpler solution.
 
        <i>user address</i>
-              <i>user</i>@<i>site</i> is replaced 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">mydestina</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
+              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>.
 
               This  form  is  useful for replacing login names by
               <i>Firstname.Lastname</i>.
 
        @<i>domain address</i>
-              Every address in <i>domain</i>  is  replaced  by  <i>address</i>.
-              This form has the lowest precedence.
+              Replace other addresses in <i>domain</i> by <i>address</i>.  This
+              form has the lowest precedence.
 
        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>.
@@ -176,8 +176,8 @@ CANONICAL(5)                                         CANONICAL(5)
               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>,  or
-              <b>include</b>.
+              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:
 
index b2a630941b2b93e57944fdddabad49e694e622ce..9d54bbe686467f74ee95caae21aaf20a2360998a 100644 (file)
@@ -64,7 +64,7 @@ CIDR_TABLE(5)                                       CIDR_TABLE(5)
               line  that starts with whitespace continues a logi-
               cal line.
 
-<b>SEARCH ORDER</b>
+<b>TABLE SEARCH ORDER</b>
        Patterns are applied in the  order  as  specified  in  the
        table,  until  a  pattern is found that matches the search
        string.
diff --git a/postfix/html/generics.5.html b/postfix/html/generics.5.html
new file mode 100644 (file)
index 0000000..115417b
--- /dev/null
@@ -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> &lt;<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>
index af926710fafbb0215d582b71db2b43455ede102b..601e207919d0ed5c2319c025266e91fa1570f336 100644 (file)
@@ -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>
 instead.  </p>
 
-<p> The table search order is described below. The search terminates
-when a match is found. In other words, the search is non-recursive.
-</p>
-
-<dl>
-
-<dt> <i>user@domain.tld address</i> </dt>
+<p> The table format and lookups are documented in <a href="generics.5.html">generics(5)</a>;
+examples are shown in the <a href="ADDRESS_REWRITING_README.html">ADDRESS_REWRITING_README</a> and
+<a href="STANDARD_CONFIGURATION_README.html">STANDARD_CONFIGURATION_README</a> documents. </p>
 
-<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>
+<p> This feature is available in Postfix 2.2 and later.  </p>
 
 
 </DD>
index 24868b9433ba118bd45bc6290e185e56d37348de..333f02f9dc954ab6329e63bf85201881feaf76b8 100644 (file)
@@ -84,6 +84,8 @@ the following convention:  </p>
 
 <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="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="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 
 
 </ul>
@@ -120,9 +126,11 @@ the following convention:  </p>
 
 <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="generics.5.html">generics(5)</a>, Postfix output address rewriting 
 
-<li> <a href="canonical.5.html">canonical(5)</a>, Postfix 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 
 
index 1dee2171d6816e619e915fc3536749c539bbfe5e..08566ab8a8462274fe2004dd5818032bb63909fb 100644 (file)
@@ -198,12 +198,15 @@ POSTFIX(1)                                             POSTFIX(1)
        <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="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="postlock.1.html">postlock(1)</a>, Postfix-compatible locking
        <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="postqueue.1.html">postqueue(1)</a>, Postfix mail queue control
        <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
 
        Postfix configuration:
@@ -213,8 +216,9 @@ POSTFIX(1)                                             POSTFIX(1)
        Table-driven mechanisms:
        <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="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 address rewriting
+       <a href="canonical.5.html">canonical(5)</a>, Postfix input 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="transport.5.html">transport(5)</a>, Postfix routing table
        <a href="virtual.5.html">virtual(5)</a>, Postfix virtual aliasing
index 5072c5ead342f9543c066cee909d885f4b4e2397..9a31a3bfb302c834d942ed99b3f471c10d3c4ce5 100644 (file)
@@ -54,6 +54,7 @@ RELOCATED(5)                                         RELOCATED(5)
               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:
@@ -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>.
 
        @<i>domain</i>
-              Matches  every address in <i>domain</i>. This form has the
-              lowest precedence.
+              Matches  every  other  address in <i>domain</i>. This form
+              has the lowest precedence.
 
 <b>ADDRESS EXTENSION</b>
        When a mail address localpart contains the optional recip-
index 05800b5bbcc21e566d7ec35c86e271434c91459d..f93151e709c79c20a89a8e82f103e2c738249009 100644 (file)
@@ -85,28 +85,28 @@ TRANSPORT(5)                                         TRANSPORT(5)
        how or where to deliver mail. This is described in section
        "RESULT FORMAT".
 
-<b>TABLE LOOKUP</b>
+<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+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>user@domain transport</i>:<i>nexthop</i>
-              Mail for <i>user@domain</i> is delivered through <i>transport</i>
-              to <i>nexthop</i>.
+              Deliver  mail  for <i>user@domain</i> through <i>transport</i> 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>.
+              Deliver mail for <i>domain</i> through <i>transport</i>  to  <i>nex-</i>
+              <i>thop</i>.
 
        <i>.domain transport</i>:<i>nexthop</i>
-              Mail  for  any  subdomain  of  <i>domain</i>  is delivered
-              through <i>transport</i> to  <i>nexthop</i>.  This  applies  only
-              when the string <b><a href="postconf.5.html#transport_maps">transport_maps</a></b> is not listed in the
-              <b><a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a></b> configuration set-
+              Deliver  mail  for  any subdomain of <i>domain</i> through
+              <i>transport</i> to <i>nexthop</i>. This applies  only  when  the
+              string  <b><a href="postconf.5.html#transport_maps">transport_maps</a></b>  is  not  listed in the <b>par-</b>
+              <b>ent_domain_matches_subdomains</b>  configuration   set-
               ting.   Otherwise, a domain name matches itself and
               its subdomains.
 
index ec135d3e744db91f0d05c8c3a0474aae4a17145a..f52f1162384ef5e5ce97b9e20d3d914196f39ffc 100644 (file)
@@ -77,19 +77,20 @@ VIRTUAL(5)                                             VIRTUAL(5)
               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, address, ...</i>
-              Mail  for  <i>user</i>@<i>domain</i>  is  redirected  to <i>address</i>.
-              This form has the highest precedence.
+              Redirect  mail  for  <i>user</i>@<i>domain</i>  to <i>address</i>.  This
+              form has the highest precedence.
 
        <i>user address, address, ...</i>
-              Mail for <i>user</i>@<i>site</i> is redirected  to  <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>.
+              Redirect mail for <i>user</i>@<i>site</i> to <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">mydes</a>-</b>
+              <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>
+              or $<b><a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a></b>.
 
               This  functionality  overlaps with functionality of
               the local <i>aliases</i>(5) database.  The  difference  is
@@ -97,8 +98,8 @@ VIRTUAL(5)                                             VIRTUAL(5)
               addresses.
 
        @<i>domain address, address, ...</i>
-              Mail for  any  user  in  <i>domain</i>  is  redirected  to
-              <i>address</i>.  This form has the lowest precedence.
+              Redirect mail for other users in <i>domain</i> to <i>address</i>.
+              This form has the lowest precedence.
 
        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
@@ -219,8 +220,8 @@ VIRTUAL(5)                                             VIRTUAL(5)
               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>,  or
-              <b>include</b>.
+              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:
 
index 73711c8f558b8847a3e0133781566abd929195ae..7987737e205e7e5fbe8aa0edbd9b92d35f494277 100644 (file)
@@ -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/cidr_table.5 man5/tcp_table.5 man5/header_checks.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 \
        man1/qmqp-source.1 man1/qshape.1
 
@@ -240,6 +241,9 @@ man5/canonical.5: ../proto/canonical
 man5/cidr_table.5: ../proto/cidr_table
        ../mantools/srctoman - $? >$@
 
+man5/generics.5: ../proto/generics
+       ../mantools/srctoman - $? >$@
+
 man5/header_checks.5: ../proto/header_checks
        ../mantools/srctoman - $? >$@
 
index a08e0a5d0d0aaaf83fc25d64d94f6b3ff2799762..82c0a256c21a4e76d920e2d6dc424f37818aedb8 100644 (file)
@@ -163,12 +163,15 @@ Commands:
 postalias(1), create/update/query alias database
 postcat(1), examine Postfix queue file
 postconf(1), Postfix configuration utility
+postfix(1), Postfix control program
 postkick(1), trigger Postfix daemon
 postlock(1), Postfix-compatible locking
 postlog(1), Postfix-compatible logging
 postmap(1), Postfix lookup table manager
 postqueue(1), Postfix mail queue control
 postsuper(1), Postfix housekeeping
+mailq(1), Sendmail compatibility interface
+newaliases(1), Sendmail compatibility interface
 sendmail(1), Sendmail compatibility interface
 
 Postfix configuration:
@@ -178,8 +181,9 @@ postconf(5), Postfix main.cf file syntax
 Table-driven mechanisms:
 access(5), Postfix SMTP access control table
 aliases(5), Postfix alias database
-header_checks(5), body_checks(5), content inspection
-canonical(5), Postfix address rewriting
+canonical(5), Postfix input address rewriting
+generics(5), Postfix output address rewriting
+header_checks(5), body_checks(5), Postfix content inspection
 relocated(5), Users that have moved
 transport(5), Postfix routing table
 virtual(5), Postfix virtual aliasing
index bfd5c22b5bf0085c7153ba6d41d5d993c6ccfcd4..30297e87fe1750aa6305287a12119ad7f2fdcd18 100644 (file)
@@ -137,7 +137,8 @@ owner alias, instead using of the left-hand side address.
 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, or \fBinclude\fR.
+\fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR,
+or \fBgenerics\fR.
 .IP \fBowner_request_special\fR
 Give special treatment to \fBowner-\fIlistname\fR and
 \fIlistname\fB-request\fR
index 7032b003ba0a7a0cae24aaa835239d398c1e78ff..19ec6c26b4ff4fc9dfadea9de635f32fe71496cc 100644 (file)
@@ -18,7 +18,8 @@ Postfix canonical table format
 .fi
 The optional \fBcanonical\fR(5) table specifies an address mapping for
 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
 that serves as input to the \fBpostmap\fR(1) command.
@@ -57,7 +58,7 @@ Use the \fBaliases\fR(5) map for that purpose.
 .nf
 .ad
 .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"
 When \fIpattern\fR matches a mail address, replace it by the
 corresponding \fIresult\fR.
@@ -67,19 +68,23 @@ are lines whose first non-whitespace character is a `#'.
 .IP "multi-line text"
 A logical line starts with non-whitespace text. A line that
 starts with whitespace continues a logical line.
-.PP
+.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"
-\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.
 .sp
 This is useful to clean up addresses produced by legacy mail systems.
 It can also be used to produce \fIFirstname.Lastname\fR style
 addresses, but see below for a simpler solution.
 .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
 $\fBmydestination\fR, or when it is listed in $\fBinet_interfaces\fR
 or $\fBproxy_interfaces\fR.
@@ -87,7 +92,7 @@ or $\fBproxy_interfaces\fR.
 This form is useful for replacing login names by
 \fIFirstname.Lastname\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.
 .PP
 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
 an address extension from the original address to the result.
 Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
-\fBforward\fR, or \fBinclude\fR.
+\fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
 .PP
 Other parameters of interest:
 .IP \fBinet_interfaces\fR
index b4aa31ec647637e8f89e25c4b26fb5dfb93b527c..30504a406b14bdb3ecba131e79adb92e4df0db55 100644 (file)
@@ -57,7 +57,7 @@ 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 "SEARCH ORDER"
+.SH "TABLE SEARCH ORDER"
 .na
 .nf
 .ad
diff --git a/postfix/man/man5/generics.5 b/postfix/man/man5/generics.5
new file mode 100644 (file)
index 0000000..486d8ed
--- /dev/null
@@ -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
index 72f6b5582ecff6046466adf35e00b72fc01914ef..f74971bcb11a74ca5961c0920ab86318bad04ac1 100644 (file)
@@ -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
 instead.
 .PP
-The table search order is described below. The search terminates
-when a match is found. In other words, the search is non-recursive.
-.IP "\fIuser@domain.tld address\fR"
-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
-In all cases \fIaddress\fR must specify a username and a
-domain.
+The table format and lookups are documented in \fBgenerics\fR(5);
+examples are shown in the ADDRESS_REWRITING_README and
+STANDARD_CONFIGURATION_README documents.
+.PP
 This feature is available in Postfix 2.2 and later.
 .SH smtp_helo_name (default: $myhostname)
 The hostname to send in the SMTP EHLO or HELO command.
index c48cc952a2ba862df4eb5637bb9aff767f20fe7b..5e8c9c182c62cd68538e8dfb0f77c76fb2ecd914 100644 (file)
@@ -51,7 +51,11 @@ are lines whose first non-whitespace character is a `#'.
 .IP \(bu
 A logical line starts with non-whitespace text. A line that
 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
 tables such as NIS, LDAP or SQL, patterns are tried in the order as
 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
 is listed in $\fBinet_interfaces\fR or $\fBproxy_interfaces\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.
 .SH "ADDRESS EXTENSION"
 .na
index 8155003cbe474e97587f260d18f2bf5c22b4f624..81210fb1b7feffbca3f5f0d3abe6d8f0967fcfa0 100644 (file)
@@ -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
 specifies how or where to deliver mail. This is described in
 section "RESULT FORMAT".
-.SH "TABLE LOOKUP"
+.SH "TABLE SEARCH ORDER"
 .na
 .nf
 .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
 listed below:
 .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
 \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.
 .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.
 .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
 string \fBtransport_maps\fR is not listed in the
 \fBparent_domain_matches_subdomains\fR configuration setting.
index f53af1b5e4f4716b2824388909de16d09d85e291..92786a6dccd9e586b99876894a57ac182ba6f396 100644 (file)
@@ -67,15 +67,19 @@ are lines whose first non-whitespace character is a `#'.
 .IP "multi-line text"
 A logical line starts with non-whitespace text. A line that
 starts with whitespace continues a logical line.
-.PP
+.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, 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.
 .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
 $\fBmydestination\fR, or when it is listed in $\fBinet_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)
 mapping can be applied to non-local addresses.
 .IP "@\fIdomain address, address, ...\fR"
-Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR.
+Redirect mail for other users in \fIdomain\fR to \fIaddress\fR.
 This form has the lowest precedence.
 .PP
 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
 an address extension from the original address to the result.
 Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,
-\fBforward\fR, or \fBinclude\fR.
+\fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
 .PP
 Other parameters of interest:
 .IP \fBinet_interfaces\fR
index 793167d8c09a3d069ad010d7a9a1e4915f3baed5..c12d146ceeb5f6eca0f7c71d16d2d7c95cf64fce 100644 (file)
@@ -103,3 +103,11 @@ man/man1/postfix.1:44:.IP \fBflush\fR
 man/man8/oqmgr.8:55:.IP \fBbounce\fR 
 man/man8/qmgr.8:55:.IP \fBbounce\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 
index 2a7798eaf1c47b5ef582087a7850245a10772c91..af081aa4be2382d111b9ac5418ae8a1f6baaf60a 100755 (executable)
@@ -552,7 +552,7 @@ while (<>) {
     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>]*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>]*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;
index 7e8e4b6ae5a2db83fbd5a03b1f1419547d8afa38..83b4ad8343da2371dd0469c839d853d34f817726 100644 (file)
@@ -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
 reject mail addresses with invalid domain names. </p>
 
-<p> With the smtp_generics_maps parameter you can specify lookup
-tables that replace local mail addresses by valid Internet addresses
-when mail leaves the machine via SMTP. This mapping replaces envelope
-and header addresses, and is non-recursive. It does not happen when
-you send mail between addresses on the local machine. </p>
+<p> With the smtp_generics_maps parameter you can specify generics(5)
+lookup tables that replace local mail addresses by valid Internet
+addresses when mail leaves the machine via SMTP. The generics(5)
+mapping replaces envelope and header addresses, and is non-recursive.
+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>
 
@@ -962,18 +963,18 @@ you send mail between addresses on the local machine. </p>
     smtp_generics_maps = hash:/etc/postfix/generics
 
 /etc/postfix/generics:
-    you@localdomain.local              youraccount@yourisp.example
+    his@localdomain.local              hisaccount@hisisp.example
     her@localdomain.local              heraccount@herisp.example
-    @localdomain.local                 youraccount+local@yourisp.example
+    @localdomain.local                 hisaccount+local@hisisp.example
 </pre>
 </blockquote>
 
-<p> When mail is sent to a remote host via SMTP, this replaces your
-local mail address <i>you@localdomain.local</i> by your ISP mail
-address, replaces <i>her@localdomain.local</i> by her ISP mail
-address, and replaces all other local addresses by your ISP account,
-with an address extension of +<i>local</i> (this example assumes
-that the ISP supports "+" style address extensions).  </p>
+<p> 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).  </p>
 
 <h3> <a name="aliases"> Local alias database </a> </h3>
 
index cda9815e787b6e0089b6ebb58473856bf77a57b4..7656e01149b8ecc8de49bc85401500464f4e7321 100644 (file)
@@ -3,7 +3,8 @@ SHELL   = /bin/sh
 # For now, just hard-coded rules.
 
 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/ADDRESS_REWRITING_README.html \
@@ -104,6 +105,9 @@ clobber:
 ../conf/canonical: canonical
        $(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
        $(SRCTOMAN) - $? | $(AWK) | nroff -man | col -bx | uniq | sed 's/^/# /' >$@
 
index c06e37764974496e24189e53f07440ffb555b1e9..efb35e6c3f58a3f064b869e029bf751433e43e3d 100644 (file)
@@ -56,7 +56,7 @@ site</a>
 <li><a href="#dialup">Postfix on a dialup machine</a>
 
 <li><a href="#fantasy">Postfix on hosts without a real
-hostname</a>
+Internet hostname</a>
 
 </ul>
 
@@ -88,7 +88,7 @@ what is covered in the BASIC_CONFIGURATION_README document: </p>
 </blockquote>
 
 <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>
 
 <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
 first half of this document. </p>
 
-<p> If you do not have your own hostname (as with dynamic IP
-addressing) then you should also study the section on "<a
-href="#fantasy">Postfix on hosts without a real hostname</a>".
-</p>
+<p> If you do not have your own hostname and IP address (usually
+with dialup, cable TV or DSL connections) then you should also
+study the section on "<a href="#fantasy">Postfix on hosts without
+a real Internet hostname</a>".  </p>
 
 <ul>
 
@@ -689,23 +689,71 @@ newly-posted mail is flushed from the queue. </p>
 
 </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.
-Typically these are systems that get a dynamic IP address via DHCP
-or via dialup. Postfix will let you send and receive mail just fine
-between accounts on a machine with a fantasy name. However, you
-cannot use a fantasy hostname in your email address when sending
+<p> This section is for hosts that don't have their own Internet
+hostname.  Typically these are systems that get a dynamic IP address
+via DHCP or via dialup. Postfix will let you send and receive mail
+just fine between accounts on a machine with a fantasy name. However,
+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
-your mail. In fact, more and more sites refuse mail from non-existent
-domain names. </p>
+your mail. In fact, more and more sites refuse mail addresses with
+non-existent domain names. </p>
+
+<p> Note: the following information is Postfix version dependent.
+To find out what Postfix version you have, execute the command
+"<b>postconf mail_version</b>". </p>
+
+<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>
 
-<p> The perfect solution would be for Postfix to do a mapping from
-local fantasy email addresses to valid Internet addresses when mail
-leaves the machine (similar to Sendmail's generics table). This is
-planned for the near future. </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> In the mean time, the solution with Postfix is to use valid
+<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 to local fantasy addresses. With this, you can
 send mail to the Internet and to local fantasy addresses, including
@@ -753,6 +801,16 @@ but is convenient.
 
 </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>
 
 </html>
index d7d18c03590dfcd0911c4b0c33b1981daca6fe3d..b2a690785aef81f7cc5272484d5a40a6206eb48c 100644 (file)
 #      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, or \fBinclude\fR.
+#      \fBvirtual\fR, \fBalias\fR, \fBforward\fR, \fBinclude\fR,
+#      or \fBgenerics\fR.
 # .IP \fBowner_request_special\fR
 #      Give special treatment to \fBowner-\fIlistname\fR and
 #      \fIlistname\fB-request\fR
index 93916ee605eb1b8a29e319bc70a67f1ca9523f5f..0a80511614c51830f27137cb892feadedee2ca34 100644 (file)
@@ -12,7 +12,8 @@
 # DESCRIPTION
 #      The optional \fBcanonical\fR(5) table specifies an address mapping for
 #      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
 #      that serves as input to the \fBpostmap\fR(1) command.
@@ -49,7 +50,7 @@
 # TABLE FORMAT
 # .ad
 # .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"
 #      When \fIpattern\fR matches a mail address, replace it by the
 #      corresponding \fIresult\fR.
@@ -59,19 +60,21 @@ make#       The input format for the \fBpostmap\fR(1) command is as follows:
 # .IP "multi-line text"
 #      A logical line starts with non-whitespace text. A line that
 #      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
 #      tables such as NIS, LDAP or SQL, patterns are tried in the order as
 #      listed below:
 # .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.
 #      .sp
 #      This is useful to clean up addresses produced by legacy mail systems.
 #      It can also be used to produce \fIFirstname.Lastname\fR style
 #      addresses, but see below for a simpler solution.
 # .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
 #      $\fBmydestination\fR, or when it is listed in $\fBinet_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
 #      \fIFirstname.Lastname\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.
 # .PP
 #      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
 #      an address extension from the original address to the result.
 #      Specify zero or more of \fBcanonical\fR, \fBvirtual\fR, \fBalias\fR,  
-#      \fBforward\fR, or \fBinclude\fR.
+#      \fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
 # .PP
 #      Other parameters of interest:
 # .IP \fBinet_interfaces\fR
index 341f516a956443201a6a622d618d21ac77a7149f..4783262221afc121bbaa0831d547aea9d8ef12af 100644 (file)
@@ -49,7 +49,7 @@
 # .IP "multi-line text"
 #      A logical line starts with non-whitespace text. A line that
 #      starts with whitespace continues a logical line.
-# SEARCH ORDER
+# TABLE SEARCH ORDER
 # .ad
 # .fi
 #      Patterns are applied in the order as specified in the table, until a
diff --git a/postfix/proto/generics b/postfix/proto/generics
new file mode 100644 (file)
index 0000000..cc5684a
--- /dev/null
@@ -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
+#--
index 51a8be675bff4c7fc86cb4714766e0ace539cff9..3cd47a66effa0607400e3a284ee354b9f2e679b3 100644 (file)
@@ -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>
 instead.  </p>
 
-<p> The table search order is described below. The search terminates
-when a match is found. In other words, the search is non-recursive.
-</p>
-
-<dl>
-
-<dt> <i>user@domain.tld address</i> </dt>
+<p> The table format and lookups are documented in generics(5);
+examples are shown in the ADDRESS_REWRITING_README and
+STANDARD_CONFIGURATION_README documents. </p>
 
-<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>
+<p> This feature is available in Postfix 2.2 and later.  </p>
index b8f2d148bb33e6b2fc0678fc2378d77073215ca7..6d00ca76cccb78708fc3330dc1af4b30eccd2f80 100644 (file)
@@ -43,7 +43,9 @@
 # .IP \(bu
 #      A logical line starts with non-whitespace text. A line that
 #      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
 #      tables such as NIS, LDAP or SQL, patterns are tried in the order as
 #      listed below:
@@ -55,7 +57,7 @@
 #      when \fIsite\fR is listed in $\fBmydestination\fR, or when \fIsite\fR
 #      is listed in $\fBinet_interfaces\fR or $\fBproxy_interfaces\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.
 # ADDRESS EXTENSION
 # .fi
index 9bd3cf3762288076ea7f3063c0a0f5916616e4c1..cd5179a05a3798109a2cb4ba09c39f0348ba301d 100644 (file)
 #      The \fIresult\fR is of the form \fItransport:nexthop\fR and
 #      specifies how or where to deliver mail. This is described in
 #      section "RESULT FORMAT".
-# TABLE LOOKUP
+# 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+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
 #      \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.
 # .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.
 # .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
 #      string \fBtransport_maps\fR is not listed in the
 #      \fBparent_domain_matches_subdomains\fR configuration setting.
index 01a3d381ab2eeb8396e99e75dc147bc4af6ea007..03759f4357f556392b6dfa2b126274b1addb6ffd 100644 (file)
 # .IP "multi-line text"
 #      A logical line starts with non-whitespace text. A line that
 #      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
 #      tables such as NIS, LDAP or SQL, patterns are tried in the order as
 #      listed below:
 # .IP "\fIuser\fR@\fIdomain address, address, ...\fR"
-#      Mail for \fIuser\fR@\fIdomain\fR is redirected to \fIaddress\fR.
+#      Redirect mail for \fIuser\fR@\fIdomain\fR to \fIaddress\fR.
 #      This form has the highest precedence.
 # .IP "\fIuser address, address, ...\fR"
-#      Mail for \fIuser\fR@\fIsite\fR is redirected to \fIaddress\fR when
+#      Redirect mail for \fIuser\fR@\fIsite\fR to \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.
@@ -76,7 +78,7 @@
 #      \fIaliases\fR(5) database. The difference is that \fBvirtual\fR(5)
 #      mapping can be applied to non-local addresses.
 # .IP "@\fIdomain address, address, ...\fR"
-#      Mail for any user in \fIdomain\fR is redirected to \fIaddress\fR.
+#      Redirect mail for other users in \fIdomain\fR to \fIaddress\fR.
 #      This form has the lowest precedence.
 # .PP
 #      In all the above forms, when \fIaddress\fR has the form
 #      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, or \fBinclude\fR.
+#      \fBforward\fR, \fBinclude\fR, or \fBgenerics\fR.
 # .PP
 #      Other parameters of interest:
 # .IP \fBinet_interfaces\fR
index 7a813eb5d581a3e969b11cf692a9c8567599940e..cdf6840a8f46852b4b713cea35967830ba54b461 100644 (file)
@@ -278,6 +278,7 @@ static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf,
 {
     const char *optional_text = value + strcspn(value, " \t");
     int     command_len = optional_text - value;
+    VSTRING *bp;
 
     while (*optional_text && ISSPACE(*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 (*optional_text == 0) {
            msg_warn("REPLACE action without text in %s map", map_class);
-       } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0
-                  && !is_header(optional_text)) {
-           msg_warn("bad REPLACE header text \"%s\" in %s map, "
-                    "need \"headername: headervalue\"",
-                    optional_text, map_class);
+           return (CLEANUP_ACT_KEEP);
+       } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0) {
+           if (!is_header(optional_text)) {
+               msg_warn("bad REPLACE header text \"%s\" in %s map, "
+                        "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 {
-           cleanup_act_log(state, "replace", context, buf, optional_text);
            cleanup_out_string(state, REC_TYPE_NORM, optional_text);
        }
+       cleanup_act_log(state, "replace", context, buf, optional_text);
        return (CLEANUP_ACT_DROP);
     }
     if (STREQUAL(value, "REDIRECT", command_len)) {
index 83f273542574d6c03e216bd571919992aed3b08c..06af3306e6c466035ea1162a71871f653d075201 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050206"
+#define MAIL_RELEASE_DATE      "20050207"
 #define MAIL_VERSION_NUMBER    "2.2"
 
 #define VAR_MAIL_VERSION       "mail_version"
index 03f320ab81e5c6cf27362a2c595c155105332a8b..68efdc25bc7893f0bd34ec35cbffa7afacc40e7d 100644 (file)
 /*     postalias(1), create/update/query alias database
 /*     postcat(1), examine Postfix queue file
 /*     postconf(1), Postfix configuration utility
+/*     postfix(1), Postfix control program
 /*     postkick(1), trigger Postfix daemon
 /*     postlock(1), Postfix-compatible locking
 /*     postlog(1), Postfix-compatible logging
 /*     postmap(1), Postfix lookup table manager
 /*     postqueue(1), Postfix mail queue control
 /*     postsuper(1), Postfix housekeeping
+/*     mailq(1), Sendmail compatibility interface
+/*     newaliases(1), Sendmail compatibility interface
 /*     sendmail(1), Sendmail compatibility interface
 /*
 /*     Postfix configuration:
 /*     Table-driven mechanisms:
 /*     access(5), Postfix SMTP access control table
 /*     aliases(5), Postfix alias database
-/*     header_checks(5), body_checks(5), content inspection
-/*     canonical(5), Postfix address rewriting
+/*     canonical(5), Postfix input address rewriting
+/*     generics(5), Postfix output address rewriting
+/*     header_checks(5), body_checks(5), Postfix content inspection
 /*     relocated(5), Users that have moved
 /*     transport(5), Postfix routing table
 /*     virtual(5), Postfix virtual aliasing