]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20010329
authorWietse Venema <wietse@porcupine.org>
Thu, 29 Mar 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:13 +0000 (06:27 +0000)
26 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/MYSQL_README
postfix/RELEASE_NOTES
postfix/SASL_README
postfix/conf/sample-misc.cf
postfix/examples/chroot-setup/HPUX10
postfix/html/uce.html
postfix/src/cleanup/cleanup.c
postfix/src/flush/Makefile.in
postfix/src/global/mail_params.c
postfix/src/global/mail_version.h
postfix/src/global/tok822_parse.c
postfix/src/global/tok822_parse.in
postfix/src/global/tok822_parse.ref
postfix/src/postkick/Makefile.in
postfix/src/postkick/postkick.c
postfix/src/smtpstone/smtp-source.c
postfix/src/util/Makefile.in
postfix/src/util/dict_ldap.c
postfix/src/util/events.c
postfix/src/util/events.h
postfix/src/util/inet_trigger.c
postfix/src/util/stream_trigger.c
postfix/src/util/sys_defs.h
postfix/src/util/unix_trigger.c

index e50e741feab19209fd712a81ec8c350957b8ddbf..a3a8eb3ae65aba76133b9fb53f59f4a60d6c831a 100644 (file)
@@ -4973,6 +4973,16 @@ Apologies for any names omitted.
        with the introduction of the asynchronous bounce client.
        Patrik Rak.
 
+20010313
+
+       Bugfix: the RFC 822 untokenizer quoted newlines inside
+       comments. File: global/tok822_parse.c.
+
+20010316
+
+       Cleanup: removed an extraneous warning when a queue file
+       write error happened.
+
 20010321
 
        Workaround: LMTP connection caching never worked for
@@ -4982,14 +4992,42 @@ Apologies for any names omitted.
 20010322
 
        Portability: Solaris <2.6 does not have srandom() and
-       random() in libc. File: util/rand_sleep.c. It does not
-       have to be cryptographically strong.
+       random() in libc. File: util/rand_sleep.c. It does not have
+       to be cryptographically strong.
 
        Bugfix: the fast ETRN flush server could not handle [ipaddr]
-       or domain names with one-character hostname part. It should
-       be OK now. File: flush/flush.c.
+       or domain names with one-character hostname part.  This
+       fix changes the destination to logfile name mapping, so
+       that you need to populate the new files with "sendmail -q".
+       The old files go away automatically. File:  flush/flush.c.
 
 20010327
 
        Speed up mailq (sendmail -bp) display by flushing output
        after each file.  File: showq/showq.c.
+
+       Portability: missing string.h includes, %p wants (void *),
+       Lamont Jones, HP.
+
+20010328
+
+       Bugfix: swapped logic caused cleanup to stall when the
+       queue file size exceeded the file size limit by less than
+       one the VSTREAM buffer size, so that the "file too big"
+       was detected after flushing the last queue file record.
+       File: cleanup/cleanup.c.
+
+20010329
+
+       Portability: workaround for missing prototype problem in
+       dict_ldap.c. This module should move to the global directory,
+       because it depends on Postfix main.cf parameter information.
+
+       Workaround: after sending a trigger message over a socket,
+       do not immediately close the client side, but close it from
+       a background thread that waits until the server closes the
+       socket first. This avoids trouble with socket implementations
+       that destroy a socket when the client closes a socket
+       before the server has received the client's data.  Files:
+       util/{inet,unix,stream}_trigger.c, util/events.c,
+       master/master_trigger.c, postkick/postkick.c.
index a12ae54513ec61a0d543e227791af964c879462e..427a4528ce8c549b1132753d5b5096e062690dcf 100644 (file)
@@ -251,6 +251,9 @@ and watch your syslog file for any error messages.
 
     % egrep '(reject|warning|error|fatal|panic):' /some/log/file
 
+Typical logfile names are: /var/log/maillog or /var/log/syslog.
+See /etc/syslog.conf for actual logfile names.
+
 When it is run for the first time, the Postfix startup shell script
 will create a bunch of subdirectories below the Postfix spool
 directory.
@@ -294,6 +297,9 @@ and watch your syslog file for any error messages.
 
     % egrep '(reject|warning|error|fatal|panic):' /some/log/file
 
