]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.3-20050413
authorWietse Venema <wietse@porcupine.org>
Wed, 13 Apr 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:31:04 +0000 (06:31 +0000)
71 files changed:
postfix/HISTORY
postfix/README_FILES/STANDARD_CONFIGURATION_README
postfix/RELEASE_NOTES
postfix/conf/virtual
postfix/html/STANDARD_CONFIGURATION_README.html
postfix/html/bounce.8.html
postfix/html/postconf.5.html
postfix/html/virtual.5.html
postfix/man/man5/postconf.5
postfix/man/man5/virtual.5
postfix/man/man8/bounce.8
postfix/pflogsumm-dsn-patch [new file with mode: 0644]
postfix/proto/STANDARD_CONFIGURATION_README.html
postfix/proto/postconf.proto
postfix/proto/virtual
postfix/src/anvil/Makefile.in
postfix/src/bounce/Makefile.in
postfix/src/bounce/bounce.c
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup.c
postfix/src/cleanup/cleanup_api.c
postfix/src/cleanup/cleanup_init.c
postfix/src/discard/Makefile.in
postfix/src/dns/Makefile.in
postfix/src/error/Makefile.in
postfix/src/flush/Makefile.in
postfix/src/fsstone/Makefile.in
postfix/src/global/Makefile.in
postfix/src/global/mail_stream.c
postfix/src/global/mail_stream.h
postfix/src/global/mail_version.h
postfix/src/lmtp/Makefile.in
postfix/src/lmtp/lmtp_sasl_glue.c
postfix/src/local/Makefile.in
postfix/src/master/Makefile.in
postfix/src/oqmgr/Makefile.in
postfix/src/pickup/Makefile.in
postfix/src/pipe/Makefile.in
postfix/src/postalias/Makefile.in
postfix/src/postcat/Makefile.in
postfix/src/postconf/Makefile.in
postfix/src/postdrop/Makefile.in
postfix/src/postdrop/postdrop.c
postfix/src/postfix/Makefile.in
postfix/src/postkick/Makefile.in
postfix/src/postlock/Makefile.in
postfix/src/postlog/Makefile.in
postfix/src/postmap/Makefile.in
postfix/src/postqueue/Makefile.in
postfix/src/postsuper/Makefile.in
postfix/src/proxymap/Makefile.in
postfix/src/qmgr/Makefile.in
postfix/src/qmqpd/Makefile.in
postfix/src/scache/Makefile.in
postfix/src/sendmail/Makefile.in
postfix/src/showq/Makefile.in
postfix/src/smtp/Makefile.in
postfix/src/smtp/smtp_sasl_glue.c
postfix/src/smtpd/Makefile.in
postfix/src/smtpd/smtpd.c
postfix/src/smtpd/smtpd_sasl_glue.c
postfix/src/smtpstone/Makefile.in
postfix/src/spawn/Makefile.in
postfix/src/tls/Makefile.in
postfix/src/tlsmgr/Makefile.in
postfix/src/trivial-rewrite/Makefile.in
postfix/src/util/Makefile.in
postfix/src/util/dict_cdb.c
postfix/src/util/sys_defs.h
postfix/src/verify/Makefile.in
postfix/src/virtual/Makefile.in

index af7f827aa023187ea37f4ee1f6126546c05e061e..6f7753fa02ce49b4edb49364e65ddc84193397af 100644 (file)
@@ -10622,6 +10622,44 @@ Apologies for any names omitted.
        world. Based on code by Branko F. Gracnar. Files:
        smtpd/smtpd.c, and documentation.
 
+20050407
+
+       @%^!#& Thanks to inadequate SASL documentation the client
+       could negotiate a security layer where none was desired.
+       Better documentation has become available since Postfix
+       SASL support was implemented, and now Postfix needs to be
+       fixed. Files: */*_sasl_glue.c.
+
+20050409
+
+       Safety: the CDB map now logs a warning when the source file
+       is newer than the indexed file, just like the Berkeley DB
+       and DBM maps. Michael Tokarev. File: util/dict_cdb.c.
+
+20040411
+
+       Portability: put the SASL DLL Hell guard after the declarations
+       instead of before.  Reported by Marcus Grando. Files:
+       smtp/smtp_sasl_glue.c, lmtp/lmtp_sasl_glue.c.
+
+20050412
+
+       Infrastructure: change the disposition or other properties
+       of an embryonic queue file. This is currently used only to
+       place mail on hold.  After code by Victor Duchovni.  Files:
+       global/mail_stream.[hc], cleanup/cleanup_api.c.
+       
+20040513
+
+        Portability: don't mix socket message send/receive calls
+        with socket stream read/write calls. The fact that you can
+        get away with it only on some stacks implies that there is
+        no long-term guarantee. Specify -DCAN_WRITE_BEFORE_SENDING_FD
+        if you feel brave. File: util/sys_defs.h.
+
+       Robustness: re-compile all object files after the "make
+       makefiles" options have changed. Files: src/*/Makefile.in.
+
 Open problems:
 
        Med: disable header address rewriting after XCLIENT?
index f0161c1156880fa1779f8c988603de2b278dabc0..9ee8d3dcd99c0641a4deaca8276bceb8d9cd774a 100644 (file)
@@ -277,6 +277,22 @@ the relay_recipients table.
 Execute the command "p\bpo\bos\bst\btm\bma\bap\bp /\b/e\bet\btc\bc/\b/p\bpo\bos\bst\btf\bfi\bix\bx/\b/t\btr\bra\ban\bns\bsp\bpo\bor\brt\bt" whenever you change the
 transport table.
 
