]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.10-20121019
authorWietse Venema <wietse@porcupine.org>
Fri, 19 Oct 2012 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:38:19 +0000 (06:38 +0000)
31 files changed:
postfix/HISTORY
postfix/README_FILES/LINUX_README
postfix/README_FILES/STANDARD_CONFIGURATION_README
postfix/conf/aliases
postfix/html/LINUX_README.html
postfix/html/STANDARD_CONFIGURATION_README.html
postfix/html/aliases.5.html
postfix/html/cleanup.8.html
postfix/html/mailq.1.html
postfix/html/newaliases.1.html
postfix/html/postconf.5.html
postfix/html/sendmail.1.html
postfix/html/tlsproxy.8.html
postfix/man/man1/sendmail.1
postfix/man/man5/aliases.5
postfix/man/man5/postconf.5
postfix/man/man8/cleanup.8
postfix/man/man8/tlsproxy.8
postfix/proto/LINUX_README.html
postfix/proto/STANDARD_CONFIGURATION_README.html
postfix/proto/aliases
postfix/proto/postconf.proto
postfix/src/cleanup/cleanup.c
postfix/src/global/dict_ldap.c
postfix/src/global/mail_version.h
postfix/src/oqmgr/qmgr_message.c
postfix/src/postmap/postmap.c
postfix/src/sendmail/sendmail.c
postfix/src/tls/tls_misc.c
postfix/src/tlsproxy/tlsproxy.c
postfix/src/util/binhash.c

index e9dff859d497e265e656bc7b22513a4649bf70fb..9a523a5cd33c8bbdd4e217b63581424df5af9748 100644 (file)
@@ -18012,3 +18012,49 @@ Apologies for any names omitted.
        Bugfix: the postscreen_access_list feature was case-sensitive
        in the first character of permit, reject, etc. Reported by
        Francis Picabia. File: global/server_acl.c.
+
+20121009
+
+       Documentation: interaction between delay_warning_time,
+       notify_classes and delay_notice_recipient. File:
+       proto/postconf.proto.
+
+20101009
+
+       Human factors: log a warning that the postcat option -m
+       without -h or -b has no effect. File: postcat/postcat.c.
+
+20121010
+
+       Bugfix (introduced: Postfix 2.5): memory leak in program
+       initialization. Reported by Coverity. File: tls/tls_misc.c.
+
+       Bugfix (introduced: Postfix 2.3): memory leak in the unused
+       oqmgr program. Reported by Coverity. File: oqmgr/qmgr_message.c.
+
+20121011
+
+       Documentation: how to enable /etc/hosts multi-record lookups
+       with main.cf settings.  File: proto/LINUX_README.html.
+
+       Documentation: clarified the postscreen-tlsproxy interface.
+       File: tlsproxy/tlsproxy.c.
+
+20121012
+
+       Documentation: a simpler null-client example.  File:
+       proto/STANDARD_CONFIGURATION_README.html
+
+20120113
+
+       Cleanup: to compute the LDAP connection cache lookup key,
+       join the numeric fields with null, just like string fields.
+       Viktor Dukhovni. File: global/dict_ldap.c.
+
+20121015
+
+       Documentation: added section on regular-expression tables
+       to the aliases(5) manpage. File: proto/aliases.
+
+       Documentation: why "smtp_address_preference = any" is the
+       preferred setting. File: proto/postconf.proto.
index dd9a81373bab85ee0669ae677738c33ba7654949..a8569c7bb1f5df9e8c8bb246dbd7ca30739ed93f 100644 (file)
@@ -16,6 +16,12 @@ addresses:
         multi on
         ...
 
+Alternatively, specify the RESOLV_MULTI environment variable in main.cf:
+
+    /etc/postfix/main.cf:
+        import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY
+    DISPLAY LANG=C RESOLV_MULTI=on
+
 B\bBe\ber\brk\bke\bel\ble\bey\by D\bDB\bB i\bis\bss\bsu\bue\bes\bs
 
 If you can't compile Postfix because the file "db.h" isn't found, then you MUST
index ee823aaaffec1a3ca8e6182515dec02be1690242..ceb18fce8a7afe106318caac3c4f59cd2d538390 100644 (file)
@@ -63,32 +63,38 @@ the network, and it does not deliver any mail locally. A null client typically
 uses POP, IMAP or NFS for mailbox access.
 
 In this example we assume that the Internet domain name is "example.com" and
-that the machine is named "nullclient.example.com". As usual, the examples show
+that the machine is named "hostname.example.com". As usual, the examples show
 only parameters that are not left at their default settings.
 
     1 /etc/postfix/main.cf:
-    2     myorigin = $mydomain
-    3     relayhost = $mydomain
-    4     inet_interfaces = loopback-only
-    5     local_transport = error:local delivery is disabled
-    6
-    7 /etc/postfix/master.cf:
-    8     Comment out the local delivery agent entry
+    2     myhostname = hostname.example.com
+    3     myorigin = $mydomain
+    4     relayhost = $mydomain
+    5     inet_interfaces = loopback-only
+    6     mydestination =
 
 Translation:
 