+Typical logfile names are: /var/log/maillog or /var/log/syslog.
+See /etc/syslog.conf for actual logfile names.
+
 When it is run for the first time, the Postfix startup shell script
 will create a bunch of subdirectories below the Postfix spool
 directory.
@@ -329,6 +335,9 @@ and watch the syslog file for any complaints from the mail system.
 
     % egrep '(reject|warning|error|fatal|panic):' /some/log/file
 
+Typical logfile names are: /var/log/maillog or /var/log/syslog.
+See /etc/syslog.conf for actual logfile names.
+
 When it is run for the first time, the Postfix startup shell script
 will create a bunch of subdirectories below the Postfix spool
 directory.
@@ -515,5 +524,11 @@ idea to run every night before the syslog files are rotated:
     # postfix check
     # egrep '(reject|warning|error|fatal|panic):' /some/log/file
 
+Typical logfile names are: /var/log/maillog or /var/log/syslog.
+See /etc/syslog.conf for actual logfile names.
+
+The first line (postfix check) causes Postfix to report file
+permission/ownership discrepancies.
+
 The second line looks for problem reports from the mail software,
 and reports how effective the anti-relay and anti-UCE blocks are.
index e5c0c27f8a426238fb1f30f00d53247f0ca0cf33..faecf80a26313268536abb2df5a6bf4e35827525 100644 (file)
@@ -3,7 +3,8 @@
 We've written code to add a mysql map type.  It utilizes the mysql
 client library, which can be obtained from:
 
-                  http://www.tcx.se/download.html
+       http://www.mysql.com/downloads/
+       http://sourceforge.net/projects/mysql/
 
 In order to build postfix with mysql map support, you will need to add 
 -DHAS_MYSQL and -I for the directory containing the mysql headers, and 
index 1372a752f0f0bb9e86da6e260d333fc84cd887b4..ab932d0e5ab2ba80c5364e2005556220e3362fad 100644 (file)
@@ -1,7 +1,28 @@
-Release 20010228 differs from snapshot 20010228 in that the virtual
-delivery agent and nqmgr queue manager are left out. That software
-will become part of the official release when it has not changed
-in a while.
+Incompatible changes with snapshot-20010329
+===========================================
+
+This release changes the names of the "fast ETRN" logfiles with
+delayed mail per destination. These files are maintained by the
+Postfix "fast flush" daemon. The old scheme failed with addresses
+of the form user@[ip.address] and user@a.domain.name.  In order to
+populate the new "fast ETRN" logfiles, execute the command "sendmail
+-q".  The old "fast ETRN" logfiles go away by themselves (default:
+after 7 days).
+
+Major changes with snapshot-20010329
+====================================
+
+Better support for sites that run multiple Postfix instances on
+one machine. Each instance can now be recognized by its logging
+(default:  "syslog_name = postfix"). File: global/mail_task.c.
+
+Workaround for nqmgr panic due to a race condition that was introduced
+with the asynchronous bounce client.
+
+Workaround for hostile socket implementations that discard data
+when a client closes a socket before the server reads the client
+data.  Postfix now closes the client socket in a background thread
+that waits until the server closes the socket first.
 
 Incompatible changes with snapshot-20010225
 ===========================================
index 6567ab4e0cef5f8488953b1ee6c70563853bbd45..801d4f9afa5eeb43221bee1cc15a674871f5a4d4 100644 (file)
@@ -111,7 +111,16 @@ In order to allow mail relaying by authenticated clients:
            permit_mynetworks permit_sasl_authenticated ...
 
 In /usr/local/lib/sasl/smtpd.conf you need to specify how the server
-should validate client passwords. For example:
+should validate client passwords. 
+
+In order to authenticate against the UNIX password database, try:
+
+    /usr/local/lib/sasl/smtpd.conf:
+       pwcheck_method: pwcheck
+
+The pwcheck daemon is contained in the cyrus-sasl source tarball.
+
+In order to authenticate against SASL's own password database:
 
     /usr/local/lib/sasl/smtpd.conf:
        pwcheck_method:  sasldb
@@ -129,20 +138,11 @@ IMPORTANT: To get sasldb running, make sure that you set the SASL domain
 
 EXAMPLE: saslpasswd -c -u `postconf -h myhostname` exampleuser
 