+In some installations, there may be separate instances of Postfix processing
+inbound and outbound mail on a multi-homed firewall. The inbound Postfix
+instance has an SMTP server listening on the external firewall interface, and
+the outbound Postfix instance has an SMTP server listening on the internal
+interface. In such a configuration is it is tempting to configure
+$inet_interfaces in each instance with just the corresponding interface
+address.
+
+In most cases, using inet_interfaces in this way will not work, because as
+documented in the $inet_interfaces reference manual, the smtp(8) delivery agent
+will also use the specified interface address as the source address for
+outbound connections and will be unable to reach hosts on "the other side" of
+the firewall. The symptoms are that the firewall is unable to connect to hosts
+that are in fact up. See the inet_interfaces parameter documentation for
+suggested work-arounds.
+
 D\bDe\bel\bli\biv\bve\ber\bri\bin\bng\bg s\bso\bom\bme\be b\bbu\but\bt n\bno\bot\bt a\bal\bll\bl a\bac\bcc\bco\bou\bun\bnt\bts\bs l\blo\boc\bca\bal\bll\bly\by
 
 A drawback of sending mail as "user@example.com" (instead of
@@ -298,22 +314,6 @@ Translation:
     listed in $mydestination, or when it matches $inet_interfaces or
     $proxy_interfaces.
 
-In some installations, there may be separate instances of Postfix processing
-inbound and outbound mail on a multi-homed firewall. The inbound Postfix
-instance has an SMTP server listening on the external firewall interface, and
-the outbound Postfix instance has an SMTP server listening on the internal
-interface. In such a configuration is it is tempting to configure
-$inet_interfaces in each instance with just the corresponding interface
-address.
-
-In most cases, using inet_interfaces in this way will not work, because as
-documented in the $inet_interfaces reference manual, the smtp(8) delivery agent
-will also use the specified interface address as the source address for
-outbound connections and will be unable to reach hosts on "the other side" of
-the firewall. The symptoms are that the firewall is unable to connect to hosts
-that are in fact up. See the inet_interfaces parameter documentation for
-suggested work-arounds.
-
 R\bRu\bun\bnn\bni\bin\bng\bg P\bPo\bos\bst\btf\bfi\bix\bx b\bbe\beh\bhi\bin\bnd\bd a\ba f\bfi\bir\bre\bew\bwa\bal\bll\bl
 
 The simplest way to set up Postfix on a host behind a firewalled network is to
index 8ea1805bc3a792e0afcfa67b59d10c7b86f4122c..93daf420a4b07139608dde2a78e175b73572581f 100644 (file)
@@ -28,7 +28,8 @@ Incompatibility with snapshot 20050328
 
 The logging format has changed. Postfix delivery agents now log the
 RFC 3463 enhanced status code as "dsn=x.y.z" where y and z can be
-up to three digits each.
+up to three digits each. See the file pfloggsum-dsn-patch for an
+update to the pfloggsum script.
 
 After you upgrade from Postfix 2.2 or 2.3 you need to execute
 "postfix reload", otherwise you will keep running the old Postfix
index 6aa789bc97e93bdc134143a00ab9f393c9f9b1ac..d6d1dc0e6274a43f8568ffa9524b3b89df1f0fc7 100644 (file)
 # 
 # DESCRIPTION
 #        The  optional  virtual(5)  alias  table rewrites recipient
-#        addresses for all local, virtual and remote mail  destina-
-#        tions.   This is unlike the aliases(5) table which is used
-#        only for local(8) delivery.  Virtual  aliasing  is  recur-
-#        sive,  and is implemented by the Postfix cleanup(8) daemon
-#        before mail is queued.
+#        addresses for all local, all virtual, and all remote  mail
+#        destinations.   This  is unlike the aliases(5) table which
+#        is used only for local(8) delivery.  Virtual  aliasing  is
+#        recursive,  and  is  implemented by the Postfix cleanup(8)
+#        daemon before mail is queued.
 # 
 #        The main applications of virtual aliasing are:
 # 
index 188e023f43329e0b67981c14cf757c730cdfa433..98b9f260e9a133b06ca11cc0a7648a90fe38498a 100644 (file)
@@ -391,6 +391,22 @@ whenever you change the relay_recipients table. </p>
 <p> Execute the command "<b>postmap /etc/postfix/transport</b>"
 whenever you change the transport table. </p>
 
+<p> In some installations, there may be separate instances of Postfix
+processing inbound and outbound mail on a multi-homed firewall. The
+inbound Postfix instance has an SMTP server listening on the external
+firewall interface, and the outbound Postfix instance has an SMTP server
+listening on the internal interface. In such a configuration is it is
+tempting to configure $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> in each instance with just the
+corresponding interface address. </p>
+
+<p> In most cases, using <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> in this way will not work,
+because as documented in the $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> reference manual, the
+<a href="smtp.8.html">smtp(8)</a> delivery agent will also use the specified interface address
+as the source address for outbound connections and will be unable to
+reach hosts on "the other side" of the firewall. The symptoms are that
+the firewall is unable to connect to hosts that are in fact up. See the
+<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> parameter documentation for suggested work-arounds.</p>
+
 <h2><a name="some_local">Delivering some but not all accounts
 locally</a></h2>
 
@@ -422,22 +438,6 @@ matches $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> or $<a hr
 
 </ul>
 
-<p> In some installations, there may be separate instances of Postfix
-processing inbound and outbound mail on a multi-homed firewall. The
-inbound Postfix instance has an SMTP server listening on the external
-firewall interface, and the outbound Postfix instance has an SMTP server
-listening on the internal interface. In such a configuration is it is
-tempting to configure $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> in each instance with just the
-corresponding interface address. </p>
-
-<p> In most cases, using <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> in this way will not work,
-because as documented in the $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> reference manual, the
-<a href="smtp.8.html">smtp(8)</a> delivery agent will also use the specified interface address
-as the source address for outbound connections and will be unable to
-reach hosts on "the other side" of the firewall. The symptoms are that
-the firewall is unable to connect to hosts that are in fact up. See the
-<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> parameter documentation for suggested work-arounds.</p>
-
 <h2><a name="intranet">Running Postfix behind a firewall</a></h2>
 
 <p> The simplest way to set up Postfix on a host behind a firewalled
index a3ed1ee99f319811c7bda45e8a61203823c821bb..e9caeec1dc99919026863946b81fcf7c5c6ed312 100644 (file)
@@ -44,6 +44,7 @@ BOUNCE(8)                                                            BOUNCE(8)
 
 <b>STANDARDS</b>
        <a href="http://www.faqs.org/rfcs/rfc822.html">RFC 822</a> (ARPA Internet Text Messages)
+       <a href="http://www.faqs.org/rfcs/rfc1892.html">RFC 1892</a> (Delivery Status Notifications)
        <a href="http://www.faqs.org/rfcs/rfc1894.html">RFC 1894</a> (Delivery Status Notifications)
        <a href="http://www.faqs.org/rfcs/rfc2045.html">RFC 2045</a> (Format of Internet Message Bodies)
 
index 868399d6747104ab38c3a66e0faf89994084a0ae..f3fa3df3d0746f1b17dc11f5c58b6c2899b11790 100644 (file)
@@ -4057,6 +4057,9 @@ manager and by other long-lived Postfix daemon processes.
 The maximal time between attempts to deliver a deferred message.
 </p>
 
+<p> This parameter should be set to a value greater than or equal
+to $<a href="postconf.5.html#minimal_backoff_time">minimal_backoff_time</a>. See also $<a href="postconf.5.html#queue_run_delay">queue_run_delay</a>.  </p>
+
 <p>
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
@@ -4150,6 +4153,9 @@ This parameter also limits the time an unreachable destination is
 kept in the short-term, in-memory, destination status cache.
 </p>
 
+<p> It is recommended that this parameter be set greater than or
+equal to $<a href="postconf.5.html#queue_run_delay">queue_run_delay</a>. See also $<a href="postconf.5.html#maximal_backoff_time">maximal_backoff_time</a>.  </p>
+
 <p>
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
@@ -4910,6 +4916,9 @@ zero means there is no minimum required amount of free space.
 The time between <a href="QSHAPE_README.html#deferred_queue">deferred queue</a> scans by the queue manager.
 </p>
 
+<p> It is recommended that this parameter be set less than or equal
+to $<a href="postconf.5.html#minimal_backoff_time">minimal_backoff_time</a>. See also $<a href="postconf.5.html#maximal_backoff_time">maximal_backoff_time</a>.  </p>
+
 <p>
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
index 51d3b7e9f43a500b2b1f634646d5fc6b6881097e..1c20d4fb5ee654c49195f55d6d4de7a23aefecd2 100644 (file)
@@ -18,11 +18,11 @@ VIRTUAL(5)                                                          VIRTUAL(5)
 
 <b>DESCRIPTION</b>
        The  optional  <a href="virtual.5.html"><b>virtual</b>(5)</a>  alias  table rewrites recipient
-       addresses for all local, virtual and remote mail  destina-
-       tions.   This is unlike the <a href="aliases.5.html"><b>aliases</b>(5)</a> table which is used
-       only for <a href="local.8.html"><b>local</b>(8)</a> delivery.  Virtual  aliasing  is  recur-
-       sive,  and is implemented by the Postfix <a href="cleanup.8.html"><b>cleanup</b>(8)</a> daemon
-       before mail is queued.
+       addresses for all local, all virtual, and all remote  mail
+       destinations.   This  is unlike the <a href="aliases.5.html"><b>aliases</b>(5)</a> table which
+       is used only for <a href="local.8.html"><b>local</b>(8)</a> delivery.  Virtual  aliasing  is
+       recursive,  and  is  implemented by the Postfix <a href="cleanup.8.html"><b>cleanup</b>(8)</a>
+       daemon before mail is queued.
 
        The main applications of virtual aliasing are:
 
index c6b33c764abbcd7911447fea78b5b37f4177c83d..2743d1935bf853a9621968ef21be6e0169aa174d 100644 (file)
@@ -2200,6 +2200,9 @@ manager and by other long-lived Postfix daemon processes.
 .SH maximal_backoff_time (default: 4000s)
 The maximal time between attempts to deliver a deferred message.
 .PP
+This parameter should be set to a value greater than or equal
+to $minimal_backoff_time. See also $queue_run_delay.
+.PP
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
 .SH maximal_queue_lifetime (default: 5d)
@@ -2233,6 +2236,9 @@ The minimal time between attempts to deliver a deferred message.
 This parameter also limits the time an unreachable destination is
 kept in the short-term, in-memory, destination status cache.
 .PP
+It is recommended that this parameter be set greater than or
+equal to $queue_run_delay. See also $maximal_backoff_time.
+.PP
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
 .SH multi_recipient_bounce_reject_code (default: 550)
@@ -2659,6 +2665,9 @@ zero means there is no minimum required amount of free space.
 .SH queue_run_delay (default: 1000s)
 The time between deferred queue scans by the queue manager.
 .PP
+It is recommended that this parameter be set less than or equal
+to $minimal_backoff_time. See also $maximal_backoff_time.
+.PP
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
 .SH queue_service_name (default: qmgr)
index 9250663fc706120a441f269974fa00d0d686e4f9..42088e867bb47dd0d610281dab3a4cfd3b9488ab 100644 (file)
@@ -17,7 +17,8 @@ Postfix virtual alias table format
 .ad
 .fi
 The optional \fBvirtual\fR(5) alias table rewrites recipient
-addresses for all local, virtual and remote mail destinations.
+addresses for all local, all virtual, and all remote mail
+destinations.
 This is unlike the \fBaliases\fR(5) table which is used
 only for \fBlocal\fR(8) delivery.  Virtual aliasing is
 recursive, and is implemented by the Postfix \fBcleanup\fR(8)
index cf8799842e9ca2a5e24f49b8e59a34cc8686d3e3..97cc496f55b055c11156fc8d941acaa93988b011 100644 (file)
@@ -41,6 +41,7 @@ themselves, and that depend on retry logic in their own client.
 .na
 .nf
 RFC 822 (ARPA Internet Text Messages)
+RFC 1892 (Delivery Status Notifications)
 RFC 1894 (Delivery Status Notifications)
 RFC 2045 (Format of Internet Message Bodies)
 .SH DIAGNOSTICS
diff --git a/postfix/pflogsumm-dsn-patch b/postfix/pflogsumm-dsn-patch
new file mode 100644 (file)
index 0000000..6c312d6
--- /dev/null
@@ -0,0 +1,23 @@
+Postfix 2.3 changes the logging format, introducing a field that
+reports the delivery status code as "dsn=x.yy.zz", where yy and zz
+can be up to three digits long. This breaks pflogsumm analysis.
+
+The patch below appeared in:
+
+    Message-ID: <4257CF98.10309@michaweb.net>
+    Date: Sat, 09 Apr 2005 14:50:32 +0200
+    From: John Fawcett <johnml@michaweb.net>
+    To: postfix-users@postfix.org
+    Subject: postfix 2.3 and pflogsumm
+
+--- pflogsumm.original 2005-04-09 12:54:44.140532258 +0200
++++ pflogsumm  2005-04-09 12:55:33.246949650 +0200
+@@ -696,7 +696,7 @@
+           }
+       }
+       elsif((($addr, $relay, $delay, $status, $toRmdr) = $logRmdr =~
+-              /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), status=(\S+)(.*)$/o) >= 4)
++              /to=<([^>]*)>, (?:orig_to=<[^>]*>, )?relay=([^,]+), delay=([^,]+), (?:dsn=\d+\.\d+\.\d+, )?status=(\S+)(.*)$/o) >= 4)
+       {
+           if($opts{'m'} && $addr =~ /^(.*!)*([^!]+)!([^!@]+)@([^\.]+)$/o) {
index 9b0ae01cbf66dc1294e04cdf7009bfb14fdfe4f0..fcc7c275acdcdf8b3be48414d50212e8380606eb 100644 (file)
@@ -391,6 +391,22 @@ whenever you change the relay_recipients table. </p>
 <p> Execute the command "<b>postmap /etc/postfix/transport</b>"
 whenever you change the transport table. </p>
 
+<p> In some installations, there may be separate instances of Postfix
+processing inbound and outbound mail on a multi-homed firewall. The
+inbound Postfix instance has an SMTP server listening on the external
+firewall interface, and the outbound Postfix instance has an SMTP server
+listening on the internal interface. In such a configuration is it is
+tempting to configure $inet_interfaces in each instance with just the
+corresponding interface address. </p>
+
+<p> In most cases, using inet_interfaces in this way will not work,
+because as documented in the $inet_interfaces reference manual, the
+smtp(8) delivery agent will also use the specified interface address
+as the source address for outbound connections and will be unable to
+reach hosts on "the other side" of the firewall. The symptoms are that
+the firewall is unable to connect to hosts that are in fact up. See the
+inet_interfaces parameter documentation for suggested work-arounds.</p>
+
 <h2><a name="some_local">Delivering some but not all accounts
 locally</a></h2>
 
@@ -422,22 +438,6 @@ matches $inet_interfaces or $proxy_interfaces. </p>
 
 </ul>
 
-<p> In some installations, there may be separate instances of Postfix
-processing inbound and outbound mail on a multi-homed firewall. The
-inbound Postfix instance has an SMTP server listening on the external
-firewall interface, and the outbound Postfix instance has an SMTP server
-listening on the internal interface. In such a configuration is it is
-tempting to configure $inet_interfaces in each instance with just the
-corresponding interface address. </p>
-
-<p> In most cases, using inet_interfaces in this way will not work,
-because as documented in the $inet_interfaces reference manual, the
-smtp(8) delivery agent will also use the specified interface address
-as the source address for outbound connections and will be unable to
-reach hosts on "the other side" of the firewall. The symptoms are that
-the firewall is unable to connect to hosts that are in fact up. See the
-inet_interfaces parameter documentation for suggested work-arounds.</p>
-
 <h2><a name="intranet">Running Postfix behind a firewall</a></h2>
 
 <p> The simplest way to set up Postfix on a host behind a firewalled
index 281fd98ec2a306daf1e020fd08d220fbfe014be9..31512d80c453f7369a739e3be8bdd915e238ceed 100644 (file)
@@ -2508,6 +2508,9 @@ manager and by other long-lived Postfix daemon processes.
 The maximal time between attempts to deliver a deferred message.
 </p>
 
+<p> This parameter should be set to a value greater than or equal
+to $minimal_backoff_time. See also $queue_run_delay.  </p>
+
 <p>
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
@@ -2543,6 +2546,9 @@ This parameter also limits the time an unreachable destination is
 kept in the short-term, in-memory, destination status cache.
 </p>
 
+<p> It is recommended that this parameter be set greater than or
+equal to $queue_run_delay. See also $maximal_backoff_time.  </p>
+
 <p>
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
@@ -2982,6 +2988,9 @@ zero means there is no minimum required amount of free space.
 The time between deferred queue scans by the queue manager.
 </p>
 
+<p> It is recommended that this parameter be set less than or equal
+to $minimal_backoff_time. See also $maximal_backoff_time.  </p>
+
 <p>
 Time units: s (seconds), m (minutes), h (hours), d (days), w (weeks).
 The default time unit is s (seconds).
index 8a2a0b1f22b3aa336671ea43f4a2c8bf399aa92b..4cf5ef1b5b42b536a2d5e34a2e13f9ab9fc571f5 100644 (file)
@@ -11,7 +11,8 @@
 #      \fBpostmap -q - /etc/postfix/virtual <\fIinputfile\fR
 # DESCRIPTION
 #      The optional \fBvirtual\fR(5) alias table rewrites recipient
-#      addresses for all local, virtual and remote mail destinations.
+#      addresses for all local, all virtual, and all remote mail
+#      destinations.
 #      This is unlike the \fBaliases\fR(5) table which is used
 #      only for \fBlocal\fR(8) delivery.  Virtual aliasing is
 #      recursive, and is implemented by the Postfix \fBcleanup\fR(8)
index 5ff109e3a2c70f9d569e461d3684d06b29fd0357..f753a2067bbb8a09f072271b5690427ee8759ed4 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 1d89b537be9e5b9bce3bd51f63f752e995f6c32d..7cbf77aec597f17130b0cac42942fb364e93e3b2 100644 (file)
@@ -19,6 +19,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 4d7c4371c3db849a714822944ae4938fb5945930..43286c3d8618f9b5ce5dde974e3d70ef7fe47882 100644 (file)
@@ -33,6 +33,7 @@
 /*     themselves, and that depend on retry logic in their own client.
 /* STANDARDS
 /*     RFC 822 (ARPA Internet Text Messages)
+/*     RFC 1892 (Delivery Status Notifications)
 /*     RFC 1894 (Delivery Status Notifications)
 /*     RFC 2045 (Format of Internet Message Bodies)
 /* DIAGNOSTICS
index 66212f8e59c4eeeb7edaee9d0ecdec349bac4b60..e2454b97a9d50542d1b0a052c5edb32a588b2c09 100644 (file)
@@ -23,6 +23,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 720e4fe978c4ab0402870c99e40f0e3d28f986f4..b0e9aed6ff6e26bbda4ab503689dfac1a2873d03 100644 (file)
@@ -338,6 +338,7 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
     CLEANUP_STATE *state;
     int     flags;
     int     type = 0;
+    int     status;
 
     /*
      * Sanity check. This service takes no command-line arguments.
@@ -403,8 +404,9 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
     /*
      * Finish this message, and report the result status to the client.
      */
+    status = cleanup_flush(state);             /* in case state is modified */
     attr_print(src, ATTR_FLAG_NONE,
-              ATTR_TYPE_NUM, MAIL_ATTR_STATUS, cleanup_flush(state),
+              ATTR_TYPE_NUM, MAIL_ATTR_STATUS, status,
               ATTR_TYPE_STR, MAIL_ATTR_WHY, state->reason ?
               state->reason : "",
               ATTR_TYPE_END);
index cac4ce6a8934b3d08e38886849c642ba9c33c038..050cd57b7e4c329ef1bc5bf2822ebbaddad7c216 100644 (file)
 #include <bounce.h>
 #include <mail_params.h>
 #include <mail_stream.h>
-#include <hold_message.h>
+#include <mail_flow.h>
 #include <dsn_util.h>
 
 /* Application-specific. */
@@ -218,15 +218,22 @@ int     cleanup_flush(CLEANUP_STATE *state)
      */
     if (state->errs == 0 && (state->flags & CLEANUP_FLAG_DISCARD) == 0) {
        if ((state->flags & CLEANUP_FLAG_HOLD) != 0) {
-           if (hold_message(state->temp1, state->queue_name, state->queue_id) < 0)
-               msg_fatal("%s: problem putting message on hold: %m",
-                         state->queue_id);
+           mail_stream_ctl(state->handle,
+                           MAIL_STREAM_CTL_QUEUE, MAIL_QUEUE_HOLD,
+                           MAIL_STREAM_CTL_CLASS, 0,
+                           MAIL_STREAM_CTL_SERVICE, 0,
+                           MAIL_STREAM_CTL_END);
            junk = cleanup_path;
-           cleanup_path = mystrdup(vstring_str(state->temp1));
+           cleanup_path = mystrdup(VSTREAM_PATH(state->handle->stream));
            myfree(junk);
-           vstream_control(state->handle->stream,
-                           VSTREAM_CTL_PATH, cleanup_path,
-                           VSTREAM_CTL_END);
+
+           /*
+            * XXX: When delivering to a non-incoming queue, do not consume
+            * in_flow tokens. Unfortunately we can't move the code that
+            * consumes tokens until after the mail is received, because that
+            * would increase the risk of duplicate deliveries.
+            */
+           (void) mail_flow_put(1);
        }
        state->errs = mail_stream_finish(state->handle, (VSTRING *) 0);
     } else {
index f5d4c869e52744409c5a2723a7bd73b85dbb3315..738ee13263fe33fa26f59a3d2cb05ec85d09758c 100644 (file)
@@ -66,6 +66,7 @@
 /* System library. */
 
 #include <sys_defs.h>
+#include <signal.h>
 
 /* Utility library. */
 
@@ -197,8 +198,17 @@ int     cleanup_ext_prop_mask;
 
 void    cleanup_all(void)
 {
-    if (cleanup_path && REMOVE(cleanup_path))
-       msg_warn("cleanup_all: remove %s: %m", cleanup_path);
+
+    /*
+     * msg_fatal() is safe against calling itself recursively, but signals
+     * need extra safety.
+     */
+    if (signal(SIGTERM, SIG_IGN) != SIG_IGN) {
+       if (cleanup_path && REMOVE(cleanup_path)) {
+           msg_warn("cleanup_all: remove %s: %m", cleanup_path);
+           cleanup_path = 0;
+       }
+    }
 }
 
 /* cleanup_pre_jail - initialize before entering the chroot jail */
index 224cd90a7658af8d2f494cd7c5d230814649a093..24fb6bc6e2c59641df9029042734ef2f643dc468 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 9b4573abc5f4f475b3d76f0421eec16831596d48..8144875cf1a1afbd57010e30a21cc19e6579106a 100644 (file)
@@ -18,6 +18,8 @@ INC_DIR       = ../../include
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index a9ccd8e1eacd868addd352681d97c31dd6307100..59a02d3ca9fa51c18272f9f91df5986a46317223 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index a211280499a01258654082aa940e002b5232673a..26b877a0d56328a9a53bce5e3dd4f4cf5458003d 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 39d22cc35709a36fb6be528e91111c8f34a72202..022bd0746da0b588247f7caef17ea7f83757a058 100644 (file)
@@ -14,6 +14,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 
 all:   $(PROG)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index ec70f10a95a8328fa181c60476a12fabad348f84..bdb1632f402956ca2bf77f7e3f042a22c66669dc 100644 (file)
@@ -97,6 +97,8 @@ MAKES =
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 6edeea7ad857b046561993f69344c8b6f8737d6d..5c002888bd0eee62841c45fe345a5b53b311e583 100644 (file)
 /*     int     mail_stream_finish(info, why)
 /*     MAIL_STREAM *info;
 /*     VSTRING *why;
+/*
+/*     void    mail_stream_ctl(info, op, ...)
+/*     MAIL_STREAM *info;
+/*     int     op;
 /* DESCRIPTION
 /*     This module provides a generic interface to Postfix queue file
 /*     format messages to file, to Postfix server, or to external command.
@@ -44,7 +48,8 @@
 /*     mail_stream_file() opens a mail stream to a newly-created file and
 /*     arranges for trigger delivery at finish time. This call never fails.
 /*     But it may take forever. The mode argument specifies additional
-/*     file permissions that will be OR-ed in.
+/*     file permissions that will be OR-ed in when the file is finished.
+/*     While embryonic files have mode 0600, finished files have mode 0700.
 /*
 /*     mail_stream_command() opens a mail stream to external command,
 /*     and receives queue ID information from the command. The result
 /*     The result is any of the status codes defined in <cleanup_user.h>.
 /*     It is up to the caller to remove incomplete file objects.
 /*     The why argument can be a null pointer.
+/*
+/*     mail_stream_ctl() selectively overrides information that
+/*     was specified with mail_stream_file(); none of the attributes
+/*     are applicable for other mail stream types.  The arguments
+/*     are a list of (operation, value) pairs, terminated with
+/*     MAIL_STREAM_CTL_END.  The following lists the operation
+/*     codes and the types of the corresponding value arguments.
+/* .IP "MAIL_STREAM_CTL_QUEUE (char *)"
+/*     The argument specifies an alternate destination queue. The
+/*     queue file is moved to the specified queue before the call
+/*     returns. Failure to rename the queue file results in a fatal
+/*     error.
+/* .IP "MAIL_STREAM_CTL_CLASS (char *)"
+/*     The argument specifies an alternate trigger class.
+/* .IP "MAIL_STREAM_CTL_SERVICE (char *)"
+/*     The argument specifies an alternate trigger service.
+/* .IP "MAIL_STREAM_CTL_MODE (int)"
+/*     The argument specifies an altername file mode.
 /* LICENSE
 /* .ad
 /* .fi
 #include <errno.h>
 #include <utime.h>
 #include <string.h>
+#include <stdarg.h>
 
 /* Utility library. */
 
 #include <vstream.h>
 #include <stringops.h>
 #include <argv.h>
+#include <sane_fsops.h>
 
 /* Global library. */
 
 
 static VSTRING *id_buf;
 
-#define FREE_AND_WIPE(free, arg) { if (arg) free(arg); arg = 0; }
+#define FREE_AND_WIPE(free, arg) do { if (arg) free(arg); arg = 0; } while (0)
+
+#define STR(x) vstring_str(x)
 
 /* mail_stream_cleanup - clean up after success or failure */
 
@@ -126,7 +153,7 @@ void    mail_stream_cleanup(MAIL_STREAM *info)
 
 static int mail_stream_finish_file(MAIL_STREAM *info, VSTRING *unused_why)
 {
-    int     status = 0;
+    int     status = CLEANUP_STAT_OK;
     static char wakeup[] = {TRIGGER_REQ_WAKEUP};
     struct stat st;
     time_t  now;
@@ -135,6 +162,7 @@ static int mail_stream_finish_file(MAIL_STREAM *info, VSTRING *unused_why)
     static int incoming_fs_clock_ok = 0;
     static int incoming_clock_warned = 0;
     int     check_incoming_fs_clock;
+    int     err;
 
     /*
      * Make sure the message makes it to file. Set the execute bit when no
@@ -199,17 +227,20 @@ static int mail_stream_finish_file(MAIL_STREAM *info, VSTRING *unused_why)
      * remote file system is not recommended, if only for performance
      * reasons.
      */
-    if (info->close(info->stream))
-       status = (errno == EFBIG ? CLEANUP_STAT_SIZE : CLEANUP_STAT_WRITE);
+    err = info->close(info->stream);
     info->stream = 0;
+    if (status == CLEANUP_STAT_OK && err != 0)
+       status = (errno == EFBIG ? CLEANUP_STAT_SIZE : CLEANUP_STAT_WRITE);
 
     /*
      * Work around file system clocks that are ahead of local time.
      */
     if (path_to_reset != 0) {
-       tbuf.actime = tbuf.modtime = now;
-       if (utime(path_to_reset, &tbuf) < 0 && errno != ENOENT)
-           msg_fatal("%s: update file time stamps: %m", info->id);
+       if (status == CLEANUP_STAT_OK) {
+           tbuf.actime = tbuf.modtime = now;
+           if (utime(path_to_reset, &tbuf) < 0 && errno != ENOENT)
+               msg_fatal("%s: update file time stamps: %m", info->id);
+       }
        myfree(path_to_reset);
     }
 
@@ -217,7 +248,7 @@ static int mail_stream_finish_file(MAIL_STREAM *info, VSTRING *unused_why)
      * When all is well, notify the next service that a new message has been
      * queued.
      */
-    if (status == CLEANUP_STAT_OK)
+    if (status == CLEANUP_STAT_OK && info->class && info->service)
        mail_trigger(info->class, info->service, wakeup, sizeof(wakeup));
 
     /*
@@ -363,3 +394,100 @@ MAIL_STREAM *mail_stream_command(const char *command)
        return (info);
     }
 }
+
+/* mail_stream_ctl - update file-based mail stream properties */
+
+void    mail_stream_ctl(MAIL_STREAM *info, int op,...)
+{
+    char   *myname = "mail_stream_ctl";
+    va_list ap;
+    char   *new_queue = 0;
+    char   *string_value;
+
+    /*
+     * Sanity check. None of the attributes below are applicable unless the
+     * target is a file-based stream.
+     */
+    if (info->finish != mail_stream_finish_file)
+       msg_panic("%s: attempt to update non-file stream %s",
+                 myname, info->id);
+
+    for (va_start(ap, op); op != MAIL_STREAM_CTL_END; op = va_arg(ap, int)) {
+
+       switch (op) {
+
+           /*
+            * Change the queue directory. We do this at the end of this
+            * call.
+            */
+       case MAIL_STREAM_CTL_QUEUE:
+           if ((new_queue = va_arg(ap, char *)) == 0)
+               msg_panic("%s: NULL queue",
+                         myname);
+           break;
+
+           /*
+            * Change the service that needs to be notified.
+            */
+       case MAIL_STREAM_CTL_CLASS:
+           FREE_AND_WIPE(myfree, info->class);
+           if ((string_value = va_arg(ap, char *)) != 0)
+               info->class = mystrdup(string_value);
+           break;
+
+       case MAIL_STREAM_CTL_SERVICE:
+           FREE_AND_WIPE(myfree, info->service);
+           if ((string_value = va_arg(ap, char *)) != 0)
+               info->service = mystrdup(string_value);
+           break;
+
+           /*
+            * Change the (finished) file access mode.
+            */
+       case MAIL_STREAM_CTL_MODE:
+           info->mode = va_arg(ap, int);
+           break;
+
+       default:
+           msg_panic("%s: bad op code %d", myname, op);
+       }
+    }
+
+    /*
+     * Rename the queue file after allocating memory for new information, so
+     * that the caller can still remove an embryonic file when memory
+     * allocation fails (there is no risk of deleting the wrong file).
+     * 
+     * Wietse opposed the idea to update run-time error handler information
+     * here, because this module wasn't designed to defend against internal
+     * concurrency issues with error handlers that attempt to follow dangling
+     * pointers.
+     * 
+     * This code duplicates mail_queue_rename(), except that we need the new
+     * path to update the stream pathname.
+     */
+    if (new_queue != 0 && strcmp(info->queue, new_queue) != 0) {
+       char   *saved_queue = info->queue;
+       char   *saved_path = mystrdup(VSTREAM_PATH(info->stream));
+       VSTRING *new_path = vstring_alloc(100);
+
+       (void) mail_queue_path(new_path, new_queue, info->id);
+       info->queue = mystrdup(new_queue);
+       vstream_control(info->stream, VSTREAM_CTL_PATH, STR(new_path),
+                       VSTREAM_CTL_END);
+
+       if (sane_rename(saved_path, STR(new_path)) == 0
+           || (mail_queue_mkdirs(STR(new_path)) == 0
+               && sane_rename(saved_path, STR(new_path)) == 0)) {
+           if (msg_verbose)
+               msg_info("%s: placed in %s queue", info->id, info->queue);
+       } else {
+           msg_fatal("%s: move to %s queue failed: %m", info->id,
+                     info->queue);
+       }
+
+       myfree(saved_path);
+       myfree(saved_queue);
+       vstring_free(new_path);
+    }
+}
index a1e64f13ec7df2b0eb8480f189c67f5cdfba0e98..455b65011b4d37e0361e66625d0990201317f3b8 100644 (file)
@@ -36,11 +36,18 @@ struct MAIL_STREAM {
     int     mode;                      /* additional permissions */
 };
 
+#define MAIL_STREAM_CTL_END    0       /* Terminator */
+#define MAIL_STREAM_CTL_QUEUE  1       /* Change queue */
+#define MAIL_STREAM_CTL_CLASS  2       /* Change notification class */
+#define MAIL_STREAM_CTL_SERVICE        3       /* Change notification service */
+#define MAIL_STREAM_CTL_MODE   4       /* Change final queue file mode */
+
 extern MAIL_STREAM *mail_stream_file(const char *, const char *, const char *, int);
 extern MAIL_STREAM *mail_stream_service(const char *, const char *);
 extern MAIL_STREAM *mail_stream_command(const char *);
 extern void mail_stream_cleanup(MAIL_STREAM *);
 extern int mail_stream_finish(MAIL_STREAM *, VSTRING *);
+extern void mail_stream_ctl(MAIL_STREAM *, int, ...);
 
 
 /* LICENSE
index f2dea7da0de16bbc3dbecb7ce9537a1ef2c9d156..847f470a319db715df5d9b05490084b5f06c0175 100644 (file)
@@ -20,7 +20,7 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050404"
+#define MAIL_RELEASE_DATE      "20050413"
 #define MAIL_VERSION_NUMBER    "2.3"
 
 #define VAR_MAIL_VERSION       "mail_version"
index 4208feb0d1bb8d15c30fa59ad5c164e96e19c515..13c127deacfd625b28d92e5cc8aa62de51b6233d 100644 (file)
@@ -19,6 +19,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libdns.a ../../lib/
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index d2a790f0dcafda1a83d18cd76b270974f40cf5ba..ed5d8692d5cf5239d4580b889db05a391eef04d9 100644 (file)
@@ -292,6 +292,15 @@ int     lmtp_sasl_passwd_lookup(LMTP_STATE *state)
 
 void    lmtp_sasl_initialize(void)
 {
+
+    /*
+     * Global callbacks. These have no per-session context.
+     */
+    static sasl_callback_t callbacks[] = {
+       {SASL_CB_LOG, &lmtp_sasl_log, 0},
+       {SASL_CB_LIST_END, 0, 0}
+    };
+
 #if SASL_VERSION_MAJOR >= 2 && (SASL_VERSION_MINOR >= 2 \
     || (SASL_VERSION_MINOR == 1 && SASL_VERSION_STEP >= 19))
     int     sasl_major;
@@ -305,23 +314,18 @@ void    lmtp_sasl_initialize(void)
                      &sasl_major, &sasl_minor,
                      &sasl_step, (int *) 0);
     if (sasl_major != SASL_VERSION_MAJOR
+#if 0
        || sasl_minor != SASL_VERSION_MINOR
-       || sasl_step != SASL_VERSION_STEP)
+       || sasl_step != SASL_VERSION_STEP
+#endif
+       )
        msg_fatal("incorrect SASL library version. "
-                 "Postfix was built for version %d.%d.%d, "
+                 "Postfix was built with include files from version %d.%d.%d, "
                  "but the run-time library version is %d.%d.%d",
                  SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP,
                  sasl_major, sasl_minor, sasl_step);
 #endif
 
-    /*
-     * Global callbacks. These have no per-session context.
-     */
-    static sasl_callback_t callbacks[] = {
-       {SASL_CB_LOG, &lmtp_sasl_log, 0},
-       {SASL_CB_LIST_END, 0, 0}
-    };
-
     /*
      * Sanity check.
      */
index ad00531bc2ebd751ee390164719607b0e820e374..921e9ad9b2648dc3e5e8e4828baa16ef3c86aa91 100644 (file)
@@ -21,6 +21,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index a6ae05998bff4a48ac403bdc3e10684f3a5b6507..36cfa45cda2971c4760aa6405b51624f4f28a8c7 100644 (file)
@@ -24,6 +24,8 @@ BIN_DIR       = ../../libexec
 
 all:   $(PROG) $(LIB)
 
+$(OBJS) $(LIB_OBJ): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 26ed78b795f798234d0d7dca34e1ee146d3851d5..4016c3563de97526b2d1de7bfa4f4d27c0710e05 100644 (file)
@@ -19,6 +19,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index b5d53ee565aae0c0349dc511bacb3b29556098dc..3a47b32552a9e39a4c7cb4e4c98dd50ca6a4fc3d 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index a3b622ffe796d66d974e09f7dc8c69730ff40c4b..0aaef70e6df3f68f2d4381dea8acb1b504d9a510 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 84029ab7099851d1454ec135bf249fd3ebd6e7c2..b898c0b400a7e1fd7202bcadf232eebb1be6004a 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 39821d87c57d01b9309f52658e2bfa9996359287..7ed56122cc13abc08b2497f9183d124d9cc1f820 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index ede96260c55d38454cb9207ab36e6b1d72351e74..caf534f28cbed57b12206ef75429ae1aa16e65da 100644 (file)
@@ -25,6 +25,8 @@ $(PROG): $(OBJS) $(LIBS)
         echo "#"; \
         ./$(PROG) -d) |egrep -v '^(myhostname|mydomain|mynetworks) ' >$@
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 3b0b2e83aed24ec4c9af3f002243edab1b5609c7..777b421d06ee858fe0accb99942b026a7d49f8c2 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index d5cf5fa0a040470ba117b82c7c997c8ee6449591..ba12f7187f5d2dc34906f33165d4f7eb2e2a915d 100644 (file)
@@ -175,13 +175,25 @@ static void postdrop_cleanup(void)
      * 
      * msg_xxx() does not allocate memory, so it is safe as long as the signal
      * handler can't be invoked recursively.