-  * Line 2: Send mail as "user@example.com" (instead of
-    "user@nullclient.example.com"), so that nothing ever has a reason to send
-    mail to "user@nullclient.example.com".
+  * Line 2: Set myhostname to hostname.example.com, in case the machine name
+    isn't set to a fully-qualified domain name (use the command "postconf -
+    d myhostname" to find out what the machine name is).
+
+  * Line 2: The myhostname value also provides the default value for the
+    mydomain parameter (here, "mydomain = example.com").
+
+  * Line 3: Send mail as "user@example.com" (instead of
+    "user@hostname.example.com"), so that nothing ever has a reason to send
+    mail to "user@hostname.example.com".
 
-  * Line 3: Forward all mail to the mail server that is responsible for the
+  * Line 4: Forward all mail to the mail server that is responsible for the
     "example.com" domain. This prevents mail from getting stuck on the null
     client if it is turned off while some remote destination is unreachable.
+    Specify a real hostname here if your "example.com" domain has no MX record.
 
-  * Line 4: Do not accept mail from the network.
+  * Line 5: Do not accept mail from the network.
 
-  * Lines 5-8: Disable local mail delivery. All mail goes to the mail server as
-    specified in line 3.
+  * Line 6: Disable local mail delivery. All mail goes to the mail server as
+    specified in line 4.
 
 P\bPo\bos\bst\btf\bfi\bix\bx o\bon\bn a\ba l\blo\boc\bca\bal\bl n\bne\bet\btw\bwo\bor\brk\bk
 
index 8a19f8e5ae63c5093b8c10a23570e37b6242cb71..52183e231e5702330aed335e7104b88842ceb9aa 100644 (file)
@@ -56,9 +56,15 @@ decode:              root
 #        newaliases  in  order  to  rebuild  the indexed file after
 #        changing the Postfix alias database.
 # 
-#        The input and output file formats are expected to be  com-
-#        patible  with  Sendmail  version 8, and are expected to be
-#        suitable for the use as NIS maps.
+#        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. In this case, the lookups are done  in  a  slightly
+#        different way as described below under "REGULAR EXPRESSION
+#        TABLES".
 # 
 #        Users can control delivery of their own mail by setting up
 #        .forward files in their home directory.  Lines in per-user
@@ -143,6 +149,25 @@ decode:            root
 #        The local(8) delivery agent always folds the search string
 #        to lowercase before database 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). NOTE: these formats
+#        do not use ":" at the end of a pattern.
+# 
+#        Each regular expression is applied to  the  entire  search
+#        string.  Thus,  a  search string user+foo is not broken up
+#        into user and foo.
+# 
+#        Regular expressions are applied in the order as  specified
+#        in  the  table,  until  a regular expression is found that
+#        matches the search string.
+# 
+#        Lookup results are the same as with indexed file  lookups.
+#        For  security  reasons there is no support for $1, $2 etc.
+#        substring interpolation.
+# 
 # SECURITY
 #        The local(8) delivery agent disallows  regular  expression
 #        substitution  of $1 etc. in alias_maps, because that would
index f6f7bbef6d1e5d6387ab23f8c893db19a730a238..f06c1b4b3f6bbf8978e1533517af8fd7b6720de3 100644 (file)
@@ -35,6 +35,16 @@ addresses.  To fix, turn on support for multiple IP addresses: </p>
 </pre>
 </blockquote>
 
+<p> Alternatively, specify the RESOLV_MULTI environment variable
+in <a href="postconf.5.html">main.cf</a>: </p>
+
+<blockquote>
+<pre>
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
+    <a href="postconf.5.html#import_environment">import_environment</a> = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C RESOLV_MULTI=on
+</pre>
+</blockquote>
+
 <h2>Berkeley DB issues</h2>
 
 <p> If you can't compile Postfix because the file "db.h"
index 304df649de3d04f88da71ec6a419a45aca1503fe..660feac37dc006a64e5d6b1223feae29df6bea74 100644 (file)
@@ -102,20 +102,18 @@ mail from the network, and it does not deliver any mail locally. A
 null client typically uses POP, IMAP or NFS for mailbox access. </p>
 
 <p> In this example we assume that the Internet domain name is
-"example.com" and that the machine is named "nullclient.example.com".
+"example.com" and that the machine is named "hostname.example.com".
 As usual, the examples show only parameters that are not left at
 their default settings. </p>
 
 <blockquote>
 <pre>
 1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
-2     <a href="postconf.5.html#myorigin">myorigin</a> = $<a href="postconf.5.html#mydomain">mydomain</a>
-3     <a href="postconf.5.html#relayhost">relayhost</a> = $<a href="postconf.5.html#mydomain">mydomain</a>
-4     <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback-only
-5     <a href="postconf.5.html#local_transport">local_transport</a> = <a href="error.8.html">error</a>:local delivery is disabled
-6 
-7 /etc/postfix/<a href="master.5.html">master.cf</a>:
-8     Comment out the local delivery agent entry
+2     <a href="postconf.5.html#myhostname">myhostname</a> = hostname.example.com
+3     <a href="postconf.5.html#myorigin">myorigin</a> = $<a href="postconf.5.html#mydomain">mydomain</a>
+4     <a href="postconf.5.html#relayhost">relayhost</a> = $<a href="postconf.5.html#mydomain">mydomain</a>
+5     <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> = loopback-only
+6     <a href="postconf.5.html#mydestination">mydestination</a> =
 </pre>
 </blockquote>
 
@@ -123,19 +121,29 @@ their default settings. </p>
 
 <ul>
 