-Instead of the SASL-specific password file you can configure the
-Postfix SMTP server to validate client passwords against the UNIX
-shadow password file:
-
-    /usr/local/lib/sasl/smtpd.conf:
-       pwcheck_method:  shadow
-
-However this requires that Postfix has read access to the UNIX shadow
-password file, which is normally readable only by root.  Shadow
-password support has been found to work for Solaris 2.7 and RedHat
-6.1 but not with FreeBSD 3.4.
+To run software chrooted with SASL support is an interesting
+exercise.  It probably is not worth the trouble.
 
-To run software chrooted with SASL support is an interesting exercise.
-This is one of the many problems with the present SASL support.
+Testing SASL authentication in the Postfix SMTP server
+======================================================
 
 To test the whole mess, connect to the SMTP server, and you should
 be able to have a conversation like this:
index 3e0d32d4b6ef4c2ac6addd3279a8dae6051cb614..9f395f898b2e916161e616e6c7aa9d8597070896 100644 (file)
@@ -361,8 +361,8 @@ relocated_maps =
 syslog_facility = mail
 
 # The syslog_name parameter specifies the mail system name that is
-# prepended to the process name in syslog records headers, so that
-# "smtpd" becomes "postfix/smtpd".
+# prepended to the process name in syslog records, so that "smtpd"
+# becomes, for example, "postfix/smtpd".
 #
 # Beware: a non-default syslog_name setting takes effect only
 # after process initialization. Some initialization errors will be
index ca54c658ba3f122481efbe989be828c313496e22..c8869446b8863c53d3f6e2e3448652e2bbace442 100644 (file)
@@ -19,3 +19,5 @@ cd ${POSTFIX_DIR}
 
 mkdir etc 
 cp /etc/services etc
+mkdir -p usr/lib
+cp /usr/lib/tztab usr/lib
index 6333a381cfa95718a7bb31d752c56bd033a5a430..b756a43be30a4e51c748c542f424e88e746f64e8 100644 (file)
@@ -109,8 +109,8 @@ is allowed in message headers.
 <dt>Syntax:
 
 <dd>Specify a list of zero or more lookup tables. Whenever a header
-matches a table, a REJECT result means reject the message, and a 
-SKIP result means delete the header from the message.
+matches a table, a REJECT result means reject the message, and an
+IGNORE result means delete the header from the message.
 
 <p>
 
index 4777063ced48ed9c0189b9e37dda1a58aebfdf2f..70476aa2ec28d71309bda8fe32822743cc88a559 100644 (file)
@@ -215,8 +215,8 @@ static void cleanup_service(VSTREAM *src, char *unused_service, char **argv)
     if (CLEANUP_OUT_OK(state) == 0 && type > 0) {
        if ((state->errs & CLEANUP_STAT_CONT) == 0)
            msg_warn("%s: skipping further client input", state->queue_id);
-       while ((type = rec_get(src, buf, 0)) > 0
-              && type != REC_TYPE_END)
+       while (type != REC_TYPE_END
+              && (type = rec_get(src, buf, 0)) > 0)
             /* void */ ;
     }
 
index 432d5e572d2a679d0a6a5f50273a7674dbae4038..19b51de2809805dfffd752e3fb40915f0392747d 100644 (file)
@@ -62,7 +62,6 @@ flush.o: ../../include/vbuf.h
 flush.o: ../../include/vstring.h
 flush.o: ../../include/vstring_vstream.h
 flush.o: ../../include/myflock.h
-flush.o: ../../include/valid_hostname.h
 flush.o: ../../include/htable.h
 flush.o: ../../include/dict.h
 flush.o: ../../include/argv.h
index e0a36540b2173a23191534db1124ccd4edd89379..82db3bd84385fb03146be49c4e9cd1f17b8d3b16 100644 (file)
@@ -331,7 +331,7 @@ void    mail_params_init()
        VAR_OWNREQ_SPECIAL, DEF_OWNREQ_SPECIAL, &var_ownreq_special,
        0,
     };