+     * 
+     * Assume atomic signal() updates, even when emulated with sigaction(). We
+     * use the in-kernel SIGINT handler address as an atomic variable to
+     * prevent nested postdrop_sig() calls. For this reason, main() must
+     * configure postdrop_sig() as SIGINT handler before other signal
+     * handlers are allowed to invoke postdrop_sig().
      */
-    if (postdrop_path) {
-       if (remove(postdrop_path))
-           msg_warn("uid=%ld: remove %s: %m", (long) getuid(), postdrop_path);
-       else if (msg_verbose)
-           msg_info("remove %s", postdrop_path);
-       postdrop_path = 0;
+    if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
+       (void) signal(SIGQUIT, SIG_IGN);
+       (void) signal(SIGTERM, SIG_IGN);
+       (void) signal(SIGHUP, SIG_IGN);
+       if (postdrop_path) {
+           if (remove(postdrop_path))
+               msg_warn("uid=%ld: remove %s: %m",
+                        (long) getuid(), postdrop_path);
+           else if (msg_verbose)
+               msg_info("remove %s", postdrop_path);
+           postdrop_path = 0;
+       }
     }
 }
 
@@ -189,22 +201,9 @@ static void postdrop_cleanup(void)
 
 static void postdrop_sig(int sig)
 {
-
-    /*
-     * Assume atomic signal() updates, even when emulated with sigaction().
-     * We use the in-kernel SIGINT handler address as an atomic variable to
-     * prevent nested postdrop_sig() calls. For this reason, main() must
-     * configure postdrop_sig() as SIGINT handler before other signal
-     * handlers are allowed to invoke postdrop_sig().
-     */
-    if (signal(SIGINT, SIG_IGN) != SIG_IGN) {
-       (void)signal(SIGQUIT, SIG_IGN);
-       (void)signal(SIGTERM, SIG_IGN);
-       (void)signal(SIGHUP, SIG_IGN);
-       postdrop_cleanup();
-       /* Future proofing. If you need exit() here then you broke Postfix. */
-       _exit(sig);
-    }
+    postdrop_cleanup();
+    /* Future proofing. If you need exit() here then you broke Postfix. */
+    _exit(sig);
 }
 
 /* main - the main program */