-<li> <p> Line 2: Send mail as "user@example.com" (instead of
-"user@nullclient.example.com"), so that nothing ever has a reason
-to send mail to "user@nullclient.example.com". </p>
+<li> <p> Line 2: Set <a href="postconf.5.html#myhostname">myhostname</a> to hostname.example.com, in case
+the machine name isn't set to a fully-qualified domain name (use
+the command "postconf -d <a href="postconf.5.html#myhostname">myhostname</a>" to find out what the machine
+name is).  </p>
+
+<li> <p> Line 2: The <a href="postconf.5.html#myhostname">myhostname</a> value also provides the default
+value for the <a href="postconf.5.html#mydomain">mydomain</a> parameter (here, "<a href="postconf.5.html#mydomain">mydomain</a> = example.com").
+</p>
+
+<li> <p> Line 3: Send mail as "user@example.com" (instead of
+"user@hostname.example.com"), so that nothing ever has a reason
+to send mail to "user@hostname.example.com". </p>
 
-<li> <p> Line 3: Forward all mail to the mail server that is
+<li> <p> Line 4: Forward all mail to the mail server that is
 responsible for the "example.com" domain. This prevents mail from
 getting stuck on the null client if it is turned off while some
-remote destination is unreachable. </p>
+remote destination is unreachable. Specify a real hostname
+here if your "example.com" domain has no MX record. </p>
 
-<li> <p> Line 4: Do not accept mail from the network. </p>
+<li> <p> Line 5: Do not accept mail from the network. </p>
 
-<li> <p> Lines 5-8: Disable local mail delivery. All mail goes to
-the mail server as specified in line 3.  </p>
+<li> <p> Line 6: Disable local mail delivery. All mail goes to
+the mail server as specified in line 4.  </p>
 
 </ul>
 
index 6ed4b8bb3d8e4d75a7ff6647a0b9c23814f8a2aa..aa1b053e0d1020884baba3d5b91f451599528173 100644 (file)
@@ -24,9 +24,15 @@ ALIASES(5)                                                          ALIASES(5)
        <b>newaliases</b>  in  order  to  rebuild  the indexed file after
        changing the Postfix alias database.
 
-       The input and output file formats are expected to be  com-
-       patible  with  Sendmail  version 8, and are expected to be
-       suitable for the use as NIS maps.
+       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. In this case, the lookups are done  in  a  slightly
+       different way as described below under "REGULAR EXPRESSION
+       TABLES".
 
        Users can control delivery of their own mail by setting up
        <b>.forward</b> files in their home directory.  Lines in per-user
@@ -111,6 +117,25 @@ ALIASES(5)                                                          ALIASES(5)
        The <a href="local.8.html">local(8)</a> delivery agent always folds the search string
        to lowercase before database 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>. NOTE: these formats
+       do not use ":" at the end of a pattern.
+
+       Each regular expression is applied to  the  entire  search
+       string.  Thus,  a  search string <i>user+foo</i> is not broken up
+       into <i>user</i> and <i>foo</i>.
+
+       Regular expressions are applied in the order as  specified
+       in  the  table,  until  a regular expression is found that
+       matches the search string.
+
+       Lookup results are the same as with indexed file  lookups.
+       For  security  reasons there is no support for <b>$1</b>, <b>$2</b> etc.
+       substring interpolation.
+
 <b>SECURITY</b>
        The <a href="local.8.html"><b>local</b>(8)</a> delivery agent disallows  regular  expression
        substitution  of $1 etc. in <b><a href="postconf.5.html#alias_maps">alias_maps</a></b>, because that would
index 1071b1efa290d288aea569fd7cd62be535a03485..b12dd0f1c1744ed07ff037d03737d36526e563d7 100644 (file)
@@ -438,8 +438,8 @@ CLEANUP(8)                                                          CLEANUP(8)
               point when logging sub-second delay values.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
-              The time after which the sender receives  the  mes-
-              sage headers of mail that is still queued.
+              The time after which the sender receives a copy  of
+              the message headers of mail that is still queued.
 
        <b><a href="postconf.5.html#ipc_timeout">ipc_timeout</a> (3600s)</b>
               The time limit for sending or receiving information
index 3fa1ae37f6c7f764e2b23742f80e45fb9a109560..d463d2a649264ffc78a800cac0713244e0f68818 100644 (file)
@@ -443,8 +443,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               <a href="postalias.1.html"><b>postalias</b>(1)</a> and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
-              The  time  after which the sender receives the mes-
-              sage headers of mail that is still queued.
+              The  time after which the sender receives a copy of
+              the message headers of mail that is still queued.
 
        <b><a href="postconf.5.html#enable_errors_to">enable_errors_to</a> (no)</b>
               Report mail delivery errors to the  address  speci-
index 3fa1ae37f6c7f764e2b23742f80e45fb9a109560..d463d2a649264ffc78a800cac0713244e0f68818 100644 (file)
@@ -443,8 +443,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               <a href="postalias.1.html"><b>postalias</b>(1)</a> and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
-              The  time  after which the sender receives the mes-
-              sage headers of mail that is still queued.
+              The  time after which the sender receives a copy of
+              the message headers of mail that is still queued.
 
        <b><a href="postconf.5.html#enable_errors_to">enable_errors_to</a> (no)</b>
               Report mail delivery errors to the  address  speci-
index 62b7fe703fd27ee2cd4e5d104b1083b31443e5d2..fc06380f31ee59dd390031b5cf32ac11b3b4a3c5 100644 (file)
@@ -2516,7 +2516,7 @@ of mail that cannot be delivered within $<a href="postconf.5.html#delay_warning_
 units.  </p>
 
 <p>
-This feature is enabled with the <a href="postconf.5.html#delay_warning_time">delay_warning_time</a> parameter.
+See also: <a href="postconf.5.html#delay_warning_time">delay_warning_time</a>, <a href="postconf.5.html#notify_classes">notify_classes</a>.
 </p>
 
 
@@ -2526,8 +2526,8 @@ This feature is enabled with the <a href="postconf.5.html#delay_warning_time">de
 (default: 0h)</b></DT><DD>
 
 <p>
-The time after which the sender receives the message headers of
-mail that is still queued.
+The time after which the sender receives a copy of the message
+headers of mail that is still queued.
 </p>
 
 <p>
@@ -2541,6 +2541,10 @@ Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is h (hours).
 </p>
 
+<p>
+See also: <a href="postconf.5.html#delay_notice_recipient">delay_notice_recipient</a>, <a href="postconf.5.html#notify_classes">notify_classes</a>.
+</p>
+
 
 </DD>
 
@@ -6734,7 +6738,8 @@ is available in Postfix 2.9 and later.  </dd>
 
 <dt><b>delay</b></dt>
 
-<dd>Send the postmaster copies of the headers of delayed mail. The
+<dd>Send the postmaster copies of the headers of delayed mail (see
+<a href="postconf.5.html#delay_warning_time">delay_warning_time</a>). The
 notification is sent to the address specified with the
 <a href="postconf.5.html#delay_notice_recipient">delay_notice_recipient</a> configuration parameter (default: postmaster).
 </dd>
@@ -9209,6 +9214,21 @@ addresses with equal MX preference. This feature has no effect
 unless the <a href="postconf.5.html#inet_protocols">inet_protocols</a> setting enables both IPv4 and IPv6.
 With Postfix 2.8 the default is "ipv6".  </p>
 
+<p> Notes for mail delivery between sites that have both IPv4 and
+IPv6 connectivity: </p>
+
+<ul>
+
+<li> <p> The setting "<a href="postconf.5.html#smtp_address_preference">smtp_address_preference</a> = ipv6" is unsafe.
+It can fail to deliver mail when there is an outage that affects
+IPv6, while the destination is still reachable over IPv4. </p>
+
+<li> <p> The setting "<a href="postconf.5.html#smtp_address_preference">smtp_address_preference</a> = any" is safe. With
+this, mail will eventually be delivered even if there is an outage
+that affects IPv6 or IPv4, as long as it does not affect both. </p>
+
+</ul>
+
 <p> This feature is available in Postfix 2.8 and later.  </p>
 
 
index 3fa1ae37f6c7f764e2b23742f80e45fb9a109560..d463d2a649264ffc78a800cac0713244e0f68818 100644 (file)
@@ -443,8 +443,8 @@ SENDMAIL(1)                                                        SENDMAIL(1)
               <a href="postalias.1.html"><b>postalias</b>(1)</a> and <a href="postmap.1.html"><b>postmap</b>(1)</a> commands.
 
        <b><a href="postconf.5.html#delay_warning_time">delay_warning_time</a> (0h)</b>
-              The  time  after which the sender receives the mes-
-              sage headers of mail that is still queued.
+              The  time after which the sender receives a copy of
+              the message headers of mail that is still queued.
 
        <b><a href="postconf.5.html#enable_errors_to">enable_errors_to</a> (no)</b>
               Report mail delivery errors to the  address  speci-
index cc3c999ea73ea75087b238dae18ccbe3a7658f5e..1cb0f03e889c1fbb9b720b1a5f16d671fbb1878d 100644 (file)
@@ -15,23 +15,25 @@ TLSPROXY(8)                                                        TLSPROXY(8)
 <b>DESCRIPTION</b>
        The <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a> server implements a server-side TLS proxy.
        It is used by <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  to  talk  SMTP-over-TLS  with
-       remote  SMTP  clients  whose whitelist status has expired,
-       but it should also work for non-SMTP protocols.
+       remote  SMTP  clients  that are not whitelisted (including
+       clients whose whitelist status has expired), but it should
+       also work for non-SMTP protocols.
 
-       Although one <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a> process can serve  multiple  ses-
-       sions  at  the  same  time, it is a good idea to allow the
-       number of processes to increase with  load,  so  that  the
+       Although  one  <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a> process can serve multiple ses-
+       sions at the same time, it is a good  idea  to  allow  the
+       number  of  processes  to  increase with load, so that the
        service remains responsive.
 
 <b>PROTOCOL EXAMPLE</b>
-       The  example  below  concerns  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>. However, the
-       <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a> server is agnostic of the  application  proto-
-       col,  and  the example is easily adapted to other applica-
+       The example below  concerns  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>.  However,  the
+       <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a>  server  is agnostic of the application proto-
+       col, and the example is easily adapted to  other  applica-
        tions.
 
-       The <a href="postscreen.8.html"><b>postscreen</b>(8)</a> server sends the remote SMTP client end-
-       point   string,  the  requested  role  (server),  and  the
-       requested  timeout  to  <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a>.   <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  then
+       After  receiving  a valid remote SMTP client STARTTLS com-
+       mand, the  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  server  sends  the  remote  SMTP
+       client  endpoint  string, the requested role (server), and
+       the requested timeout to <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a>.  <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  then
        receives  a  "TLS  available" indication from <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a>.
        If the TLS service is available, <a href="postscreen.8.html"><b>postscreen</b>(8)</a>  sends  the
        remote  SMTP  client  file  descriptor to <a href="tlsproxy.8.html"><b>tlsproxy</b>(8)</a>, and
index f7ad3116a46cb21c7ebc8ae164834476d3c2945a..8d6e461e19bc1732d996c789012a4b1208ce07d3 100644 (file)
@@ -386,8 +386,8 @@ The directory with Postfix support programs and daemon programs.
 The default database type for use in \fBnewaliases\fR(1), \fBpostalias\fR(1)
 and \fBpostmap\fR(1) commands.
 .IP "\fBdelay_warning_time (0h)\fR"
-The time after which the sender receives the message headers of
-mail that is still queued.
+The time after which the sender receives a copy of the message
+headers of mail that is still queued.
 .IP "\fBenable_errors_to (no)\fR"
 Report mail delivery errors to the address specified with the
 non-standard Errors-To: message header, instead of the envelope
index 5ad9928f4b0659be9db58231025fd9e6df84b11e..431708e07a1d783fe99492a6bbae5b6ee9480293 100644 (file)
@@ -24,9 +24,13 @@ used for fast lookup by the mail system. Execute the command
 \fBnewaliases\fR in order to rebuild the indexed file after
 changing the Postfix alias database.
 
-The input and output file formats are expected to be compatible
-with Sendmail version 8, and are expected to be suitable for the
-use as NIS maps.
+When the table is provided via other means such as NIS, LDAP
+or SQL, the same lookups are done as for ordinary indexed files.
+
+Alternatively, the table can be provided as a regular-expression
+map where patterns are given as regular expressions. In
+this case, the lookups are done in a slightly different way
+as described below under "REGULAR EXPRESSION TABLES".
 
 Users can control delivery of their own mail by setting
 up \fB.forward\fR files in their home directory.
@@ -107,6 +111,28 @@ propagated to the result of table lookup.
 .fi
 The local(8) delivery agent always folds the search string
 to lowercase before database 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). NOTE: these formats do not use ":" at the