-const char *cp;
+    const char *cp;
 
     /*
      * Extract syslog_facility early, so that from here on all errors are
index 45bad947db7982b20845b52add0ea466ecc190b3..5110c725119c19f52eff3cf245c8de84486d10ee 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20010327"
+#define DEF_MAIL_VERSION       "Snapshot-20010329"
 extern char *var_mail_version;
 
 /* LICENSE
index 09b1685fff0d213fbd7847c18d27ad028a3aec17..7fd66830adc9846a38ce569d2249b8d215ea409c 100644 (file)
@@ -578,6 +578,10 @@ int     main(int unused_argc, char **unused_argv)
     VSTRING *buf = vstring_alloc(100);
 
     while (readlline(buf, VSTREAM_IN, (int *) 0, READLL_KEEPNL)) {
+       while (VSTRING_LEN(buf) > 0 && vstring_end(buf)[-1] == '\n') {
+           vstring_end(buf)[-1] = 0;
+           vstring_truncate(buf, VSTRING_LEN(buf) - 1);
+       }
        if (!isatty(vstream_fileno(VSTREAM_IN)))
            vstream_printf(">>>%s<<<\n\n", vstring_str(buf));
        list = tok822_parse(vstring_str(buf));
index ebc564c75e494b0d722839d8fb583c4dbaa2a3a7..28620abc468947b099d082a861a910a509a977a6 100644 (file)
@@ -11,3 +11,5 @@ wietse\ venema@porcupine.org
 wietse@[stuff
 wietse@["stuff]
 named group: foo@bar, baz@barf;
+wietse@foo (wietse
+       venema)
index debfc9c3bdc2960f4f16cba82f90034f1ba435db..dc35bff57b728bddf15b034f00f989fe7ed99990 100644 (file)
@@ -264,3 +264,27 @@ Externalized, newlines inserted:
 named group: foo@bar,
 baz@barf;
 
+>>>wietse@foo (wietse
+       venema)<<<
+
+Parse tree:
+ address
+   atom "wietse"
+   OP "@"
+   atom "foo"
+ comment
+   text "wietse
+       venema"
+
+Internalized:
+wietse@foo (wietse
+       venema)
+
+Externalized, no newlines inserted:
+wietse@foo (wietse
+       venema)
+
+Externalized, newlines inserted:
+wietse@foo (wietse
+       venema)
+
index b34c9673614f2aa11efc3124de0e95a070ecd1d8..411aa984fa0697212751e4779e165c06032be4b9 100644 (file)
@@ -61,6 +61,7 @@ postkick.o: ../../include/vstream.h
 postkick.o: ../../include/vbuf.h
 postkick.o: ../../include/msg_vstream.h
 postkick.o: ../../include/safe.h
+postkick.o: ../../include/events.h
 postkick.o: ../../include/mail_proto.h
 postkick.o: ../../include/iostuff.h
 postkick.o: ../../include/mail_params.h
index 12af8b712bdd236f00c970c655c3d976965a957b..a4066a96aca6658612a8b584b4a57ccb86043868 100644 (file)
@@ -160,12 +160,12 @@ int     main(int argc, char **argv)
     /*
      * Kick the service.
      */
-    if (mail_trigger(class, service, request, strlen(request) + 1) < 0) {
+    if (mail_trigger(class, service, request, strlen(request)) < 0) {
        msg_warn("Cannot contact class %s service %s - perhaps the mail system is down",
                 class, service);
        exit(1);
     } else {
-       event_loop(-1);
+       event_drain();
        exit(0);
     }
 }
index 6ab916429bddbd409ab0ff27d63009812f6daf84..50fe6ec9a792f20e0d62fdc1c8a5cedec845cce5 100644 (file)
@@ -781,6 +781,7 @@ int     main(int argc, char **argv)
            message_data = mymalloc(message_length);
            memset(message_data, 'X', message_length);
            for (i = 80; i < message_length; i += 80) {
+               message_data[i - 80] = "0123456789"[(i/80) % 10];
                message_data[i - 2] = '\r';
                message_data[i - 1] = '\n';
            }
index f792599c2162be659fe363be634212d1696d429f..fc8cb29ef896b5ce610f5cc3e51a61bbfb1cfdd0 100644 (file)
@@ -646,6 +646,8 @@ inet_trigger.o: sys_defs.h
 inet_trigger.o: msg.h
 inet_trigger.o: connect.h
 inet_trigger.o: iostuff.h
+inet_trigger.o: mymalloc.h
+inet_trigger.o: events.h
 inet_trigger.o: trigger.h
 inet_util.o: inet_util.c
 inet_util.o: sys_defs.h
@@ -834,6 +836,7 @@ safe_open.o: vstring.h
 safe_open.o: safe_open.h
 sane_accept.o: sane_accept.c
 sane_accept.o: sys_defs.h
+sane_accept.o: msg.h
 sane_accept.o: sane_accept.h
 sane_link.o: sane_link.c
 sane_link.o: sys_defs.h
