]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20060325
authorWietse Venema <wietse@porcupine.org>
Sat, 25 Mar 2006 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:32:13 +0000 (06:32 +0000)
49 files changed:
postfix/HISTORY
postfix/README_FILES/ADDRESS_REWRITING_README
postfix/README_FILES/STANDARD_CONFIGURATION_README
postfix/README_FILES/TLS_README
postfix/conf/main.cf
postfix/conf/master.cf
postfix/html/ADDRESS_REWRITING_README.html
postfix/html/RESTRICTION_CLASS_README.html
postfix/html/SMTPD_ACCESS_README.html
postfix/html/STANDARD_CONFIGURATION_README.html
postfix/html/TLS_README.html
postfix/html/postconf.5.html
postfix/man/man5/postconf.5
postfix/proto/ADDRESS_REWRITING_README.html
postfix/proto/RESTRICTION_CLASS_README.html
postfix/proto/SMTPD_ACCESS_README.html
postfix/proto/STANDARD_CONFIGURATION_README.html
postfix/proto/TLS_README.html
postfix/proto/postconf.proto
postfix/src/bounce/bounce_template.c
postfix/src/dns/dns_lookup.c
postfix/src/global/conv_time.c
postfix/src/global/dsn_buf.h
postfix/src/global/mail_version.h
postfix/src/global/own_inet_addr.c
postfix/src/global/pipe_command.c
postfix/src/global/resolve_local.c
postfix/src/global/verp_sender.c
postfix/src/oqmgr/qmgr_deliver.c
postfix/src/pickup/pickup.c
postfix/src/postconf/postconf.c
postfix/src/qmgr/Makefile.in
postfix/src/qmgr/qmgr.h
postfix/src/qmgr/qmgr_deliver.c
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpd/smtpd_proxy.c
postfix/src/smtpstone/qmqp-sink.c
postfix/src/tls/tls_session.c
postfix/src/tls/tls_verify.c
postfix/src/trivial-rewrite/resolve.c
postfix/src/trivial-rewrite/rewrite.c
postfix/src/util/dict.c
postfix/src/util/dict_db.c
postfix/src/util/htable.c
postfix/src/util/percentm.c
postfix/src/util/safe_open.c
postfix/src/util/vbuf_print.c
postfix/src/util/vstream.c

index 49ea1850c7e191c1681ad9c59f200e762db42d54..76965c7d1ffdba63c60343373f74378142105f2d 100644 (file)
@@ -12050,8 +12050,25 @@ Apologies for any names omitted.
        expression that matches the null string. This caused fatal
        run-time errors.  File: dict_pcre.c.
 
+20060324
+
+       Cleanup: eliminated name collisions between global and local
+       variables, and other forms of shadowing. Documented switch
+       fall-throughs with /* FALLTHROUGH */ where this wasn't
+       already done.  Replaced (var = expr) by (var = expr) != 0
+       where this wasn't already done.
+
+20060324
+
+       Bugfix: mis-placed parenthesis in a before-filter error
+       test. A filter timeout was mis-reported as lost connection.
+       Found in code review.  File: smtpd/smtpd_proxy.c.
+
 Wish list:
 
+       Don't send xforward attributes to every site that announces
+       xforward support.
+
        The sendmail command should not return non-std exit status
        after fatal error in some internal library routine.
 
index 6004bbcef7f563fafa2ffff76cc2cf54ca2e34c0..bca109535e06921c99919258e9f53196ae69ebe6 100644 (file)
@@ -809,8 +809,8 @@ following information:
     original recipient address.
   * The delivery status.
 
-Some details are still preliminary and will change as Postfix implements the
-DSN (delivery status notification) standards.
+Some details depend on Postfix version. The example below is for Postfix
+version 2.3 and later.
 
     Content-Description: Delivery report
     Content-Type: message/delivery-status
@@ -823,8 +823,8 @@ DSN (delivery status notification) standards.
     Final-Recipient: rfc822; postfix-users@postfix.org
     Action: deliverable
     Status: 2.0.0
-    Diagnostic-Code: X-Postfix; delivery via mail.cloud9.net[168.100.1.4]: 250
-    Ok
+    Remote-MTA: dns; mail.cloud9.net
+    Diagnostic-Code: smtp; 250 Ok
 
 The third part of the report contains the message that Postfix would have
 delivered, including From: and To: message headers, so that you can see any
index 9ee8d3dcd99c0641a4deaca8276bceb8d9cd774a..7fdc63bb0d59ebd7e4a5b9f198a1733166eb8c0e 100644 (file)
@@ -424,9 +424,9 @@ To find out what lookup tables Postfix supports, use the command "p\bpo\bos\bst\btc\b
 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/t\btr\bra\ban\bns\bsp\bpo\bor\brt\bt" whenever you change the
 transport table.
 
-NOTE: Do not use the fallback_relay feature when relaying mail for a backup or
-primary MX domain. Mail would loop between the Postfix MX host and the
-fallback_relay host when the final destination is unavailable.
+NOTE for Postfix < 2.2: Do not use the fallback_relay feature when relaying
+mail for a backup or primary MX domain. Mail would loop between the Postfix MX
+host and the fallback_relay host when the final destination is unavailable.
 
   * In main.cf specify "relay_transport = relay",
   * In master.cf specify "-o fallback_relay =" at the end of the relay entry.
index ba9fb6d10a0db9074234258fd7d0f89afcb31233..533e975cb11c13f69ad898804d7402cd2c6eb770 100644 (file)
@@ -1064,7 +1064,7 @@ Please differentiate when possible between:
   * Problems in the TLS code: <postfix_tls@aet.tu-cottbus.de>
   * Problems in vanilla Postfix: <postfix-users@postfix.org>
 
-C\bCo\bom\bmp\bpa\bat\bti\bib\bbi\bil\bli\bit\bty\by w\bwi\bit\bth\bh P\bPo\bos\bst\btf\bfi\bix\bx <\b<2\b2.\b.2\b2 T\bTL\bLS\bS s\bsu\bup\bpp\bpo\bor\brt\bt
+C\bCo\bom\bmp\bpa\bat\bti\bib\bbi\bil\bli\bit\bty\by w\bwi\bit\bth\bh P\bPo\bos\bst\btf\bfi\bix\bx <\b< 2\b2.\b.2\b2 T\bTL\bLS\bS s\bsu\bup\bpp\bpo\bor\brt\bt
 
 Postfix version 2.2 TLS support is based on the Postfix/TLS patch by Lutz
 Jänicke, but differs in a few minor ways.
index 517277974043c7f2f54c40a7adedd2c589feb705..f321730a35150ca62c7953d2034e26a60a0f1e81 100644 (file)
@@ -1,13 +1,14 @@
 # Global Postfix configuration file. This file lists only a subset
-# of all 300+ parameters. See the postconf(5) manual page for a
-# complete list.
+# of all parameters. For the syntax, and for a complete parameter
+# list, see the postconf(5) manual page (command: "man 5 postconf").
 #
-# The general format of each line is: parameter = value. Lines
-# that begin with whitespace continue the previous line. A value can
-# contain references to other $names or ${name}s.
+# For common configuration examples, see BASIC_CONFIGURATION_README
+# and STANDARD_CONFIGURATION_README. To find these documents, use
+# the command "postconf html_directory readme_directory", or go to
+# http://www.postfix.org/.
 #
-# NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
-# POSTFIX STILL WORKS AFTER EVERY CHANGE.
+# For best results, change no more than 2-3 parameters at a time,
+# and test if Postfix still works after every change.
 
 # SOFT BOUNCE
 #
index b597e1a37099dbbcacf1a020aba9407a6770ac27..c37982a8bba38516b42a8d7738b3784b754ae80f 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Postfix master process configuration file.  For details on the format
-# of the file, see the Postfix master(5) manual page.
+# of the file, see the master(5) manual page (command: "man 5 master").
 #
 # ==========================================================================
 # service type  private unpriv  chroot  wakeup  maxproc command + args
index 8233562a8b3fc7c2903297a679f6d9bd541a17ce..2a2ab64d322dbbb68753a78d23539f7df255f583 100644 (file)
@@ -546,14 +546,14 @@ clean up invalid domains in mail addresses produced by legacy mail
 systems. </p>
 
 <p> Canonical mapping is disabled by default. To enable, edit the
-<a href="postconf.5.html#canonical_maps">canonical_maps</a> parameter in the main.cf file and specify one or
+<a href="postconf.5.html#canonical_maps">canonical_maps</a> parameter in the <a href="postconf.5.html">main.cf</a> file and specify one or
 more lookup tables, separated by whitespace or commas. </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#canonical_maps">canonical_maps</a> = hash:/etc/postfix/canonical
 
 /etc/postfix/canonical:
@@ -575,7 +575,7 @@ applied only to sender addresses or to recipient addresses. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#sender_canonical_maps">sender_canonical_maps</a> = hash:/etc/postfix/sender_canonical
     <a href="postconf.5.html#recipient_canonical_maps">recipient_canonical_maps</a> = hash:/etc/postfix/recipient_canonical
 </pre>
@@ -593,15 +593,15 @@ send mail to the those ugly address without creating a mailer loop.
 </p>
 
 <p> Canonical mapping can be turned off selectively for mail received
-by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>, by overriding main.cf settings
-in the master.cf file.  This feature is available in Postfix version
+by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>, by overriding <a href="postconf.5.html">main.cf</a> settings
+in the <a href="master.5.html">master.cf</a> file.  This feature is available in Postfix version
 2.1 and later.  </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/master.cf:
+/etc/postfix/<a href="master.5.html">master.cf</a>:
     :10026      inet  n       -       n       -       -       smtpd
         -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
@@ -625,7 +625,7 @@ non-empty value. To get the behavior before Postfix 2.2, specify
 
 <p> Address masquerading is disabled by default, and is implemented
 by the <a href="cleanup.8.html">cleanup(8)</a> server. To enable, edit the <a href="postconf.5.html#masquerade_domains">masquerade_domains</a>
-parameter in the main.cf file and specify one or more domain names
+parameter in the <a href="postconf.5.html">main.cf</a> file and specify one or more domain names
 separated by whitespace or commas.  When Postfix tries to masquerade
 a domain, it processes the list from left to right, and processing
 stops at the first match.  </p>
@@ -634,7 +634,7 @@ stops at the first match.  </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#masquerade_domains">masquerade_domains</a> = foo.example.com example.com
 </pre>
 </blockquote>