+end of a pattern.
+
+Each regular expression is applied to the entire search
+string. Thus, a search string \fIuser+foo\fR is not broken
+up into \fIuser\fR and \fIfoo\fR.
+
+Regular expressions are applied in the order as specified
+in the table, until a regular expression is found that
+matches the search string.
+
+Lookup results are the same as with indexed file lookups.
+For security reasons there is no support for \fB$1\fR,
+\fB$2\fR etc. substring interpolation.
 .SH "SECURITY"
 .na
 .nf
index 0bc50986fdaca44423759d4214f34d8d1f68c334..94c40486dd00da080b5f03307c768f23195e94c3 100644 (file)
@@ -1516,10 +1516,10 @@ The recipient of postmaster notifications with the message headers
 of mail that cannot be delivered within $delay_warning_time time
 units.
 .PP
-This feature is enabled with the delay_warning_time parameter.
+See also: delay_warning_time, notify_classes.
 .SH delay_warning_time (default: 0h)
-The time after which the sender receives the message headers of
-mail that is still queued.
+The time after which the sender receives a copy of the message
+headers of mail that is still queued.
 .PP
 To enable this feature, specify a non-zero time value (an integral
 value plus an optional one-letter suffix that specifies the time
@@ -1527,6 +1527,8 @@ unit).
 .PP
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is h (hours).
+.PP
+See also: delay_notice_recipient, notify_classes.
 .SH deliver_lock_attempts (default: 20)
 The maximal number of attempts to acquire an exclusive lock on a
 mailbox file or \fBbounce\fR(8) logfile.