@@ -925,6 +928,8 @@ stream_trigger.o: sys_defs.h
 stream_trigger.o: msg.h
 stream_trigger.o: connect.h
 stream_trigger.o: iostuff.h
+stream_trigger.o: mymalloc.h
+stream_trigger.o: events.h
 stream_trigger.o: trigger.h
 sys_compat.o: sys_compat.c
 sys_compat.o: sys_defs.h
@@ -976,6 +981,8 @@ unix_trigger.o: sys_defs.h
 unix_trigger.o: msg.h
 unix_trigger.o: connect.h
 unix_trigger.o: iostuff.h
+unix_trigger.o: mymalloc.h
+unix_trigger.o: events.h
 unix_trigger.o: trigger.h
 unsafe.o: unsafe.c
 unsafe.o: sys_defs.h
index e39fed3fb4b1ebc2a838d809f0c039e8dd8f4bb0..fc3a802137dad034cf621f8ca7cc81f32682f75d 100644 (file)
 #include "dict.h"
 #include "dict_ldap.h"
 
+/* AAARGH!! */
+
+#include "../global/mail_conf.h"
+
 /*
  * Structure containing all the configuration parameters for a given
  * LDAP source, plus its connection handle.
index c07504a26d619381eeb3f262bf9c62195c6e3142..99e1269565c8bef1c9ec2867ae4dec888454d4fa 100644 (file)
@@ -32,6 +32,8 @@
 /*
 /*     void    event_disable_readwrite(fd)
 /*     int     fd;
+/*
+/*     void    event_drain()
 /* DESCRIPTION
 /*     This module delivers I/O and timer events.
 /*     Multiple I/O streams and timers can be monitored simultaneously.
 /*     event_disable_readwrite() disables further I/O events on the specified
 /*     I/O channel. The application is allowed to cancel non-existing
 /*     I/O event requests.
+/*
+/*     event_drain() repeatedly calls event_loop() until no more timer
+/*     events or I/O events are pending. This routine must not be called
+/*     from an event_whatever() callback routine.
 /* DIAGNOSTICS
 /*     Panics: interface violations. Fatal errors: out of memory,
 /*     system call failure. Warnings: the number of available
@@ -242,6 +248,21 @@ time_t  event_time(void)
     return (event_present);
 }
 
+/* event_drain - loop until all pending events are done */
+
+void    event_drain(void)
+{
+    fd_set  zero_mask;
+
+    if (EVENT_INIT_NEEDED())
+       return;
+
+    FD_ZERO(&zero_mask);
+    while (event_timer_head.pred != event_timer_head.succ
+          || memcmp(&zero_mask, &event_xmask, sizeof(zero_mask)) != 0)
+       event_loop(-1);
+}
+
 /* event_enable_read - enable read events */
 
 void    event_enable_read(int fd, EVENT_NOTIFY_RDWR callback, char *context)
index bc39b4787c4d74e041ef0222faaf68ec4e3c2b11..d7235093b212fbb445b3b177b5c0fcf29ce85857 100644 (file)
@@ -29,6 +29,7 @@ extern void event_disable_readwrite(int);
 extern time_t event_request_timer(EVENT_NOTIFY_TIME, char *, int);
 extern int event_cancel_timer(EVENT_NOTIFY_TIME, char *);
 extern void event_loop(int);
+extern void event_drain(void);
 
  /*
   * Event codes.
index 6907d56cd172bbff5682eefe96c2b7c179ebe8a5..980c22df13961483e6fb80a4fe9d5a69b8911996 100644 (file)
@@ -16,9 +16,9 @@
 /*     a brief connection to it and by writing the contents of the
 /*     named buffer.
 /*
-/*      The connection is closed by a background thread. Some kernels
-/*      cannot handle client-side disconnect before the server has
-/*      received the message.
+/*     The connection is closed by a background thread. Some kernels
+/*     cannot handle client-side disconnect before the server has
+/*     received the message.
 /*
 /*     Arguments:
 /* .IP service
@@ -80,6 +80,7 @@ static void inet_trigger_event(int event, char *context)
     if (event == EVENT_TIME)
        msg_warn("%s: read timeout for service %s", myname, ip->service);
     event_disable_readwrite(ip->fd);
+    event_cancel_timer(inet_trigger_event, context);
     if (close(ip->fd) < 0)
        msg_warn("%s: close %s: %m", myname, ip->service);
     myfree(ip->service);
@@ -113,7 +114,8 @@ int     inet_trigger(const char *service, const char *buf, int len, int timeout)
     /*
      * Write the request...
      */