@@ -647,7 +647,7 @@ this domain or its subdomains: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#masquerade_domains">masquerade_domains</a> = !foo.example.com example.com
 </pre>
 </blockquote>
@@ -664,7 +664,7 @@ Specify one or more user names separated by whitespace or commas.
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#masquerade_exceptions">masquerade_exceptions</a> = root
 </pre>
 </blockquote>
@@ -682,7 +682,7 @@ too, specify (Postfix version 1.1 and later):</p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#masquerade_classes">masquerade_classes</a> = envelope_sender, envelope_recipient,
         header_sender, header_recipient
 </pre>
@@ -692,15 +692,15 @@ too, specify (Postfix version 1.1 and later):</p>
 no longer be able to send mail to individual machines. </p>
 
 <p> Address masquerading can be turned off selectively for mail
-received by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>, by overriding main.cf
-settings in the master.cf file.  This feature is available in
+received by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>, by overriding <a href="postconf.5.html">main.cf</a>
+settings in the <a href="master.5.html">master.cf</a> file.  This feature is available in
 Postfix version 2.1 and later. </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/master.cf:
+/etc/postfix/<a href="master.5.html">master.cf</a>:
     :10026      inet  n       -       n       -       -       smtpd
         -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
@@ -743,14 +743,14 @@ generates itself. </p>
 
 <p> Automatic BCC recipients (including <a href="postconf.5.html#always_bcc">always_bcc</a>) can be turned
 off selectively for mail received by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>,
-by overriding main.cf settings in the master.cf file.  This feature
+by overriding <a href="postconf.5.html">main.cf</a> settings in the <a href="master.5.html">master.cf</a> file.  This feature
 is available in Postfix version 2.1 and later. </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/master.cf:
+/etc/postfix/<a href="master.5.html">master.cf</a>:
     :10026      inet  n       -       n       -       -       smtpd
         -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
@@ -774,7 +774,7 @@ for an overview of methods to host virtual domains with Postfix.
 </p>
 
 <p> Virtual aliasing is disabled by default. To enable, edit the
-<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> parameter in the main.cf file and
+<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> parameter in the <a href="postconf.5.html">main.cf</a> file and
 specify one or more lookup tables, separated by whitespace or
 commas. </p>
 
@@ -782,10 +782,10 @@ commas. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> = hash:/etc/postfix/virtual
 
-/etc/postfix/virtual:
+/etc/postfix/<a href="virtual.8.html">virtual</a>:
     Wietse.Venema        wietse
 </pre>
 </blockquote>
@@ -806,15 +806,15 @@ for mail that is forwarded internally, and are not generated for
 mail that is generated by Postfix itself. </p>
 
 <p> Virtual aliasing can be turned off selectively for mail received
-by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>, by overriding main.cf settings
-in the master.cf file.  This feature is available in Postfix version
+by <a href="smtpd.8.html">smtpd(8)</a>, <a href="qmqpd.8.html">qmqpd(8)</a>, or <a href="pickup.8.html">pickup(8)</a>, by overriding <a href="postconf.5.html">main.cf</a> settings
+in the <a href="master.5.html">master.cf</a> file.  This feature is available in Postfix version
 2.1 and later. </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/master.cf:
+/etc/postfix/<a href="master.5.html">master.cf</a>:
     :10026      inet  n       -       n       -       -       smtpd
         -o <a href="postconf.5.html#receive_override_options">receive_override_options</a>=<a href="postconf.5.html#no_address_mappings">no_address_mappings</a>
 </pre>
@@ -928,14 +928,14 @@ See, for example, the <a href="STANDARD_CONFIGURATION_README.html">STANDARD_CONF
 documents, and the examples in the <a href="transport.5.html">transport(5)</a> manual page.  </p>
 
 <p> Transport table lookups are disabled by default. To enable,
-edit the <a href="postconf.5.html#transport_maps">transport_maps</a> parameter in the main.cf file and specify
+edit the <a href="postconf.5.html#transport_maps">transport_maps</a> parameter in the <a href="postconf.5.html">main.cf</a> file and specify
 one or more lookup tables, separated by whitespace or commas. </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
 </pre>
 </blockquote>
@@ -955,14 +955,14 @@ table lookups, in anticipation of <a href="transport.5.html">transport(5)</a> ta
 can replace one recipient address by a different one. </p>
 
 <p> Lookups of relocated users are disabled by default. To enable,
-edit the <a href="postconf.5.html#relocated_maps">relocated_maps</a> parameter in the main.cf file and specify
+edit the <a href="postconf.5.html#relocated_maps">relocated_maps</a> parameter in the <a href="postconf.5.html">main.cf</a> file and specify
 one or more lookup tables, separated by whitespace or commas. </p>
 
 <p> Example: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#relocated_maps">relocated_maps</a> = hash:/etc/postfix/relocated
 
 /etc/postfix/relocated:
@@ -996,7 +996,7 @@ local machine. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtp_generic_maps">smtp_generic_maps</a> = hash:/etc/postfix/generic
 
 /etc/postfix/generic:
@@ -1029,7 +1029,7 @@ one of the following: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#alias_maps">alias_maps</a> = hash:/etc/aliases
     <a href="postconf.5.html#alias_maps">alias_maps</a> = dbm:/etc/aliases, nis:mail.aliases
 </pre>
@@ -1041,7 +1041,7 @@ Usually it is one of the following: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#alias_database">alias_database</a> = hash:/etc/aliases (4.4BSD, LINUX)
     <a href="postconf.5.html#alias_database">alias_database</a> = dbm:/etc/aliases (4.3BSD, SYSV&lt;4)
     <a href="postconf.5.html#alias_database">alias_database</a> = dbm:/etc/mail/aliases (SYSV4)
@@ -1082,12 +1082,12 @@ mail for non-UNIX accounts, then you must specify: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> =
 </pre>
 </blockquote>
 
-<p> (i.e. empty) in the main.cf file, otherwise the Postfix SMTP
+<p> (i.e. empty) in the <a href="postconf.5.html">main.cf</a> file, otherwise the Postfix SMTP
 server will reject mail for non-UNIX accounts with "User unknown
 in local recipient table". See the <a href="LOCAL_RECIPIENT_README.html">LOCAL_RECIPIENT_README</a> file
 for more information on this.
@@ -1204,8 +1204,8 @@ includes the original recipient address.
 
 </ul>
 
-<p> Some details are still preliminary and will change as Postfix
-implements the DSN (delivery status notification) standards. </p>
+<p> Some details depend on Postfix version. The example below is
+for Postfix version 2.3 and later. </p>
 
 <blockquote>
 <pre>
@@ -1220,7 +1220,8 @@ Arrival-Date: Tue, 13 Apr 2004 19:27:43 -0400 (EDT)
 Final-Recipient: rfc822; postfix-users@postfix.org
 Action: deliverable
 Status: 2.0.0
-Diagnostic-Code: X-Postfix; delivery via mail.cloud9.net[168.100.1.4]: 250 Ok
+Remote-MTA: dns; mail.cloud9.net
+Diagnostic-Code: smtp; 250 Ok
 </pre>
 </blockquote>
 
index 528a263f330dadda3e2e1d7cf5d1b16d25af3305..4035994eccba796a711d8f52abc23f3e8c7afffd 100644 (file)
@@ -41,9 +41,9 @@ care about these low-level details. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_restriction_classes">smtpd_restriction_classes</a> = restrictive, permissive
-    # With Postfix < 2.3 specify <a href="postconf.5.html#reject_unknown_client_hostname">reject_unknown_client</a>.
+    # With Postfix &lt; 2.3 specify <a href="postconf.5.html#reject_unknown_client_hostname">reject_unknown_client</a>.
     restrictive = <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a> <a href="postconf.5.html#reject_unknown_client_hostname">reject_unknown_client_hostname</a> ...
     permissive = permit
 
@@ -100,7 +100,7 @@ to IP spoofing. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
         <a href="postconf.5.html#check_recipient_access">check_recipient_access</a> hash:/etc/postfix/access
         <i>...the usual stuff...</i>
@@ -131,7 +131,7 @@ therefore is subject to SMTP sender spoofing. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
         <a href="postconf.5.html#check_recipient_access">check_recipient_access</a> hash:/etc/postfix/protected_destinations
         <i>...the usual stuff...</i>
@@ -191,7 +191,7 @@ with LDAP or SQL. </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> =
         <a href="postconf.5.html#check_sender_access">check_sender_access</a> hash:/etc/postfix/restricted_senders
         <i>...other stuff...</i>
@@ -220,7 +220,7 @@ bypassed in several ways: </p>
 <ul>
 
 <li> <p> By sending mail via a less restrictive mail
-relay host. </p>
+<a href="postconf.5.html#relayhost">relay host</a>. </p>
 
 <li> <p> By sending mail as someone else who does have permission
 to send mail to off-site destinations. </p>
index 3d542816a7c6ed14b29ea224d3de4c244413d5d9..978b5d7b4cca598801a7b1e6f74e8f85ee1e5447 100644 (file)
@@ -167,12 +167,12 @@ described in the <a href="postconf.5.html">postconf(5)</a> manual page. </p>
 <p> Examples of simple restriction lists are: </p>
 
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     # Allow connections from trusted networks only.
     <a href="postconf.5.html#smtpd_client_restrictions">smtpd_client_restrictions</a> = <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>, reject
 
     # Don't talk to mail systems that don't know their own hostname.
-    # With Postfix < 2.3, specify <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_hostname</a>.
+    # With Postfix &lt; 2.3, specify <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_hostname</a>.
     <a href="postconf.5.html#smtpd_helo_restrictions">smtpd_helo_restrictions</a> = <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_helo_hostname</a>
 
     # Don't accept mail from domains that don't exist.
@@ -304,7 +304,7 @@ address is accepted. And this is where surprises can happen.  </p>
 in too much access permission: </p>
 
 <pre>
-1 /etc/postfix/main.cf:
+1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
 2     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
 3         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a>
 4         <a href="postconf.5.html#check_helo_access">check_helo_access</a> hash:/etc/postfix/helo_access
@@ -316,7 +316,7 @@ in too much access permission: </p>
 </pre>
 
 <p> Line 5 rejects mail from hosts that don't specify a proper