@@ -3989,7 +3991,8 @@ This feature
 is available in Postfix 2.9 and later.
 .br
 .IP "\fBdelay\fR"
-Send the postmaster copies of the headers of delayed mail. The
+Send the postmaster copies of the headers of delayed mail (see
+delay_warning_time). The
 notification is sent to the address specified with the
 delay_notice_recipient configuration parameter (default: postmaster).
 .br
@@ -5569,6 +5572,18 @@ addresses with equal MX preference. This feature has no effect
 unless the inet_protocols setting enables both IPv4 and IPv6.
 With Postfix 2.8 the default is "ipv6".
 .PP
+Notes for mail delivery between sites that have both IPv4 and
+IPv6 connectivity:
+.IP \(bu
+The setting "smtp_address_preference = ipv6" is unsafe.
+It can fail to deliver mail when there is an outage that affects
+IPv6, while the destination is still reachable over IPv4.
+.IP \(bu
+The setting "smtp_address_preference = any" is safe. With
+this, mail will eventually be delivered even if there is an outage
+that affects IPv6 or IPv4, as long as it does not affect both.
+.br
+.PP
 This feature is available in Postfix 2.8 and later.
 .SH smtp_always_send_ehlo (default: yes)
 Always send EHLO at the start of an SMTP session.
index d789450c54fa358bcf73212da1c49bb79168aca7..dfc91b95402182f1630d6c25de4b205e70d12200 100644 (file)
@@ -355,8 +355,8 @@ request before it is terminated by a built-in watchdog timer.
 The maximal number of digits after the decimal point when logging
 sub-second delay values.
 .IP "\fBdelay_warning_time (0h)\fR"
-The time after which the sender receives the message headers of
-mail that is still queued.
+The time after which the sender receives a copy of the message
+headers of mail that is still queued.
 .IP "\fBipc_timeout (3600s)\fR"
 The time limit for sending or receiving information over an internal
 communication channel.
index 55b9cc30f821b063728e09d7908602781f7bea14..5440eff82588a01a1590359b767ff9deeceb8412 100644 (file)
@@ -14,7 +14,8 @@ Postfix TLS proxy
 .fi
 The \fBtlsproxy\fR(8) server implements a server-side TLS
 proxy. It is used by \fBpostscreen\fR(8) to talk SMTP-over-TLS
-with remote SMTP clients whose whitelist status has expired,
+with remote SMTP clients that are not whitelisted (including
+clients whose whitelist status has expired),
 but it should also work for non-SMTP protocols.
 
 Although one \fBtlsproxy\fR(8) process can serve multiple
@@ -31,7 +32,8 @@ the \fBtlsproxy\fR(8) server is agnostic of the application
 protocol, and the example is easily adapted to other
 applications.
 
-The \fBpostscreen\fR(8) server sends the remote SMTP client
+After receiving a valid remote SMTP client STARTTLS command,
+the \fBpostscreen\fR(8) server sends the remote SMTP client
 endpoint string, the requested role (server), and the
 requested timeout to \fBtlsproxy\fR(8).  \fBpostscreen\fR(8)
 then receives a "TLS available" indication from \fBtlsproxy\fR(8).
index a29e4f61033d01c2a31286f5e3d8e55e2fadd2fd..30f7a3083c01f5c7e660804f419ba7a6bd8430df 100644 (file)
@@ -35,6 +35,16 @@ addresses.  To fix, turn on support for multiple IP addresses: </p>
 </pre>
 </blockquote>
 
+<p> Alternatively, specify the RESOLV_MULTI environment variable
+in main.cf: </p>
+
+<blockquote>
+<pre>
+/etc/postfix/main.cf:
+    import_environment = MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ XAUTHORITY DISPLAY LANG=C RESOLV_MULTI=on
+</pre>
+</blockquote>
+
 <h2>Berkeley DB issues</h2>
 
 <p> If you can't compile Postfix because the file "db.h"
index e306f8d0479f810c00a2ca070c1011677e4285cf..4fbea57f5769e954c0174499ce29e079b7dcad28 100644 (file)
@@ -102,20 +102,18 @@ mail from the network, and it does not deliver any mail locally. A
 null client typically uses POP, IMAP or NFS for mailbox access. </p>
 
 <p> In this example we assume that the Internet domain name is
-"example.com" and that the machine is named "nullclient.example.com".
+"example.com" and that the machine is named "hostname.example.com".
 As usual, the examples show only parameters that are not left at
 their default settings. </p>
 
 <blockquote>
 <pre>
 1 /etc/postfix/main.cf:
-2     myorigin = $mydomain
-3     relayhost = $mydomain
-4     inet_interfaces = loopback-only
-5     local_transport = error:local delivery is disabled
-6 
-7 /etc/postfix/master.cf:
-8     Comment out the local delivery agent entry
+2     myhostname = hostname.example.com
+3     myorigin = $mydomain
+4     relayhost = $mydomain
+5     inet_interfaces = loopback-only
+6     mydestination =
 </pre>
 </blockquote>
 
@@ -123,19 +121,29 @@ their default settings. </p>
 
 <ul>
 
-<li> <p> Line 2: Send mail as "user@example.com" (instead of
-"user@nullclient.example.com"), so that nothing ever has a reason
-to send mail to "user@nullclient.example.com". </p>
+<li> <p> Line 2: Set myhostname to hostname.example.com, in case
+the machine name isn't set to a fully-qualified domain name (use
+the command "postconf -d myhostname" to find out what the machine
+name is).  </p>
+
+<li> <p> Line 2: The myhostname value also provides the default
+value for the mydomain parameter (here, "mydomain = example.com").
+</p>
+
+<li> <p> Line 3: Send mail as "user@example.com" (instead of
+"user@hostname.example.com"), so that nothing ever has a reason
+to send mail to "user@hostname.example.com". </p>
 
-<li> <p> Line 3: Forward all mail to the mail server that is
+<li> <p> Line 4: Forward all mail to the mail server that is
 responsible for the "example.com" domain. This prevents mail from
 getting stuck on the null client if it is turned off while some
-remote destination is unreachable. </p>
+remote destination is unreachable. Specify a real hostname
+here if your "example.com" domain has no MX record. </p>
 
-<li> <p> Line 4: Do not accept mail from the network. </p>
+<li> <p> Line 5: Do not accept mail from the network. </p>
 
-<li> <p> Lines 5-8: Disable local mail delivery. All mail goes to
-the mail server as specified in line 3.  </p>
+<li> <p> Line 6: Disable local mail delivery. All mail goes to
+the mail server as specified in line 4.  </p>
 
 </ul>
 
index 1e0cbf765460885c940362a1f732d6a7106f6151..5af5e54a13314abf1faf1696e7cb566b852cd833 100644 (file)
 #      \fBnewaliases\fR in order to rebuild the indexed file after
 #      changing the Postfix alias database.
 #
-#      The input and output file formats are expected to be compatible
-#      with Sendmail version 8, and are expected to be suitable for the
-#      use as NIS maps.
+#      When the table is provided via other means such as NIS, LDAP
+#      or SQL, the same lookups are done as for ordinary indexed files.
+#
+#      Alternatively, the table can be provided as a regular-expression
+#      map where patterns are given as regular expressions. In
+#      this case, the lookups are done in a slightly different way
+#      as described below under "REGULAR EXPRESSION TABLES".
 #
 #      Users can control delivery of their own mail by setting
 #      up \fB.forward\fR files in their home directory.
 # CASE FOLDING
 # .ad
 # .fi
-#       The local(8) delivery agent always folds the search string
-#       to lowercase before database lookup.
+#      The local(8) delivery agent always folds the search string
+#      to lowercase before database 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). NOTE: these formats do not use ":" at the
+#      end of a pattern.
+#
+#      Each regular expression is applied to the entire search
+#      string. Thus, a search string \fIuser+foo\fR is not broken
+#      up into \fIuser\fR and \fIfoo\fR.
+#
+#      Regular expressions are applied in the order as specified
+#      in the table, until a regular expression is found that
+#      matches the search string.
+#
+#      Lookup results are the same as with indexed file lookups.
+#      For security reasons there is no support for \fB$1\fR,
+#      \fB$2\fR etc. substring interpolation.
 # SECURITY
 # .ad
 # .fi
index f03af4909f7bab101b8994d7b9ba149a59c93a43..d7b5bb1392f6f92161b184c3bfea34a47780b48d 100644 (file)
@@ -3083,7 +3083,8 @@ is available in Postfix 2.9 and later.  </dd>
 
 <dt><b>delay</b></dt>
 
-<dd>Send the postmaster copies of the headers of delayed mail. The
+<dd>Send the postmaster copies of the headers of delayed mail (see
+delay_warning_time). The
 notification is sent to the address specified with the
 delay_notice_recipient configuration parameter (default: postmaster).
 </dd>
@@ -7245,14 +7246,14 @@ of mail that cannot be delivered within $delay_warning_time time
 units.  </p>
 
 <p>
-This feature is enabled with the delay_warning_time parameter.
+See also: delay_warning_time, notify_classes.
 </p>
 
 %PARAM delay_warning_time 0h
 
 <p>
-The time after which the sender receives the message headers of
-mail that is still queued.
+The time after which the sender receives a copy of the message
+headers of mail that is still queued.
 </p>
 
 <p>
@@ -7266,6 +7267,10 @@ Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is h (hours).
 </p>
 
+<p>
+See also: delay_notice_recipient, notify_classes.
+</p>
+
 %PARAM disable_dns_lookups no
 
 <p>
@@ -13546,6 +13551,21 @@ addresses with equal MX preference. This feature has no effect
 unless the inet_protocols setting enables both IPv4 and IPv6.
 With Postfix 2.8 the default is "ipv6".  </p>
 
+<p> Notes for mail delivery between sites that have both IPv4 and
+IPv6 connectivity: </p>
+
+<ul>
+
+<li> <p> The setting "smtp_address_preference = ipv6" is unsafe.
+It can fail to deliver mail when there is an outage that affects
+IPv6, while the destination is still reachable over IPv4. </p>
+
+<li> <p> The setting "smtp_address_preference = any" is safe. With
+this, mail will eventually be delivered even if there is an outage
+that affects IPv6 or IPv4, as long as it does not affect both. </p>
+
+</ul>
+
 <p> This feature is available in Postfix 2.8 and later.  </p>
 
 %PARAM lmtp_address_preference ipv6
index 77916d07ec52ea67a2a6a697bdbb86a3dd2d0bd7..269488166de8e4396078afca1fcb786857a71762 100644 (file)
 /*     The maximal number of digits after the decimal point when logging
 /*     sub-second delay values.
 /* .IP "\fBdelay_warning_time (0h)\fR"
-/*     The time after which the sender receives the message headers of
-/*     mail that is still queued.
+/*     The time after which the sender receives a copy of the message
+/*     headers of mail that is still queued.
 /* .IP "\fBipc_timeout (3600s)\fR"
 /*     The time limit for sending or receiving information over an internal
 /*     communication channel.
index 7038e050a750bcee09475e0ff35382ff158354b0..6ce691588027d1f9085fa03eb484c0f383a92574 100644 (file)
@@ -930,8 +930,11 @@ static void dict_ldap_conn_find(DICT_LDAP *dict_ldap)
 #endif
     LDAP_CONN *conn;
 
+    /*
+     * Join key fields with null characters.
+     */
 #define ADDSTR(vp, s) vstring_memcat((vp), (s), strlen((s))+1)
-#define ADDINT(vp, i) vstring_sprintf_append((vp), "%lu", (unsigned long)(i))
+#define ADDINT(vp, i) vstring_sprintf_append((vp), "%lu%c", (unsigned long)(i), 0)
 
     ADDSTR(keybuf, dict_ldap->server_host);
     ADDINT(keybuf, dict_ldap->server_port);
index 4ec82995be994e65bcac9fbf6d0c4c8563576312..35a690494f4d175454e8f425e4d0de22ec9c01b5 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20121007"
+#define MAIL_RELEASE_DATE      "20121019"
 #define MAIL_VERSION_NUMBER    "2.10"
 
 #ifdef SNAPSHOT
index a773d9981b33db9a3569288973c76e29fb7a166e..71955d4f3b565b848885ee660b821d486042d7a3 100644 (file)
@@ -749,7 +749,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
        if (rec_type > 0)
            msg_warn("%s: ignoring out-of-order DSN original recipient <%.200s>",
                     message->queue_id, dsn_orcpt);
-       myfree(orig_rcpt);
+       myfree(dsn_orcpt);
     }
     if (orig_rcpt != 0) {
        if (rec_type > 0)
index 8249d79d57f1d819b327222d636584eccb4a1e3d..29cedbcf09e0f1b8217dca563a654468338323e0 100644 (file)
@@ -890,6 +890,9 @@ int     main(int argc, char **argv)
     if ((query == 0 || strcmp(query, "-") != 0)
        && (postmap_flags & POSTMAP_FLAG_ANY_KEY))
        msg_fatal("specify -b -h or -m only with \"-q -\"");
+    if ((postmap_flags & POSTMAP_FLAG_ANY_KEY)
+       == (postmap_flags & POSTMAP_FLAG_MIME_KEY))
+       msg_warn("ignoring -m option without -b or -h");
 
     /*
      * Use the map type specified by the user, or fall back to a default
index e8c0b6ca71a75ad75010717e9645fdcfe60aa565..83dac65af664882bc74ceb26d82aa6d122bf5bbd 100644 (file)
 /*     The default database type for use in \fBnewaliases\fR(1), \fBpostalias\fR(1)
 /*     and \fBpostmap\fR(1) commands.
 /* .IP "\fBdelay_warning_time (0h)\fR"
-/*     The time after which the sender receives the message headers of
-/*     mail that is still queued.
+/*     The time after which the sender receives a copy of the message
+/*     headers of mail that is still queued.
 /* .IP "\fBenable_errors_to (no)\fR"
 /*     Report mail delivery errors to the address specified with the
 /*     non-standard Errors-To: message header, instead of the envelope
index 8c5d0f1c3820fb528f17cc7977c54daa90e37e03..027e6c37bfcac235892a2cc2d39aaab4b66db9b1 100644 (file)
@@ -502,6 +502,11 @@ int     tls_protocol_mask(const char *plist)
     int     exclude = 0;
     int     include = 0;
 
+#define FREE_AND_RETURN(ptr, res) do { \
+       myfree(ptr); \
+       return (res); \
+    } while (0)
+
     save = cp = mystrdup(plist);
     while ((tok = mystrtok(&cp, "\t\n\r ,:")) != 0) {
        if (*tok == '!')
@@ -511,9 +516,8 @@ int     tls_protocol_mask(const char *plist)
            include |= code =
                name_code(protocol_table, NAME_CODE_FLAG_NONE, tok);
        if (code == TLS_PROTOCOL_INVALID)
-           return TLS_PROTOCOL_INVALID;
+           FREE_AND_RETURN(save, TLS_PROTOCOL_INVALID);
     }
-    myfree(save);
 
     /*
      * When the include list is empty, use only the explicit exclusions.
@@ -522,7 +526,8 @@ int     tls_protocol_mask(const char *plist)
      * we don't know about at compile time, and this is unavoidable because
      * the OpenSSL API works with compile-time *exclusion* bit-masks.
      */
-    return (include ? (exclude | (TLS_KNOWN_PROTOCOLS & ~include)) : exclude);
+    FREE_AND_RETURN(save,
+       (include ? (exclude | (TLS_KNOWN_PROTOCOLS & ~include)) : exclude));
 }
 
 /* tls_param_init - Load TLS related config parameters */