@@ -228,6 +227,7 @@ int     main(int argc, char **argv)
     char   *attr_name;
     char   *attr_value;
     const char *errstr;
+    char   *junk;
 
     /*
      * Be consistent with file permissions.
@@ -428,8 +428,9 @@ int     main(int argc, char **argv)
      * will not be deleted after we have taken responsibility for delivery.
      */
     if (postdrop_path) {
-       myfree(postdrop_path);
+       junk = postdrop_path;
        postdrop_path = 0;
+       myfree(junk);
     }
 
     /*
index 50415d18b361c87bf44b4b0b56d523242ba94e65..41bfe840e17c4491a22e5de2aa74a494015a9d81 100644 (file)
@@ -16,6 +16,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index afe3d565fcf9304ebd13c9c1e6aae569c1679d17..e4401db49bc5f3d70badca620602870355c75eb9 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index c40f41da9e157b07b99f658b76ff4336521a57d5..872b6f295a53af1e14ded52f74d100a9e12cb2f8 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index d8f03eec00e666dc9a5d5e8e4c70df0cb7e28df2..3457c758a03126f3da63156bbed291b0f9a31acf 100644 (file)
@@ -16,6 +16,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 13b7cf7f371df15865b3bc5fdf11187bbccc4517..5fa2bec2f1ab7fb0486118970ffcf3a2ef5a3a95 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index b4b9f6a4d02497fe21520774e98e81a13cc2aad6..be70e25f7b43c1806f497222854c436a4eacd922 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 62075eac60b7ae35edcd56ddb32357f98d8c7c40..73838ac29dd73fd04c09d4737b904ee8517f79bd 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index bc78e18ff092d55fd8a69b4aa6b5faca19f80e7b..2fefa3e1cf7bfe692517953945947713b2c4c100 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 6e7f130634b859c0bfd902c418ccfe97a63a3a9d..c38bd99ee8938b70d312ccfbe0ebb320973b0342 100644 (file)
@@ -21,6 +21,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 4b83fa5e91b0d07b13c5c667e5d2e6feb3e4e441..aaf91d5e30223ffc304a9a9a1e16385b2451fa84 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libdns.a ../../lib/
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
@@ -27,17 +29,6 @@ update: ../../libexec/$(PROG)
 ../../libexec/$(PROG): $(PROG)
        cp $(PROG) ../../libexec
 
-SMTPD_CHECK_OBJ = qmqpd_state.o qmqpd_peer.o
-
-qmqpd_token: qmqpd_token.c $(LIBS)
-       $(CC) $(CFLAGS) -DTEST -o $@ $@.c $(LIBS) $(SYSLIBS)
-
-qmqpd_check: qmqpd_check.c $(SMTPD_CHECK_OBJ) $(LIBS)
-       mv $@.o junk
-       $(CC) $(CFLAGS) -DTEST -o $@ qmqpd_check.c $(SMTPD_CHECK_OBJ) \
-               $(LIBS) $(SYSLIBS)
-       mv junk $@.o
-
 printfck: $(OBJS) $(PROG)
        rm -rf printfck
        mkdir printfck
index 3274b4cbdb9cee4ea9d29c3d01a40253450ef8ec..e9ccb35c020880a459b04ab9c920d5ce28a29130 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index b084ba65e7b13280b738fa0a3a131c93bbf9299a..90dcae6477cd25e2bf8725d2271746f031a59986 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 4d7c8cd934c9571276b7fdb1e49a7447fc9ce34f..3f5b0821a34e6b0559f4ca75365f6d6236196f68 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 2e464af0aa8ea8084d6593dbeb0248b34ebe8940..e3a0ec3b22408300899420234add0cb3d089fb1a 100644 (file)
@@ -20,6 +20,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index e9303db82d21c93e58174ffc7317afb948d2af95..ca9b6203bf159232481b0e9e974db86c4aa5bf48 100644 (file)
@@ -321,6 +321,15 @@ int     smtp_sasl_passwd_lookup(SMTP_SESSION *session)
 
 void    smtp_sasl_initialize(void)
 {
+
+    /*
+     * Global callbacks. These have no per-session context.
+     */
+    static sasl_callback_t callbacks[] = {
+       {SASL_CB_LOG, &smtp_sasl_log, 0},
+       {SASL_CB_LIST_END, 0, 0}
+    };
+
 #if SASL_VERSION_MAJOR >= 2 && (SASL_VERSION_MINOR >= 2 \
     || (SASL_VERSION_MINOR == 1 && SASL_VERSION_STEP >= 19))
     int     sasl_major;