-hostname in the HELO command (with Postfix < 2.3, specify
+hostname in the HELO command (with Postfix &lt; 2.3, specify
 <a href="postconf.5.html#reject_unknown_helo_hostname">reject_unknown_hostname</a>). Lines 4 and 9 make an exception to
 allow mail from some machine that announces itself with "HELO
 localhost.localdomain".  </p>
@@ -344,7 +344,7 @@ testing: </p>
 <dt> <a href="postconf.5.html#soft_bounce">soft_bounce</a> </dt> <dd> <p> This is a safety net that changes
 SMTP server REJECT actions into DEFER (try again later) actions.
 This keeps mail queued that would otherwise be returned to the
-sender. Specify "<a href="postconf.5.html#soft_bounce">soft_bounce</a> = yes" in the main.cf file to prevent
+sender. Specify "<a href="postconf.5.html#soft_bounce">soft_bounce</a> = yes" in the <a href="postconf.5.html">main.cf</a> file to prevent
 the Postfix SMTP server from rejecting mail permanently, by changing
 all 5xx SMTP reply codes into 4xx. </p> </dd>
 
index 98b9f260e9a133b06ca11cc0a7648a90fe38498a..75079d2933a9c6dee31a7d5fb7b296d17e5cedbb 100644 (file)
@@ -68,13 +68,13 @@ Postfix installs when you download the Postfix source code via
 <a href="http://www.postfix.org/">http://www.postfix.org/</a>. </p>
 
 <p> You can use the command "<b>postconf -n</b>" to find out what
-settings are overruled by your main.cf. Besides a few pathname
+settings are overruled by your <a href="postconf.5.html">main.cf</a>. Besides a few pathname
 settings, few parameters should be set on a stand-alone box, beyond
 what is covered in the <a href="BASIC_CONFIGURATION_README.html">BASIC_CONFIGURATION_README</a> document: </p>
 
 <blockquote>
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     # Optional: send mail as user@domainname instead of user@hostname.
     #<a href="postconf.5.html#myorigin">myorigin</a> = $<a href="postconf.5.html#mydomain">mydomain</a>
 
@@ -104,13 +104,13 @@ their default settings. </p>
 
 <blockquote>
 <pre>
-1 /etc/postfix/main.cf:
+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> = 127.0.0.1
 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/master.cf:
+7 /etc/postfix/<a href="master.5.html">master.cf</a>:
 8     Comment out the local delivery agent entry
 </pre>
 </blockquote>
@@ -160,7 +160,7 @@ is final destination for "user@hostname.example.com". </p>
 
 <blockquote>
 <pre>
-1 /etc/postfix/main.cf:
+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#mynetworks">mynetworks</a> = 127.0.0.0/8 10.0.0.0/24
 4     <a href="postconf.5.html#relay_domains">relay_domains</a> =
@@ -194,7 +194,7 @@ mail as "user@example.com" and is final destination for
  1 DNS:
  2     example.com    IN    MX  10 mailhost.example.com.
  3 
- 4 /etc/postfix/main.cf:
+ 4 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
  5     <a href="postconf.5.html#myorigin">myorigin</a> = $<a href="postconf.5.html#mydomain">mydomain</a>
  6     <a href="postconf.5.html#mydestination">mydestination</a> = $<a href="postconf.5.html#myhostname">myhostname</a> localhost.$<a href="postconf.5.html#mydomain">mydomain</a> localhost $<a href="postconf.5.html#mydomain">mydomain</a>
  7     <a href="postconf.5.html#mynetworks">mynetworks</a> = 127.0.0.0/8 10.0.0.0/24
@@ -278,13 +278,13 @@ harder to break. </p>
 
 <blockquote>
 <pre>
-1 /etc/postfix/main.cf:
+1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
 2     <a href="postconf.5.html#myorigin">myorigin</a> = example.com
 3     <a href="postconf.5.html#mydestination">mydestination</a> =
 4     <a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> =
 5     <a href="postconf.5.html#local_transport">local_transport</a> = <a href="error.8.html">error</a>:local mail delivery is disabled
 6 
-7 /etc/postfix/master.cf:
+7 /etc/postfix/<a href="master.5.html">master.cf</a>:
 8     Comment out the local delivery agent
 </pre>
 </blockquote>
@@ -312,10 +312,10 @@ All the mail to these two accounts is forwarded to an inside address.
 
 <blockquote>
 <pre>
-1 /etc/postfix/main.cf:
+1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
 2     <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> = hash:/etc/postfix/virtual
 3 
-4 /etc/postfix/virtual:
+4 /etc/postfix/<a href="virtual.8.html">virtual</a>:
 5     postmaster      postmaster@example.com
 6     abuse           abuse@example.com
 </pre>
@@ -338,7 +338,7 @@ is the real purpose of the firewall email function. </p>
 
 <blockquote>
 <pre>
- 1 /etc/postfix/main.cf:
+ 1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
  2     <a href="postconf.5.html#mynetworks">mynetworks</a> = 127.0.0.0/8 12.34.56.0/24
  3     <a href="postconf.5.html#relay_domains">relay_domains</a> = example.com
  4     <a href="postconf.5.html#parent_domain_matches_subdomains">parent_domain_matches_subdomains</a> = 
@@ -418,10 +418,10 @@ follows:  </p>
 
 <blockquote>
 <pre>
-1 /etc/postfix/main.cf:
+1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
 2     <a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a> = hash:/etc/postfix/virtual
 3 
-4 /etc/postfix/virtual:
+4 /etc/postfix/<a href="virtual.8.html">virtual</a>:
 5     root     root@localhost
 6     . . .
 </pre>
@@ -458,7 +458,7 @@ discussed the first half of this document. </p>
 
 <blockquote>
 <pre>
- 1 /etc/postfix/main.cf:
+ 1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
  2     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
  3     <a href="postconf.5.html#relayhost">relayhost</a> =
  4     # Optional for a machine that isn't "always on"
@@ -483,7 +483,7 @@ this example assumes that the organization uses DNS MX records
 internally.  The <tt>[]</tt> forces Postfix to do no MX lookup.
 </p>
 
-<li> <p> Line 3: IMPORTANT: do not specify a <a href="postconf.5.html#relayhost">relayhost</a> in main.cf.
+<li> <p> Line 3: IMPORTANT: do not specify a <a href="postconf.5.html#relayhost">relayhost</a> in <a href="postconf.5.html">main.cf</a>.
 </p>
 
 <li> <p> Line 5: This prevents mail from being stuck in the queue
@@ -513,7 +513,7 @@ is all you need: </p>
  1 DNS:
  2     the.backed-up.domain.tld        IN      MX 100 your.machine.tld.
  3 
- 4 /etc/postfix/main.cf:
+ 4 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
  5     <a href="postconf.5.html#relay_domains">relay_domains</a> = . . . the.backed-up.domain.tld
  6     <a href="postconf.5.html#smtpd_recipient_restrictions">smtpd_recipient_restrictions</a> = 
  7         <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> <a href="postconf.5.html#reject_unauth_destination">reject_unauth_destination</a>
@@ -535,7 +535,7 @@ need the above, plus: </p>
 
 <blockquote>
 <pre>
-18 /etc/postfix/main.cf:
+18 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
 19     <a href="postconf.5.html#transport_maps">transport_maps</a> = hash:/etc/postfix/transport
 20 
 21 /etc/postfix/transport:
@@ -580,16 +580,17 @@ tables Postfix supports, use the command "<b>postconf -m</b>". </p>
 <p> Execute the command "<b>postmap /etc/postfix/transport</b>"
 whenever you change the transport table. </p>
 
-<p> NOTE: Do not use the <a href="postconf.5.html#fallback_relay">fallback_relay</a> feature when relaying mail 
+<p> NOTE for Postfix &lt; 2.2: Do not use the <a href="postconf.5.html#fallback_relay">fallback_relay</a> feature
+when relaying mail
 for a backup or primary MX domain. Mail would loop between the
 Postfix MX host and the <a href="postconf.5.html#fallback_relay">fallback_relay</a> host when the final destination
 is unavailable. </p>
  
 <ul>
 
-<li> In main.cf specify "<tt><a href="postconf.5.html#relay_transport">relay_transport</a> = relay</tt>",
+<li> In <a href="postconf.5.html">main.cf</a> specify "<tt><a href="postconf.5.html#relay_transport">relay_transport</a> = relay</tt>",
 
-<li> In master.cf specify "<tt>-o <a href="postconf.5.html#fallback_relay">fallback_relay</a> =</tt>" at the    
+<li> In <a href="master.5.html">master.cf</a> specify "<tt>-o <a href="postconf.5.html#fallback_relay">fallback_relay</a> =</tt>" at the    
 end of the <tt>relay</tt> entry.
 
 <li> In transport maps, specify "<tt>relay:<i>nexthop...</i></tt>"
@@ -626,7 +627,7 @@ that is connected all the time. In the example below, the <tt>[]</tt>
 prevents Postfix from trying to look up DNS MX records.  </p>
 
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#relayhost">relayhost</a> = [smtprelay.someprovider.com]
 </pre>
 
@@ -640,14 +641,14 @@ Postfix retries to deliver delayed mail. To prevent such telephone
 calls from being placed, disable spontaneous SMTP mail deliveries. </p>
 
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#defer_transports">defer_transports</a> = smtp (Only for on-demand dialup IP hosts)
 </pre>
 
 <li> <p>Disable SMTP client DNS lookups (dialup LAN only).</p>
 
 <pre>
-/etc/postfix/main.cf:
+/etc/postfix/<a href="postconf.5.html">main.cf</a>:
     <a href="postconf.5.html#disable_dns_lookups">disable_dns_lookups</a> = yes (Only for on-demand dialup IP hosts)
 </pre>
 
@@ -718,7 +719,7 @@ discussed the first half of this document. </p>
 
 <blockquote>
 <pre>
-1 /etc/postfix/main.cf:
+1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
 2     <a href="postconf.5.html#smtp_generic_maps">smtp_generic_maps</a> = hash:/etc/postfix/generic
 3 
 4 /etc/postfix/generic:
@@ -766,7 +767,7 @@ discussed the first half of this document. </p>
 
 <blockquote>
 <pre>
- 1 /etc/postfix/main.cf:
+ 1 /etc/postfix/<a href="postconf.5.html">main.cf</a>:
  2     <a href="postconf.5.html#myhostname">myhostname</a> = hostname.localdomain
  3     <a href="postconf.5.html#mydomain">mydomain</a> = localdomain
  4 
@@ -777,7 +778,7 @@ discussed the first half of this document. </p>
  9 /etc/postfix/canonical:
 10     your-login-name    your-account@your-isp.com
 11 
-12 /etc/postfix/virtual:
+12 /etc/postfix/<a href="virtual.8.html">virtual</a>:
 13     your-account@your-isp.com       your-login-name
 </pre>
 </blockquote>
index c7600071bd75368c696c7143a92577bf9b65b7b2..d2e9a3f5290d190c3b95f16e55e8e974924f6de5 100644 (file)
@@ -37,7 +37,7 @@ SMTP mail or with SASL authentication.
 <p> Postfix version 2.2 introduces support for TLS as described in
 <a href="http://www.faqs.org/rfcs/rfc3207.html">RFC 3207</a>.  TLS Support for older Postfix versions was available as
 an add-on patch.  The section "<a href="#compat">Compatibility with
-Postfix < 2.2 TLS support</a>" below discusses the differences
+Postfix &lt; 2.2 TLS support</a>" below discusses the differences
 between these implementations.  </p>
 
 <p> Topics covered in this document: </p>
@@ -56,7 +56,7 @@ between these implementations.  </p>
 
 <li><a href="#problems"> Reporting problems </a>
 
-<li><a href="#compat">Compatibility with Postfix < 2.2 TLS support</a>
+<li><a href="#compat">Compatibility with Postfix &lt; 2.2 TLS support</a>
 
 <li><a href="#credits"> Credits </a>
 
@@ -1531,7 +1531,7 @@ Patches, when possible, are greatly appreciated too. </p>
 
 </ul>
 
-<h2><a name="compat">Compatibility with Postfix <2.2 TLS support</a></h2>
+<h2><a name="compat">Compatibility with Postfix &lt; 2.2 TLS support</a></h2>
 
 <p> Postfix version 2.2 TLS support is based on the Postfix/TLS
 patch by Lutz J&auml;nicke, but differs in a few minor ways. </p>
index dc29a261485999f98a3aa1c652c98de336d0266a..59557d39f6ec8419ea87d3d60aae262d43c2f8c5 100644 (file)
@@ -2014,7 +2014,9 @@ mail that is still queued.
 </p>
 
 <p>
-To enable this feature, specify a non-zero integral value.
+To enable this feature, specify a non-zero time value (an integral
+value plus an optional one-letter suffix that specifies the time
+unit).
 </p>
 
 <p>
@@ -8360,11 +8362,11 @@ Examples:
 (default: yes)</b></DT><DD>
 
 <p> Postpone the start of an SMTP mail transaction until a valid
-RCPT TO command is received. Specify "smtpd_delay_open_until_rcpt =
-yes" to create a mail transaction as soon as the SMTP server receives
-a valid MAIL FROM command. </p>
+RCPT TO command is received. Specify "no" to create a mail transaction
+as soon as the SMTP server receives a valid MAIL FROM command. </p>
 
-<p> Postponing the start of a mail transaction reduces the use of
+<p> With sites that reject lots of mail, the default setting reduces
+the use of
 disk, CPU and memory resources. The downside is that rejected
 recipients are logged with NOQUEUE instead of a mail transaction
 ID. This complicates the logfile analysis of multi-recipient mail.
@@ -9162,17 +9164,17 @@ of forged mail from worms or viruses.  </p>
 <ul>
 
 <li> The sender domain matches $<a href="postconf.5.html#mydestination">mydestination</a>, $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or
-$<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>, but the recipient is not listed in
+$<a href="postconf.5.html#proxy_interfaces">proxy_interfaces</a>, but the sender is not listed in
 $<a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a>, and $<a href="postconf.5.html#local_recipient_maps">local_recipient_maps</a> is not null.
 
-<li> The sender domain matches $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a> but the recipient
+<li> The sender domain matches $<a href="postconf.5.html#virtual_alias_domains">virtual_alias_domains</a> but the sender
 is not listed in $<a href="postconf.5.html#virtual_alias_maps">virtual_alias_maps</a>.
 
 <li> The sender domain matches $<a href="postconf.5.html#virtual_mailbox_domains">virtual_mailbox_domains</a> but the
-recipient is not listed in $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>, and $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
+sender is not listed in $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>, and $<a href="postconf.5.html#virtual_mailbox_maps">virtual_mailbox_maps</a>
 is not null.
 
-<li> The sender domain matches $<a href="postconf.5.html#relay_domains">relay_domains</a> but the recipient is
+<li> The sender domain matches $<a href="postconf.5.html#relay_domains">relay_domains</a> but the sender is
 not listed in $<a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a>, and $<a href="postconf.5.html#relay_recipient_maps">relay_recipient_maps</a> is
 not null.
 
index 6dce04ea812e8ba6bd5c260eedccfbe9d3f988ad..cfec35d0c798df94e3c37d912d83ad917c501eb5 100644 (file)
@@ -1102,7 +1102,9 @@ This feature is enabled with the delay_warning_time parameter.
 The time after which the sender receives the message headers of
 mail that is still queued.
 .PP
-To enable this feature, specify a non-zero integral value.
+To enable this feature, specify a non-zero time value (an integral
+value plus an optional one-letter suffix that specifies the time
+unit).
 .PP
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is h (hours).
@@ -4816,11 +4818,11 @@ smtpd_data_restrictions = reject_multi_recipient_bounce
 .ft R
 .SH smtpd_delay_open_until_valid_rcpt (default: yes)
 Postpone the start of an SMTP mail transaction until a valid
-RCPT TO command is received. Specify "smtpd_delay_open_until_rcpt =
-yes" to create a mail transaction as soon as the SMTP server receives
-a valid MAIL FROM command.
+RCPT TO command is received. Specify "no" to create a mail transaction
+as soon as the SMTP server receives a valid MAIL FROM command.
 .PP
-Postponing the start of a mail transaction reduces the use of
+With sites that reject lots of mail, the default setting reduces
+the use of
 disk, CPU and memory resources. The downside is that rejected
 recipients are logged with NOQUEUE instead of a mail transaction
 ID. This complicates the logfile analysis of multi-recipient mail.
@@ -5298,17 +5300,17 @@ access restriction is specified. This can slow down an explosion
 of forged mail from worms or viruses.
 .IP \(bu
 The sender domain matches $mydestination, $inet_interfaces or
-$proxy_interfaces, but the recipient is not listed in
+$proxy_interfaces, but the sender is not listed in
 $local_recipient_maps, and $local_recipient_maps is not null.
 .IP \(bu
-The sender domain matches $virtual_alias_domains but the recipient
+The sender domain matches $virtual_alias_domains but the sender
 is not listed in $virtual_alias_maps.
 .IP \(bu
 The sender domain matches $virtual_mailbox_domains but the
-recipient is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
+sender is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
 is not null.
 .IP \(bu
-The sender domain matches $relay_domains but the recipient is
+The sender domain matches $relay_domains but the sender is
 not listed in $relay_recipient_maps, and $relay_recipient_maps is
 not null.
 .PP
index 57f7fa2a52e75eccfc3ba8023d57fd4099ebc50f..b29820e00775a923e039ea020f78bc430e451b1e 100644 (file)
@@ -1204,8 +1204,8 @@ includes the original recipient address.
 
 </ul>
 
-<p> Some details are still preliminary and will change as Postfix
-implements the DSN (delivery status notification) standards. </p>
+<p> Some details depend on Postfix version. The example below is
+for Postfix version 2.3 and later. </p>
 
 <blockquote>
 <pre>
@@ -1220,7 +1220,8 @@ Arrival-Date: Tue, 13 Apr 2004 19:27:43 -0400 (EDT)
 Final-Recipient: rfc822; postfix-users@postfix.org
 Action: deliverable
 Status: 2.0.0
-Diagnostic-Code: X-Postfix; delivery via mail.cloud9.net[168.100.1.4]: 250 Ok
+Remote-MTA: dns; mail.cloud9.net
+Diagnostic-Code: smtp; 250 Ok
 </pre>
 </blockquote>
 
index 93ab7298325398a0b5c64dd308a23d89b29fb29d..705d106938f6e084686697114ccc0bfe66e8e9db 100644 (file)
@@ -43,7 +43,7 @@ care about these low-level details. </p>
 <pre>
 /etc/postfix/main.cf:
     smtpd_restriction_classes = restrictive, permissive
-    # With Postfix < 2.3 specify reject_unknown_client.
+    # With Postfix &lt; 2.3 specify reject_unknown_client.
     restrictive = reject_unknown_sender_domain reject_unknown_client_hostname ...
     permissive = permit
 
index c97e34b369e6daa13a8488f72ed03675320e3ec9..d862bb3c0911840cf1b7d04c6f52a59b8d6d7a7c 100644 (file)
@@ -172,7 +172,7 @@ described in the postconf(5) manual page. </p>
     smtpd_client_restrictions = permit_mynetworks, reject
 
     # Don't talk to mail systems that don't know their own hostname.
-    # With Postfix < 2.3, specify reject_unknown_hostname.
+    # With Postfix &lt; 2.3, specify reject_unknown_hostname.
     smtpd_helo_restrictions = reject_unknown_helo_hostname
 
     # Don't accept mail from domains that don't exist.
@@ -316,7 +316,7 @@ in too much access permission: </p>
 </pre>
 
 <p> Line 5 rejects mail from hosts that don't specify a proper
-hostname in the HELO command (with Postfix < 2.3, specify
+hostname in the HELO command (with Postfix &lt; 2.3, specify
 reject_unknown_hostname). Lines 4 and 9 make an exception to
 allow mail from some machine that announces itself with "HELO
 localhost.localdomain".  </p>
index fcc7c275acdcdf8b3be48414d50212e8380606eb..9907ae877b50eced9a2acce452f3a2d276ffddc4 100644 (file)
@@ -580,7 +580,8 @@ tables Postfix supports, use the command "<b>postconf -m</b>". </p>
 <p> Execute the command "<b>postmap /etc/postfix/transport</b>"
 whenever you change the transport table. </p>
 
-<p> NOTE: Do not use the fallback_relay feature when relaying mail 
+<p> NOTE for Postfix &lt; 2.2: Do not use the fallback_relay feature
+when relaying mail
 for a backup or primary MX domain. Mail would loop between the
 Postfix MX host and the fallback_relay host when the final destination
 is unavailable. </p>
index e4ed4bcee636b0f2c9bc1931349234d94e4e9ce6..31e2500bca2f21f40cb3ca456f7552aec6df7637 100644 (file)
@@ -37,7 +37,7 @@ SMTP mail or with SASL authentication.
 <p> Postfix version 2.2 introduces support for TLS as described in
 RFC 3207.  TLS Support for older Postfix versions was available as
 an add-on patch.  The section "<a href="#compat">Compatibility with
-Postfix < 2.2 TLS support</a>" below discusses the differences
+Postfix &lt; 2.2 TLS support</a>" below discusses the differences
 between these implementations.  </p>
 
 <p> Topics covered in this document: </p>
@@ -56,7 +56,7 @@ between these implementations.  </p>
 
 <li><a href="#problems"> Reporting problems </a>
 
-<li><a href="#compat">Compatibility with Postfix < 2.2 TLS support</a>
+<li><a href="#compat">Compatibility with Postfix &lt; 2.2 TLS support</a>
 
 <li><a href="#credits"> Credits </a>
 
@@ -1531,7 +1531,7 @@ Patches, when possible, are greatly appreciated too. </p>
 
 </ul>
 
-<h2><a name="compat">Compatibility with Postfix <2.2 TLS support</a></h2>
+<h2><a name="compat">Compatibility with Postfix &lt; 2.2 TLS support</a></h2>
 
 <p> Postfix version 2.2 TLS support is based on the Postfix/TLS
 patch by Lutz J&auml;nicke, but differs in a few minor ways. </p>
index f21b3d0aeda10a2e5fa5bbbbe4192da8fdd1d41f..fcf27e1c8209daff3dab2bc6dabc62885a3f24e4 100644 (file)
@@ -6541,7 +6541,9 @@ mail that is still queued.
 </p>
 
 <p>
-To enable this feature, specify a non-zero integral value.
+To enable this feature, specify a non-zero time value (an integral
+value plus an optional one-letter suffix that specifies the time
+unit).
 </p>
 
 <p>
@@ -7429,17 +7431,17 @@ of forged mail from worms or viruses.  </p>
 <ul>
 
 <li> The sender domain matches $mydestination, $inet_interfaces or
-$proxy_interfaces, but the recipient is not listed in
+$proxy_interfaces, but the sender is not listed in
 $local_recipient_maps, and $local_recipient_maps is not null.
 
-<li> The sender domain matches $virtual_alias_domains but the recipient
+<li> The sender domain matches $virtual_alias_domains but the sender
 is not listed in $virtual_alias_maps.
 
 <li> The sender domain matches $virtual_mailbox_domains but the
-recipient is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
+sender is not listed in $virtual_mailbox_maps, and $virtual_mailbox_maps
 is not null.
 
-<li> The sender domain matches $relay_domains but the recipient is
+<li> The sender domain matches $relay_domains but the sender is
 not listed in $relay_recipient_maps, and $relay_recipient_maps is
 not null.
 
@@ -9244,11 +9246,11 @@ See there for details. </p>
 %PARAM smtpd_delay_open_until_valid_rcpt yes
 
 <p> Postpone the start of an SMTP mail transaction until a valid
-RCPT TO command is received. Specify "smtpd_delay_open_until_rcpt =
-yes" to create a mail transaction as soon as the SMTP server receives
-a valid MAIL FROM command. </p>
+RCPT TO command is received. Specify "no" to create a mail transaction
+as soon as the SMTP server receives a valid MAIL FROM command. </p>
 
-<p> Postponing the start of a mail transaction reduces the use of
+<p> With sites that reject lots of mail, the default setting reduces
+the use of
 disk, CPU and memory resources. The downside is that rejected
 recipients are logged with NOQUEUE instead of a mail transaction
 ID. This complicates the logfile analysis of multi-recipient mail.
index b2df97b76ca25bc6992ebe5bbbff686352957f5f..23f16b0a3d1474e897bd020d6836ce1233408435 100644 (file)
@@ -288,7 +288,7 @@ static void bounce_template_parse_buffer(BOUNCE_TEMPLATE *tp)
      * Parse pseudo-header labels and values.
      */
 #define GETLINE(line, buf) \
-        (((line) = (buf)) ? ((buf) = split_at((buf), '\n'), (line)) : 0)
+        (((line) = (buf)) != 0 ? ((buf) = split_at((buf), '\n'), (line)) : 0)
 
     while ((GETLINE(cp, tval)) != 0 && (hlen = is_header(cp)) > 0) {
        for (hval = cp + hlen; *hval && (*hval == ':' || ISSPACE(*hval)); hval++)
index 473a3d202a0ea78360b6bc66366a35ead2ebe558..941b7594fbda29b8af1d6ee8152581073c9736a4 100644 (file)
@@ -608,6 +608,7 @@ int     dns_lookup(const char *name, unsigned type, unsigned flags,
                vstring_sprintf(why, "Name service error for name=%s type=%s: "
                                "Malformed or unexpected name server reply",
                                name, dns_strtype(type));
+           /* FALLTHROUGH */
        case DNS_OK:
            return (status);
        case DNS_RECURSE:
index 508e8532692b234dc0227ee3ea9e00102e5161df..cbd8050e392bc03347934c91c9be2d0fe1eb744c 100644 (file)
@@ -67,6 +67,7 @@ int     conv_time(const char *strval, int *timval, int def_unit)
     switch (sscanf(strval, "%d%c%c", &intval, &unit, &junk)) {
     case 1:
        unit = def_unit;
+       /* FALLTHROUGH */
     case 2:
        if (intval < 0)
            return (0);
index b38f46d0da82a1b8514d1fc38983a07d42fcf94c..2871bdb2c2fcec38211cc62bcf46af86b209c615 100644 (file)
@@ -53,7 +53,6 @@ extern DSN_BUF *dsb_create(void);
 extern DSN_BUF *PRINTFLIKE(8, 9) dsb_update(DSN_BUF *, const char *, const char *, const char *, const char *, const char *, const char *, const char *,...);
 extern DSN_BUF *PRINTFLIKE(3, 4) dsb_simple(DSN_BUF *, const char *, const char *,...);
 extern DSN_BUF *PRINTFLIKE(4, 5) dsb_unix(DSN_BUF *, const char *, const char *, const char *,...);
-extern DSN_BUF *PRINTFLIKE(4, 5) dsb_smtp(DSN_BUF *, const char *, const char *, const char *,...);
 extern DSN_BUF *dsb_formal(DSN_BUF *, const char *, const char *, const char *, const char *, const char *, const char *);
 extern DSN_BUF *dsb_status(DSN_BUF *, const char *);
 extern void dsb_reset(DSN_BUF *);
index 7b62eb05df45da96cc31291fa536c877777fd2cb..45414bc4472ddf9a3d66f115aae7068c8a0ab312 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      "20060315"
+#define MAIL_RELEASE_DATE      "20060325"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #ifdef SNAPSHOT
index 31c0f44cd0a13f1fe1394c4b04e20847b509e646..c9ea78c995dbb1de32280fd53bf8a8a10960f1c6 100644 (file)
@@ -68,9 +68,9 @@
 
 /* Application-specific. */
 
-static INET_ADDR_LIST addr_list;
-static INET_ADDR_LIST mask_list;
-static INET_ADDR_LIST proxy_list;
+static INET_ADDR_LIST saved_addr_list;
+static INET_ADDR_LIST saved_mask_list;
+static INET_ADDR_LIST saved_proxy_list;
 
 /* own_inet_addr_init - initialize my own address list */
 
@@ -182,11 +182,11 @@ int     own_inet_addr(struct sockaddr * addr)
 {
     int     i;
 
-    if (addr_list.used == 0)
-       own_inet_addr_init(&addr_list, &mask_list);
+    if (saved_addr_list.used == 0)
+       own_inet_addr_init(&saved_addr_list, &saved_mask_list);
 
-    for (i = 0; i < addr_list.used; i++)
-       if (SOCK_ADDR_EQ_ADDR(addr, addr_list.addrs + i))
+    for (i = 0; i < saved_addr_list.used; i++)
+       if (SOCK_ADDR_EQ_ADDR(addr, saved_addr_list.addrs + i))
            return (1);
     return (0);
 }
@@ -195,20 +195,20 @@ int     own_inet_addr(struct sockaddr * addr)
 
 INET_ADDR_LIST *own_inet_addr_list(void)
 {
-    if (addr_list.used == 0)
-       own_inet_addr_init(&addr_list, &mask_list);
+    if (saved_addr_list.used == 0)
+       own_inet_addr_init(&saved_addr_list, &saved_mask_list);
 
-    return (&addr_list);
+    return (&saved_addr_list);
 }
 
 /* own_inet_mask_list - return list of addresses */
 
 INET_ADDR_LIST *own_inet_mask_list(void)
 {
-    if (addr_list.used == 0)
-       own_inet_addr_init(&addr_list, &mask_list);
+    if (saved_addr_list.used == 0)
+       own_inet_addr_init(&saved_addr_list, &saved_mask_list);
 
-    return (&mask_list);
+    return (&saved_mask_list);
 }
 
 /* proxy_inet_addr_init - initialize my proxy interface list */
@@ -247,11 +247,11 @@ int     proxy_inet_addr(struct sockaddr * addr)
     if (*var_proxy_interfaces == 0)
        return (0);
 
-    if (proxy_list.used == 0)
-       proxy_inet_addr_init(&proxy_list);
+    if (saved_proxy_list.used == 0)
+       proxy_inet_addr_init(&saved_proxy_list);
 
-    for (i = 0; i < proxy_list.used; i++)
-       if (SOCK_ADDR_EQ_ADDR(addr, proxy_list.addrs + i))
+    for (i = 0; i < saved_proxy_list.used; i++)
+       if (SOCK_ADDR_EQ_ADDR(addr, saved_proxy_list.addrs + i))
            return (1);
     return (0);
 }
@@ -260,10 +260,10 @@ int     proxy_inet_addr(struct sockaddr * addr)
 
 INET_ADDR_LIST *proxy_inet_addr_list(void)
 {
-    if (*var_proxy_interfaces != 0 && proxy_list.used == 0)
-       proxy_inet_addr_init(&proxy_list);
+    if (*var_proxy_interfaces != 0 && saved_proxy_list.used == 0)
+       proxy_inet_addr_init(&saved_proxy_list);
 
-    return (&proxy_list);
+    return (&saved_proxy_list);
 }
 
 #ifdef TEST
index fe02a3226acd774ccb160d4a22982be816ee6d5c..8939ba2bb2f3faca1f1503df78938fa43064741b 100644 (file)
@@ -316,7 +316,7 @@ static ssize_t pipe_command_read(int fd, void *buf, ssize_t len,
 
 static void kill_command(pid_t pid, int sig, uid_t kill_uid, gid_t kill_gid)
 {
-    pid_t   saved_euid = geteuid();
+    uid_t   saved_euid = geteuid();
     gid_t   saved_egid = getegid();
 
     /*
index fdbf7c528468222b63d0d6ae1098247b346894fc..703ec07431b6409cfac24fd999190ec46de0bb81 100644 (file)
@@ -78,6 +78,9 @@ int     resolve_local(const char *addr)
     struct addrinfo *res0 = 0;
     ssize_t len;
 
+    /*
+     * The optimizer will eliminate tests that always fail.
+     */
 #define RETURN(x) \
     do { \
        myfree(saved_addr); \
index bed3b3d8c9253ee217d70a165975b6332c410599..922c1ce1fcfd88ae8fa3fac3a979c713f9c7f970 100644 (file)
@@ -73,9 +73,9 @@ VSTRING *verp_sender(VSTRING *buf, const char *delimiters,
     /*
      * Change prefix@origin into prefix+user=domain@origin.
      */
-    send_local_len = ((cp = strrchr(sender, '@')) ?
+    send_local_len = ((cp = strrchr(sender, '@')) != 0 ?
                      cp - sender : strlen(sender));
-    rcpt_local_len = ((cp = strrchr(recipient, '@')) ?
+    rcpt_local_len = ((cp = strrchr(recipient, '@')) != 0 ?
                      cp - recipient : strlen(recipient));
     vstring_strncpy(buf, sender, send_local_len);
     VSTRING_ADDCH(buf, delimiters[0] & 0xff);
index 356c844d480ef1e92603d9aaf41cd31732d2805c..c9f1f5e1ea651996be1dcc0d2c62dbbd0449c9d5 100644 (file)
@@ -56,6 +56,7 @@
 #include <events.h>
 #include <iostuff.h>
 #include <stringops.h>
+#include <mymalloc.h>
 
 /* Global library. */
 
@@ -215,6 +216,7 @@ static void qmgr_deliver_update(int unused_event, char *context)
     int     status;
     RECIPIENT *recipient;
     int     nrcpt;
+    char   *whatsup;
 
     if (dsb == 0)
        dsb = dsb_create();
@@ -244,9 +246,17 @@ static void qmgr_deliver_update(int unused_event, char *context)
      */
     if (status == DELIVER_STAT_CRASH) {
        message->flags |= DELIVER_STAT_DEFER;
+#if 0
+       whatsup = concatenate("unknown ", transport->name,
+                             " mail transport error", (char *) 0);
+       qmgr_transport_throttle(transport,
+                               DSN_SIMPLE(&dsb->dsn, "4.3.0", whatsup));
+       myfree(whatsup);
+#else
        qmgr_transport_throttle(transport,
                                DSN_SIMPLE(&dsb->dsn, "4.3.0",
                                           "unknown mail transport error"));
+#endif
        msg_warn("transport %s failure -- see a previous warning/fatal/panic logfile record for the problem description",
                 transport->name);
 
@@ -275,7 +285,7 @@ static void qmgr_deliver_update(int unused_event, char *context)
      * (the todo list); stay away from queue entries that have been selected
      * (the busy list), or we would have dangling pointers. The queue itself
      * won't go away before we dispose of the current queue entry.
-     *
+     * 
      * XXX Caution: DSN_COPY() will panic on empty status or reason.
      */
 #define SUSPENDED      "delivery temporarily suspended: "
@@ -324,6 +334,7 @@ void    qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream)
     QMGR_QUEUE *queue;
     QMGR_ENTRY *entry;
     DSN     dsn;
+    char   *whatsup;
 
     /*
      * Find out if this delivery process is really available. Once elected,
@@ -333,9 +344,17 @@ void    qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream)
      * while some other queue manipulation is happening.
      */
     if (qmgr_deliver_initial_reply(stream) != 0) {
+#if 0
+       whatsup = concatenate(transport->name,
+                             " mail transport unavailable", (char *) 0);
+       qmgr_transport_throttle(transport,
+                               DSN_SIMPLE(&dsn, "4.3.0", whatsup));
+       myfree(whatsup);
+#else
        qmgr_transport_throttle(transport,
                                DSN_SIMPLE(&dsn, "4.3.0",
                                           "mail transport unavailable"));
+#endif
        qmgr_defer_transport(transport, &dsn);
        (void) vstream_fclose(stream);
        return;
@@ -362,9 +381,17 @@ void    qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream)
      */
     if (qmgr_deliver_send_request(entry, stream) < 0) {
        qmgr_entry_unselect(queue, entry);
+#if 0
+       whatsup = concatenate(transport->name,
+                             " mail transport unavailable", (char *) 0);
+       qmgr_transport_throttle(transport,
+                               DSN_SIMPLE(&dsn, "4.3.0", whatsup));
+       myfree(whatsup);
+#else
        qmgr_transport_throttle(transport,
                                DSN_SIMPLE(&dsn, "4.3.0",
                                           "mail transport unavailable"));
+#endif
        qmgr_defer_transport(transport, &dsn);
        /* warning: entry and queue may be dangling pointers here */
        (void) vstream_fclose(stream);
index f36b57baa8646dea94de6b55e934f62ce6fe8730..01473a8034ab30a98df709224ee9080f7ce16f88 100644 (file)
@@ -335,7 +335,7 @@ static int pickup_copy(VSTREAM *qfile, VSTREAM *cleanup,
     if (info->st.st_uid == var_owner_uid) {
        msg_info("%s: uid=%d from=<%s> orig_id=%s", info->id,
                 (int) info->st.st_uid, info->sender,
-                ((name = strrchr(info->path, '/')) ?
+                ((name = strrchr(info->path, '/')) != 0 ?
                  name + 1 : info->path));
     } else {
        msg_info("%s: uid=%d from=<%s>", info->id,
index 8d4a3621e63a76801a4bbcdc1fb76d15831c2cb9..96086140697bc2f871debcdec0a9e991d678d260 100644 (file)
@@ -362,7 +362,7 @@ static CONFIG_STR_FN_TABLE str_fn_table_2[] = {
  /*
   * XXX Global so that call-backs can see it.
   */
-static int mode = SHOW_NAME;
+static int cmd_mode = SHOW_NAME;
 
 /* check_myhostname - lookup hostname and validate */
 
@@ -385,7 +385,7 @@ static const char *check_myhostname(void)
      * XXX Do not complain when running as "postconf -d".
      */
     name = get_hostname();
-    if ((mode & SHOW_DEFS) == 0 && (dot = strchr(name, '.')) == 0) {
+    if ((cmd_mode & SHOW_DEFS) == 0 && (dot = strchr(name, '.')) == 0) {
        if ((domain = mail_conf_lookup_eval(VAR_MYDOMAIN)) == 0) {
            msg_warn("My hostname %s is not a fully qualified name - set %s or %s in %s/main.cf",
                     name, VAR_MYHOSTNAME, VAR_MYDOMAIN, var_config_dir);
@@ -432,20 +432,20 @@ static const char *check_mynetworks(void)
     const char *junk;
 
     if (var_inet_interfaces == 0) {
-       if ((mode & SHOW_DEFS)
-           || !(junk = mail_conf_lookup_eval(VAR_INET_INTERFACES)))
+       if ((cmd_mode & SHOW_DEFS)
+           || (junk = mail_conf_lookup_eval(VAR_INET_INTERFACES)) == 0)
            junk = DEF_INET_INTERFACES;
        var_inet_interfaces = mystrdup(junk);
     }
     if (var_mynetworks_style == 0) {
-       if ((mode & SHOW_DEFS)
-           || !(junk = mail_conf_lookup_eval(VAR_MYNETWORKS_STYLE)))
+       if ((cmd_mode & SHOW_DEFS)
+           || (junk = mail_conf_lookup_eval(VAR_MYNETWORKS_STYLE)) == 0)
            junk = DEF_MYNETWORKS_STYLE;
        var_mynetworks_style = mystrdup(junk);
     }
     if (var_inet_protocols == 0) {
-       if ((mode & SHOW_DEFS)
-           || !(junk = mail_conf_lookup_eval(VAR_INET_PROTOCOLS)))
+       if ((cmd_mode & SHOW_DEFS)
+           || (junk = mail_conf_lookup_eval(VAR_INET_PROTOCOLS)) == 0)
            junk = DEF_INET_PROTOCOLS;
        var_inet_protocols = mystrdup(junk);
        proto_info = inet_proto_init(VAR_INET_PROTOCOLS, var_inet_protocols);
@@ -1001,10 +1001,10 @@ int     main(int argc, char **argv)
     while ((ch = GETOPT(argc, argv, "aAbc:deEhmlntv")) > 0) {
        switch (ch) {
        case 'a':
-           mode |= SHOW_SASL_SERV;
+           cmd_mode |= SHOW_SASL_SERV;
            break;
        case 'A':
-           mode |= SHOW_SASL_CLNT;
+           cmd_mode |= SHOW_SASL_CLNT;
            break;
        case 'b':
            if (ext_argv)
@@ -1017,10 +1017,10 @@ int     main(int argc, char **argv)
                msg_fatal("out of memory");
            break;
        case 'd':
-           mode |= SHOW_DEFS;
+           cmd_mode |= SHOW_DEFS;
            break;
        case 'e':
-           mode |= EDIT_MAIN;
+           cmd_mode |= EDIT_MAIN;
            break;
 
            /*
@@ -1031,20 +1031,20 @@ int     main(int argc, char **argv)
             */
 #if 0
        case 'E':
-           mode |= SHOW_EVAL;
+           cmd_mode |= SHOW_EVAL;
            break;
 #endif
        case 'h':
-           mode &= ~SHOW_NAME;
+           cmd_mode &= ~SHOW_NAME;
            break;
        case 'l':
-           mode |= SHOW_LOCKS;
+           cmd_mode |= SHOW_LOCKS;
            break;
        case 'm':
-           mode |= SHOW_MAPS;
+           cmd_mode |= SHOW_MAPS;
            break;
        case 'n':
-           mode |= SHOW_NONDEF;
+           cmd_mode |= SHOW_NONDEF;
            break;
        case 't':
            if (ext_argv)
@@ -1063,7 +1063,7 @@ int     main(int argc, char **argv)
     /*
      * Sanity check.
      */
-    junk = (mode & (SHOW_DEFS | SHOW_NONDEF | SHOW_MAPS | SHOW_LOCKS | EDIT_MAIN | SHOW_SASL_SERV | SHOW_SASL_CLNT));
+    junk = (cmd_mode & (SHOW_DEFS | SHOW_NONDEF | SHOW_MAPS | SHOW_LOCKS | EDIT_MAIN | SHOW_SASL_SERV | SHOW_SASL_CLNT));
     if (junk != 0 && ((junk != SHOW_DEFS && junk != SHOW_NONDEF
             && junk != SHOW_MAPS && junk != SHOW_LOCKS && junk != EDIT_MAIN
                       && junk != SHOW_SASL_SERV && junk != SHOW_SASL_CLNT)
@@ -1094,7 +1094,7 @@ int     main(int argc, char **argv)
     /*
      * If showing map types, show them and exit
      */
-    if (mode & SHOW_MAPS) {
+    if (cmd_mode & SHOW_MAPS) {
        mail_dict_init();
        show_maps();
     }
@@ -1102,23 +1102,23 @@ int     main(int argc, char **argv)
     /*
      * If showing locking methods, show them and exit
      */
-    else if (mode & SHOW_LOCKS) {
+    else if (cmd_mode & SHOW_LOCKS) {
        show_locks();
     }
 
     /*
      * If showing SASL plug-in types, show them and exit
      */
-    else if (mode & SHOW_SASL_SERV) {
+    else if (cmd_mode & SHOW_SASL_SERV) {
        show_sasl(SHOW_SASL_SERV);
-    } else if (mode & SHOW_SASL_CLNT) {
+    } else if (cmd_mode & SHOW_SASL_CLNT) {
        show_sasl(SHOW_SASL_CLNT);
     }
 
     /*
      * Edit main.cf.
      */
-    else if (mode & EDIT_MAIN) {
+    else if (cmd_mode & EDIT_MAIN) {
        edit_parameters(argc - optind, argv + optind);
     }
 
@@ -1126,7 +1126,7 @@ int     main(int argc, char **argv)
      * If showing non-default values, read main.cf.
      */
     else {
-       if ((mode & SHOW_DEFS) == 0) {
+       if ((cmd_mode & SHOW_DEFS) == 0) {
            read_parameters();
            set_parameters();
        }
@@ -1135,7 +1135,7 @@ int     main(int argc, char **argv)
         * Throw together all parameters and show the asked values.
         */
        hash_parameters();
-       show_parameters(mode, argv + optind);
+       show_parameters(cmd_mode, argv + optind);
     }
     vstream_fflush(VSTREAM_OUT);
     exit(0);
index e0089534233cd146382e8b95a96fca5ab976293a..f4b3dff9f05771cf84b21d395eef33246a7b15fd 100644 (file)
@@ -157,6 +157,7 @@ qmgr_deliver.o: ../../include/mail_proto.h
 qmgr_deliver.o: ../../include/mail_queue.h
 qmgr_deliver.o: ../../include/msg.h
 qmgr_deliver.o: ../../include/msg_stats.h
+qmgr_deliver.o: ../../include/mymalloc.h
 qmgr_deliver.o: ../../include/rcpt_print.h
 qmgr_deliver.o: ../../include/recipient_list.h
 qmgr_deliver.o: ../../include/scan_dir.h
index cffdc180cf98e0557a0b4328332497d1ec4c2900..b9ec6830ef370499d0a5ee777ca729729d142640 100644 (file)
@@ -56,12 +56,12 @@ typedef struct QMGR_SCAN QMGR_SCAN;
 }
 
 #define QMGR_LIST_UNLINK(head, type, object, peers) { \
-    type   next = object->peers.next; \
-    type   prev = object->peers.prev; \
-    if (prev) prev->peers.next = next; \
-    else head.next = next; \
-    if (next) next->peers.prev = prev; \
-    else head.prev = prev; \
+    type   _next = object->peers.next; \
+    type   _prev = object->peers.prev; \
+    if (_prev) _prev->peers.next = _next; \
+       else head.next = _next; \
+    if (_next) _next->peers.prev = _prev; \
+       else head.prev = _prev; \
     object->peers.next = object->peers.prev = 0; \
 }
 
index 59ae7f1027506fd95c21189db39cd797a87909e4..ed16d8691ae30b65bd4266c5801adb5605a6eaa7 100644 (file)
@@ -61,6 +61,7 @@
 #include <events.h>
 #include <iostuff.h>
 #include <stringops.h>
+#include <mymalloc.h>
 
 /* Global library. */
 
@@ -220,6 +221,7 @@ static void qmgr_deliver_update(int unused_event, char *context)
     int     status;
     RECIPIENT *recipient;
     int     nrcpt;
+    char   *whatsup;
 
     if (dsb == 0)
        dsb = dsb_create();
@@ -249,9 +251,17 @@ static void qmgr_deliver_update(int unused_event, char *context)
      */
     if (status == DELIVER_STAT_CRASH) {
        message->flags |= DELIVER_STAT_DEFER;
+#if 0
+       whatsup = concatenate("unknown ", transport->name,
+                             " mail transport error", (char *) 0);
+       qmgr_transport_throttle(transport,
+                               DSN_SIMPLE(&dsb->dsn, "4.3.0", whatsup));
+       myfree(whatsup);
+#else
        qmgr_transport_throttle(transport,
                                DSN_SIMPLE(&dsb->dsn, "4.3.0",
                                           "unknown mail transport error"));
+#endif
        msg_warn("transport %s failure -- see a previous warning/fatal/panic logfile record for the problem description",
                 transport->name);
 
@@ -280,7 +290,7 @@ static void qmgr_deliver_update(int unused_event, char *context)
      * (the todo list); stay away from queue entries that have been selected
      * (the busy list), or we would have dangling pointers. The queue itself
      * won't go away before we dispose of the current queue entry.
-     *
+     * 
      * XXX Caution: DSN_COPY() will panic on empty status or reason.
      */
 #define SUSPENDED      "delivery temporarily suspended: "
@@ -328,6 +338,7 @@ void    qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream)
 {
     QMGR_ENTRY *entry;
     DSN     dsn;
+    char   *whatsup;
 
     /*
      * Find out if this delivery process is really available. Once elected,
@@ -337,9 +348,17 @@ void    qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream)
      * while some other queue manipulation is happening.
      */
     if (qmgr_deliver_initial_reply(stream) != 0) {
+#if 0
+       whatsup = concatenate(transport->name,
+                             " mail transport unavailable", (char *) 0);
+       qmgr_transport_throttle(transport,
+                               DSN_SIMPLE(&dsn, "4.3.0", whatsup));
+       myfree(whatsup);
+#else
        qmgr_transport_throttle(transport,
                                DSN_SIMPLE(&dsn, "4.3.0",
                                           "mail transport unavailable"));
+#endif
        qmgr_defer_transport(transport, &dsn);
        (void) vstream_fclose(stream);
        return;
@@ -365,9 +384,17 @@ void    qmgr_deliver(QMGR_TRANSPORT *transport, VSTREAM *stream)
      */
     if (qmgr_deliver_send_request(entry, stream) < 0) {
        qmgr_entry_unselect(entry);
+#if 0
+       whatsup = concatenate(transport->name,
+                             " mail transport unavailable", (char *) 0);
+       qmgr_transport_throttle(transport,
+                               DSN_SIMPLE(&dsn, "4.3.0", whatsup));
+       myfree(whatsup);
+#else
        qmgr_transport_throttle(transport,
                                DSN_SIMPLE(&dsn, "4.3.0",
                                           "mail transport unavailable"));
+#endif
        qmgr_defer_transport(transport, &dsn);
        /* warning: entry may be a dangling pointer here */
        (void) vstream_fclose(stream);
index d25a60121d6b7c945debb422c54bd72b1209bbc6..86068af17445f8ae441eccb1d397f222b04b0d52 100644 (file)
@@ -2700,8 +2700,9 @@ static int xclient_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     }
 #define STREQ(x,y)     (strcasecmp((x), (y)) == 0)
 #define UPDATE_STR(s, v) do { \
+           const char *_v = (v); \
            if (s) myfree(s); \
-           s = (v) ? mystrdup(v) : 0; \
+           s = (_v) ? mystrdup(_v) : 0; \
        } while(0)
 
     /*
index 3b8228f500fdfb1b6a921bba35e6a8de30395a90..f071b757e99c1c1baa57b36cdcdd56a6d6914246 100644 (file)
@@ -3240,7 +3240,7 @@ static int check_policy_service(SMTPD_STATE *state, const char *server,
      * Sanity check.
      */
     if (!policy_clnt_table
-    || !(policy_clnt = (ATTR_CLNT *) htable_find(policy_clnt_table, server)))
+       || (policy_clnt = (ATTR_CLNT *) htable_find(policy_clnt_table, server)) == 0)
        msg_panic("check_policy_service: no client endpoint for server %s",
                  server);
 
index 3a25270f46fd964337b31c5ad1d4afe41445aa51..9df37e3555e5b5fe16acf754c50ecdcda71ceaca 100644 (file)
@@ -452,7 +452,7 @@ int     smtpd_proxy_cmd(SMTPD_STATE *state, int expect, const char *fmt,...)
     if (vstream_ftimeout(state->proxy)
        || vstream_ferror(state->proxy)
        || vstream_feof(state->proxy)
-       || ((err = vstream_setjmp(state->proxy) != 0)
+       || ((err = vstream_setjmp(state->proxy)) != 0
            && smtpd_proxy_rdwr_error(state->proxy, err))) {
        state->error_mask |= MAIL_ERROR_SOFTWARE;
        state->err |= CLEANUP_STAT_PROXY;
index 3be497a458a2e172505e7bbac1bbbc9744f55826..2116b1bda132b44268f03e29170e19e6266a2062 100644 (file)
@@ -85,7 +85,7 @@ typedef struct {
 static int var_tmout;
 static VSTRING *buffer;
 static void disconnect(SINK_STATE *);
-static int count;
+static int count_deliveries;
 static int counter;
 
 /* send_reply - finish conversation */
@@ -95,7 +95,7 @@ static void send_reply(SINK_STATE *state)
     vstring_sprintf(buffer, "%cOk", QMQP_STAT_OK);
     NETSTRING_PUT_BUF(state->stream, buffer);
     netstring_fflush(state->stream);
-    if (count) {
+    if (count_deliveries) {
        counter++;
        vstream_printf("%d\r", counter);
        vstream_fflush(VSTREAM_OUT);
@@ -265,7 +265,7 @@ int     main(int argc, char **argv)
            protocols = INET_PROTO_NAME_IPV6;
            break;
        case 'c':
-           count++;
+           count_deliveries++;
            break;
        case 'v':
            msg_verbose++;
index b30b72761d4d219b9581db4b08190a55c1f1c3f4..864bc4627076b3ef195a158fbe38d029b21215f7 100644 (file)
@@ -74,7 +74,7 @@
 
 /* tls_session_stop - shut down the TLS connection and reset state */
 
-void    tls_session_stop(SSL_CTX *ctx, VSTREAM *stream, int timeout,
+void    tls_session_stop(SSL_CTX *unused_ctx, VSTREAM *stream, int timeout,
                                 int failure, TLScontext_t *TLScontext)
 {
     const char *myname = "tls_session_stop";
index 87ab4e9f76b2e3cfff2e6f60c44217925beeed62..2c9edd008796b4eddf1cda3818a8256620fcca16 100644 (file)
@@ -295,7 +295,7 @@ char   *tls_issuer_CN(X509 *peer)
      * If no issuer CN field, use Organization instead. CA certs without a CN
      * are common, so we only complain if the organization is also missing.
      */
-    if (!(cn = tls_text_name(name, NID_commonName, "issuer CN", DONT_GRIPE)))
+    if ((cn = tls_text_name(name, NID_commonName, "issuer CN", DONT_GRIPE)) == 0)
        cn = tls_text_name(name, NID_organizationName,
                           "issuer Organization", DO_GRIPE);
     return (cn);
index b72619957254110ad17cf607c5dd512a097e10d2..c03f019be7e17299a3f839df1fac34bb1be72490 100644 (file)
@@ -188,8 +188,8 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
     tree = tok822_scan_addr(vstring_str(addr_buf));
 
     /*
-     * Let the optimizer replace multiple expansions of this macro by a GOTO
-     * to a single instance.
+     * The optimizer will eliminate tests that always fail, and will replace
+     * multiple expansions of this macro by a GOTO to a single instance.
      */
 #define FREE_MEMORY_AND_RETURN { \
        if (saved_domain) \
@@ -366,6 +366,8 @@ static void resolve_addr(RES_CONTEXT *rp, char *sender, char *addr,
      */
     tok822_internalize(nextrcpt, tree, TOK822_STR_DEFL);
     rcpt_domain = strrchr(STR(nextrcpt), '@') + 1;
+    if (rcpt_domain == 0)
+       msg_panic("no @ in address: \"%s\"", STR(nextrcpt));
     if (*rcpt_domain == '[') {
        if (!valid_mailhost_literal(rcpt_domain, DONT_GRIPE))
            *flags |= RESOLVE_FLAG_ERROR;
index 1e5df5a2b9ccefa365845e25242f16241af13232..60155de03536a57e405cfdb5b91eef074e5a9929 100644 (file)
@@ -211,36 +211,12 @@ void    rewrite_tree(RWR_CONTEXT *context, TOK822 *tree)
        tok822_free_tree(tok822_sub_keep_before(tree, tree->tail));
 }
 
-/* rewrite_addr - rewrite address according to rule set */
-
-void    rewrite_addr(RWR_CONTEXT *context, char *addr, VSTRING *result)
-{
-    TOK822 *tree;
-
-    /*
-     * Sanity check. An address is supposed to be in externalized form.
-     */
-    if (*addr == 0) {
-       msg_warn("rewrite_addr: null address");
-       vstring_strcpy(result, addr);
-       return;
-    }
-
-    /*
-     * Convert the address from externalized (quoted) form to token list,
-     * rewrite it, and convert back.
-     */
-    tree = tok822_scan_addr(addr);
-    rewrite_tree(context, tree);
-    tok822_externalize(result, tree, TOK822_STR_DEFL);
-    tok822_free_tree(tree);
-}
-
 /* rewrite_proto - read request and send reply */
 
 int     rewrite_proto(VSTREAM *stream)
 {
     RWR_CONTEXT *context;
+    TOK822 *tree;
 
     if (attr_scan(stream, ATTR_FLAG_STRICT,
                  ATTR_TYPE_STR, MAIL_ATTR_RULE, ruleset,
@@ -256,8 +232,25 @@ int     rewrite_proto(VSTREAM *stream)
        msg_warn("unknown context: %s", vstring_str(ruleset));
        return (-1);
     }
-    rewrite_addr(context, vstring_str(address), result);
 
+    /*
+     * Sanity check. An address is supposed to be in externalized form.
+     */
+    if (*vstring_str(address) == 0) {
+       msg_warn("rewrite_addr: null address");
+       vstring_strcpy(result, vstring_str(address));
+    }
+
+    /*
+     * Convert the address from externalized (quoted) form to token list,
+     * rewrite it, and convert back.
+     */
+    else {
+       tree = tok822_scan_addr(vstring_str(address));
+       rewrite_tree(context, tree);
+       tok822_externalize(result, tree, TOK822_STR_DEFL);
+       tok822_free_tree(tree);
+    }
     if (msg_verbose)
        msg_info("`%s' `%s' -> `%s'", vstring_str(ruleset),
                 vstring_str(address), vstring_str(result));
index b39a97154a5507f84a280b652990f7357b7db237..bb55c5a2fb9eebb2a05c338686654efade80ff3f 100644 (file)
@@ -248,7 +248,7 @@ DICT   *dict_handle(const char *dict_name)
 {
     DICT_NODE *node;
 
-    return ((node = dict_node(dict_name)) ? node->dict : 0);
+    return ((node = dict_node(dict_name)) != 0 ? node->dict : 0);
 }
 
 /* dict_node_free - dict_unregister() callback */
index 24142fcde167fdef0fe9ddaef222c6ac0429861d..4c338125aef6d2e2ff36396b7eb23b022715406c 100644 (file)
@@ -152,15 +152,16 @@ static int sanitize(int status)
      */
     switch (status) {
 
-       case DB_NOTFOUND:               /* get, del */
-       case DB_KEYEXIST:               /* put */
-       return (1);                     /* non-fatal */
+    case DB_NOTFOUND:                          /* get, del */
+    case DB_KEYEXIST:                          /* put */
+       return (1);                             /* non-fatal */
 
     case 0:
        return (0);                             /* success */
 
     case DB_KEYEMPTY:                          /* get, others? */
        status = EINVAL;
+       /* FALLTHROUGH */
     default:
        errno = status;
        return (-1);                            /* fatal */
index 86116e1e0541ede93568573029ed4bc3ed587262..1fbbfcf249718dcdf04ecf2d56bd8e3312807a33 100644 (file)
@@ -140,11 +140,11 @@ static unsigned htable_hash(const char *s, unsigned size)
 /* htable_link - insert element into table */
 
 #define htable_link(table, element) { \
-     HTABLE_INFO **h = table->data + htable_hash(element->key, table->size);\
+     HTABLE_INFO **_h = table->data + htable_hash(element->key, table->size);\
     element->prev = 0; \
-    if ((element->next = *h) != 0) \
-       (*h)->prev = element; \
-    *h = element; \
+    if ((element->next = *_h) != 0) \
+       (*_h)->prev = element; \
+    *_h = element; \
     table->used++; \
 }
 
index 31eb14ca9b97252bf14a2f09d8a409d82c354128..854f1869fe445f9f203405ea31f47f3e639dd5ad 100644 (file)
@@ -67,6 +67,7 @@ char   *percentm(const char *str, int err)
            switch (ip[1]) {
            default:                            /* leave %<any> alone */
                VSTRING_ADDCH(vp, *ip++);
+               /* FALLTHROUGH */
            case '\0':                          /* don't fall off end */
                VSTRING_ADDCH(vp, *ip++);
                break;
index d64840b114256dfac923bc861d089650e57b20ef..1ecabecf2a4400d831e182a13324619b9e8776d3 100644 (file)
@@ -175,7 +175,7 @@ static VSTREAM *safe_open_exist(const char *path, int flags,
 /* safe_open_create - create new file */
 
 static VSTREAM *safe_open_create(const char *path, int flags, mode_t mode,
-                   struct stat * st, uid_t user, uid_t group, VSTRING *why)
+                   struct stat * st, uid_t user, gid_t group, VSTRING *why)
 {
     VSTREAM *fp;
 
index 4046110e6519c95b19cc71b51483a63b76a43049..e64b15b2e60068a6c57132cdd95d4dd638cbf400 100644 (file)
@@ -96,9 +96,9 @@
 
 #define VBUF_STRCAT(bp, s) { \
        unsigned char *_cp = (unsigned char *) (s); \
-       int ch; \
-       while ((ch = *_cp++) != 0) \
-           VBUF_PUT((bp), ch); \
+       int _ch; \
+       while ((_ch = *_cp++) != 0) \
+           VBUF_PUT((bp), _ch); \
     }
 
 /* vbuf_print - format string, vsprintf-like interface */
@@ -156,7 +156,7 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
                VSTRING_ADDNUM(fmt, width);
                cp++;
            } else {                            /* hard-coded field width */
-               for (width = 0; ISDIGIT(ch = *cp); cp++) {
+               for (width = 0; ch = *cp, ISDIGIT(ch); cp++) {
                    width = width * 10 + ch - '0';
                    VSTRING_ADDCH(fmt, ch);
                }
@@ -172,7 +172,7 @@ VBUF   *vbuf_print(VBUF *bp, const char *format, va_list ap)
                VSTRING_ADDNUM(fmt, prec);
                cp++;
            } else {                            /* hard-coded precision */
-               for (prec = 0; ISDIGIT(ch = *cp); cp++) {
+               for (prec = 0; ch = *cp, ISDIGIT(ch); cp++) {
                    prec = prec * 10 + ch - '0';
                    VSTRING_ADDCH(fmt, ch);
                }
index 2fb5a291a5f5e72591ed226cca163d4936d8b3a3..c5f2911af46973611f93c44e26487ed67aa472ac 100644 (file)
 /*     given to vstream_longjmp().
 /*
 /*     NB: non-local jumps such as vstream_longjmp() are not safe
-/*     for jumping out of any vstream routine.
+/*     for jumping out of any routine that manipulates VSTREAM data.
+/*     longjmp() like calls are best avoided in signal handlers.
 /*
 /*     vstream_ftime() returns the time of initialization, the last buffer
 /*     fill operation, or the last buffer flush operation for the specified
@@ -891,6 +892,7 @@ off_t   vstream_fseek(VSTREAM *stream, off_t offset, int whence)
            offset += bp->cnt;                  /* subtract unread data */
        else if (whence == SEEK_END)
            bp->flags &= ~VSTREAM_FLAG_SEEK;
+       /* FALLTHROUGH */
     case 0:
        VSTREAM_BUF_AT_END(bp);
        break;