index 8195f1b01eb87f9de415b76b297bf29c1f41f772..78d15a8f0fee3ea2cccedc21bdc8bfe20c9549a2 100644 (file)
@@ -8,7 +8,8 @@
 /* DESCRIPTION
 /*     The \fBtlsproxy\fR(8) server implements a server-side TLS
 /*     proxy. It is used by \fBpostscreen\fR(8) to talk SMTP-over-TLS
-/*     with remote SMTP clients whose whitelist status has expired,
+/*     with remote SMTP clients that are not whitelisted (including
+/*     clients whose whitelist status has expired),
 /*     but it should also work for non-SMTP protocols.
 /*
 /*     Although one \fBtlsproxy\fR(8) process can serve multiple
@@ -23,7 +24,8 @@
 /*     protocol, and the example is easily adapted to other
 /*     applications.
 /*
-/*     The \fBpostscreen\fR(8) server sends the remote SMTP client
+/*     After receiving a valid remote SMTP client STARTTLS command,
+/*     the \fBpostscreen\fR(8) server sends the remote SMTP client
 /*     endpoint string, the requested role (server), and the
 /*     requested timeout to \fBtlsproxy\fR(8).  \fBpostscreen\fR(8)
 /*     then receives a "TLS available" indication from \fBtlsproxy\fR(8).
index 84ca87c75d2220db91d328ae6d9e87432fa93a6a..ecfa2c8f54065932cba6cd9213d9101e0efa53a5 100644 (file)
@@ -60,7 +60,7 @@
 /*     should be used or the code will not be portable.
 /*
 /*     binhash_create() creates a table of the specified size and returns a
-/*     pointer to the result. The lookup keys are saved with strdup().
+/*     pointer to the result. The lookup keys are saved with mymemdup().
 /*
 /*     binhash_enter() stores a (key, value) pair into the specified table
 /*     and returns a pointer to the resulting entry. The code does not