-    if (write_buf(fd, buf, len, timeout) < 0)
+    if (write_buf(fd, buf, len, timeout) < 0
+       || write_buf(fd, "", 1, timeout) < 0)
        if (msg_verbose)
            msg_warn("%s: write to %s: %m", myname, service);
 
@@ -121,7 +123,7 @@ int     inet_trigger(const char *service, const char *buf, int len, int timeout)
      * Wakeup when the peer disconnects, or when we lose patience.
      */
     if (timeout > 0)
-       event_request_timer(inet_trigger_event, (char *) ip, timeout);
+       event_request_timer(inet_trigger_event, (char *) ip, timeout + 100);
     event_enable_read(fd, inet_trigger_event, (char *) ip);
     return (0);
 }
index b064a796303f52a7b8b361c8a6e98aa74925db2a..31b4dae0a01bddec1c13377e72d5d2aade85a807 100644 (file)
@@ -77,6 +77,7 @@ static void stream_trigger_event(int event, char *context)
     if (event == EVENT_TIME)
        msg_warn("%s: read timeout for service %s", myname, sp->service);
     event_disable_readwrite(sp->fd);
+    event_cancel_timer(stream_trigger_event, context);
     if (close(sp->fd) < 0)
        msg_warn("%s: close %s: %m", myname, sp->service);
     myfree(sp->service);
@@ -113,7 +114,8 @@ int     stream_trigger(const char *service, const char *buf, int len, int timeou
     /*
      * Write the request...
      */
-    if (write_buf(fd, buf, len, timeout) < 0)
+    if (write_buf(fd, buf, len, timeout) < 0
+       || write_buf(fd, "", 1, timeout) < 0)
        if (msg_verbose)
            msg_warn("%s: write to %s: %m", myname, service);
 
@@ -121,7 +123,7 @@ int     stream_trigger(const char *service, const char *buf, int len, int timeou
      * Wakeup when the peer disconnects, or when we lose patience.
      */
     if (timeout > 0)
-       event_request_timer(stream_trigger_event, (char *) sp, timeout);
+       event_request_timer(stream_trigger_event, (char *) sp, timeout + 100);
     event_enable_read(fd, stream_trigger_event, (char *) sp);
     return (0);
 }
index dbad4d71634544af64d2f3f2b7d5b64f3b5e2237..664b32938d74b1602827fccb7c4fe74341b1f5a9 100644 (file)
@@ -401,6 +401,10 @@ extern int initgroups(const char *, int);
 
 #if defined(IRIX5)
 #define MISSING_USLEEP
+#endif
+
+#if defined(IRIX6)
+#define HAS_POSIX_REGEXP
 #endif
 
  /*
index 0bf8ae15fd0f7677971b42a960e8fe110c67be75..d4a341d75800c58b75d46de1f35bda018d410ac3 100644 (file)
@@ -78,6 +78,7 @@ static void unix_trigger_event(int event, char *context)
     if (event == EVENT_TIME)
        msg_warn("%s: read timeout for service %s", myname, up->service);
     event_disable_readwrite(up->fd);
+    event_cancel_timer(unix_trigger_event, context);
     if (close(up->fd) < 0)
        msg_warn("%s: close %s: %m", myname, up->service);
     myfree(up->service);
@@ -114,7 +115,8 @@ int     unix_trigger(const char *service, const char *buf, int len, int timeout)
     /*
      * Write the request...
      */
-    if (write_buf(fd, buf, len, timeout) < 0)
+    if (write_buf(fd, buf, len, timeout) < 0
+       || write_buf(fd, "", 1, timeout) < 0)
        if (msg_verbose)
            msg_warn("%s: write to %s: %m", myname, service);
 
@@ -122,7 +124,7 @@ int     unix_trigger(const char *service, const char *buf, int len, int timeout)
      * Wakeup when the peer disconnects, or when we lose patience.
      */
     if (timeout > 0)
-       event_request_timer(unix_trigger_event, (char *) up, timeout);
+       event_request_timer(unix_trigger_event, (char *) up, timeout + 100);
     event_enable_read(fd, unix_trigger_event, (char *) up);
     return (0);
 }