@@ -334,23 +343,18 @@ void    smtp_sasl_initialize(void)
                      &sasl_major, &sasl_minor,
                      &sasl_step, (int *) 0);
     if (sasl_major != SASL_VERSION_MAJOR
+#if 0
        || sasl_minor != SASL_VERSION_MINOR
-       || sasl_step != SASL_VERSION_STEP)
+       || sasl_step != SASL_VERSION_STEP
+#endif
+       )
        msg_fatal("incorrect SASL library version. "
-                 "Postfix was built for version %d.%d.%d, "
+                 "Postfix was built with include files from version %d.%d.%d, "
                  "but the run-time library version is %d.%d.%d",
                  SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP,
                  sasl_major, sasl_minor, sasl_step);
 #endif
 
-    /*
-     * Global callbacks. These have no per-session context.
-     */
-    static sasl_callback_t callbacks[] = {
-       {SASL_CB_LOG, &smtp_sasl_log, 0},
-       {SASL_CB_LIST_END, 0, 0}
-    };
-
     /*
      * Sanity check.
      */
@@ -433,7 +437,7 @@ void    smtp_sasl_start(SMTP_SESSION *session, const char *sasl_opts_name,
      */
     memset(&sec_props, 0L, sizeof(sec_props));
     sec_props.min_ssf = 0;
-    sec_props.max_ssf = 1;                     /* don't allow real SASL
+    sec_props.max_ssf = 0;                     /* don't allow real SASL
                                                 * security layer */
     sec_props.security_flags = name_mask(sasl_opts_name, smtp_sasl_sec_mask,
                                         sasl_opts_val);
index b265a4474dcf6bed528a21dd986abcaf3889ce1c..4badd37ca2331bc3f358bfe75cbb892ac4643cd3 100644 (file)
@@ -21,6 +21,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libdns.a \
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 5c68e4b0b808959ad2477ae79ba263c703506e3e..610b3b4c9249a950f5df64749bc34a00e0157306 100644 (file)
@@ -1493,7 +1493,7 @@ static int mail_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     if (argc < 3
        || strcasecmp(argv[1].strval, "from:") != 0) {
        state->error_mask |= MAIL_ERROR_PROTOCOL;
-       smtpd_chat_reply(state, "501 5.5.4 Syntax: MAIL FROM: <address>");
+       smtpd_chat_reply(state, "501 5.5.4 Syntax: MAIL FROM:<address>");
        return (-1);
     }
 
@@ -1703,7 +1703,7 @@ static int rcpt_cmd(SMTPD_STATE *state, int argc, SMTPD_TOKEN *argv)
     if (argc < 3
        || strcasecmp(argv[1].strval, "to:") != 0) {
        state->error_mask |= MAIL_ERROR_PROTOCOL;
-       smtpd_chat_reply(state, "501 5.5.4 Syntax: RCPT TO: <address>");
+       smtpd_chat_reply(state, "501 5.5.4 Syntax: RCPT TO:<address>");
        return (-1);
     }
 
index f89777d908158f06bfe9348332c435aa88b9a680..1869b3c72ea6947cdf02c43ca9ab19eba5e95e90 100644 (file)
@@ -221,10 +221,13 @@ void    smtpd_sasl_initialize(void)
                      &sasl_major, &sasl_minor,
                      &sasl_step, (int *) 0);
     if (sasl_major != SASL_VERSION_MAJOR
+#if 0
        || sasl_minor != SASL_VERSION_MINOR
-       || sasl_step != SASL_VERSION_STEP)
+       || sasl_step != SASL_VERSION_STEP
+#endif
+       )
        msg_fatal("incorrect SASL library version. "
-                 "Postfix was built for version %d.%d.%d, "
+                 "Postfix was built with include files from version %d.%d.%d, "
                  "but the run-time library version is %d.%d.%d",
                  SASL_VERSION_MAJOR, SASL_VERSION_MINOR, SASL_VERSION_STEP,
                  sasl_major, sasl_minor, sasl_step);
@@ -310,7 +313,7 @@ void    smtpd_sasl_connect(SMTPD_STATE *state, const char *sasl_opts_name,
      */
     memset(&sec_props, 0, sizeof(sec_props));
     sec_props.min_ssf = 0;
-    sec_props.max_ssf = 1;                     /* don't allow real SASL
+    sec_props.max_ssf = 0;                     /* don't allow real SASL
                                                 * security layer */
     sec_props.security_flags = name_mask(sasl_opts_name, smtpd_sasl_mask,
                                         sasl_opts_val);
index 9f8d9683adc43b17692020ddd6905fe9bc3ff626..f6b35abf5e2f83a53d469942a933648955d5c6ae 100644 (file)
@@ -14,6 +14,8 @@ LIBS  = ../../lib/libglobal.a ../../lib/libutil.a
 
 all:   $(PROG)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index e2859cde48f50feaa2f21d080d86369f4192322b..f79a8f265d19714a2ab3ceb602f73f8e49ddd234 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 113b30504663581a0189384ac11d528ad124df31..442de65f0802276d02d9b80a409ae92df9c7cae3 100644 (file)
@@ -24,6 +24,8 @@ MAKES =
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index e3333d3eef67ba1272620fc0a080a63e228a362e..da08f3cd661c53c56a09c4debba7eea593592506 100644 (file)
@@ -16,6 +16,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libtls.a ../../lib/libglobal.a \
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (set -e; echo "# DO NOT EDIT"; $(OPTS) $(SHELL) ../../makedefs && cat $?) >$@
 
index ec1c77061b12c7a12725ba67c4d05b667042b16e..4af1c5beba629399a8e0cb504e8385fa6a15af20 100644 (file)
@@ -20,6 +20,8 @@ all:  $(PROG) $(LIB)
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 17917a2c2c49f61871cf1ff5e890e3b11f66df36..1548a1ade7d51b973a6c42f57279bbad8742332f 100644 (file)
@@ -109,6 +109,8 @@ INC_DIR     = ../../include
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index a66004d44a6af5ed915a7cdd7df6189b444212c6..1c596ffea632c4e52a466b70b5daf98f2ce5077a 100644 (file)
@@ -189,6 +189,15 @@ static DICT *dict_cdbq_open(const char *path, int dict_flags)
     dict_cdbq->dict.mtime = st.st_mtime;
     close_on_exec(fd, CLOSE_ON_EXEC);
 
+    /*
+     * Warn if the source file is newer than the indexed file, except when
+     * the source file changed only seconds ago.
+     */
+    if (stat(path, &st) == 0
+       && st.st_mtime > dict_cdbq->dict.mtime
+       && st.st_mtime < time((time_t *)0) - 100)
+       msg_warn("database %s is older than source file %s", cdb_path, path);
+
     /*
      * If undecided about appending a null byte to key and value, choose to
      * try both in query mode.
index 9676882ef92606d5bc69c23305d0d37d7ce971ab..32c8cb778f1c123753f0670d6f2148042281686f 100644 (file)
@@ -1292,6 +1292,15 @@ typedef int pid_t;
   */
 #ifndef SET_H_ERRNO
 #define SET_H_ERRNO(err) (h_errno = (err))
+#endif
+
+ /*
+  * Don't mix socket message send/receive calls with socket stream read/write
+  * calls. The fact that you can get away with it only on some stacks implies
+  * that there is no long-term guarantee.
+  */
+#ifndef CAN_WRITE_BEFORE_SENDING_FD
+#define CANT_WRITE_BEFORE_SENDING_FD
 #endif
 
  /*
index 73ee73f4a343d31937a6edf70b385f7d4d9989a9..e4f231e1d72d99481a2d8abe4a8c0f58acda58e1 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG): $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 41a6c38dcd955faea5a6729678a5ee20e5ed1602..9a4ed2edbeb26d854f6ead761c82e2ad4a8a30c3 100644 (file)
@@ -15,6 +15,8 @@ LIBS  = ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
 $(PROG):       $(OBJS) $(LIBS)
        $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@