]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.2.3 v2.2.3
authorWietse Venema <wietse@porcupine.org>
Thu, 28 Apr 2005 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Sat, 10 Feb 2018 21:11:42 +0000 (16:11 -0500)
57 files changed:
postfix/HISTORY
postfix/conf/post-install
postfix/src/anvil/Makefile.in
postfix/src/bounce/Makefile.in
postfix/src/cleanup/Makefile.in
postfix/src/cleanup/cleanup.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_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/postsuper/postsuper.c
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_connect.c
postfix/src/smtp/smtp_proto.c
postfix/src/smtp/smtp_sasl_glue.c
postfix/src/smtpd/Makefile.in
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/argv.c
postfix/src/util/argv.h
postfix/src/util/dict_cdb.c
postfix/src/util/sys_defs.h
postfix/src/verify/Makefile.in
postfix/src/virtual/Makefile.in

index 8af435734de925ac39e7bcfc8b81393ab54cf171..8d7cd173d766dc3f17cb81da8b4168f9fe00d15f 100644 (file)
@@ -10512,3 +10512,62 @@ Apologies for any names omitted.
        PREPEND+IGNORE. The result remains in the input stream, and
        is subject to address rewriting and other processing where
        applicable.  File: cleanup/cleanup_message.c.
+
+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.
+
+20050402
+
+       Cleanup: updated error messages about MIME processing errors
+       in the SMTP client. These errors are no longer specific to
+       8bit->7bit conversion; they can also happen with generic
+       address mapping. File: smtp/smtp_proto.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.
+
+20050412
+
+       Bugfix: while updating the cleanup_flush() infrastructure
+       in the 2.3 development release, eliminated a portability
+       problem that was introduced when "REJECT text" support was
+       added. File: cleanup/cleanup.c.
+
+20050413
+
+       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.
+
+20050417
+
+       Safety: don't call syslog from a user-triggered signal
+       handler, and other minor fixes back-ported from the 2.3
+       development release.  File: postdrop/postdrop.c.
+
+20050422
+
+       Bugfix: postsuper could lose an error message after reporting
+       a fatal error. Fix back-ported from the 2.3 development
+       release.  File: postsuper/postsuper.c.
+
+20050427
+
+       Bugfix: don't panic when the fall-back relay can't be used
+       because the local MTA is MX for the destination, or when
+       the fall-back relay can't be used because it was already
+       tried via a cached session.  Files: util/argv.c,
+       smtp/smtp_connect.c.
index 1119bcec646f715a0a40dc3b4fdf8ffb69516022..ee6efa8942a3f3b1c5ec229b536519c2e956360f 100644 (file)
@@ -638,7 +638,7 @@ EOF
 
     grep "^tlsmgr[     ]*fifo[         ]" \
        $config_directory/master.cf >/dev/null && {
-           echo Editing $config_directory/master.cf, updating the tlsmgr fifo->unix service
+           echo Editing $config_directory/master.cf, updating the tlsmgr from fifo to unix service
            ed $config_directory/master.cf <<EOF || exit 1
 /^tlsmgr[      ]*fifo[         ]/
 s/fifo/unix/
index 5e4035fb1bfe790fc4b01e20fbba71dc807dbfa1..1b4e7d2c3715989b965a056cd1e69418125fecb5 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 7c802a6da8015167dca3849f9226ad8ed81ce18e..a12e58ffda5c830c981a829c68ee4d1e73abf120 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 233baab1677a4d314853a18bfb7f4df0bd1b4d3b..cb3df0048254d2689c43e960eb1d60b127f18ecc 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 9f87480a1144bfa4e9268fd454985be4635f4a23..10152ffdfa5e1a6852ed13eea3864e54ba5e4ef0 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 d18adf4507a140b6d25e6388e5bd39482e8cc651..615c2356da74aa9bd849ca550356a32f0709d7bd 100644 (file)
@@ -18,6 +18,8 @@ INC_DIR       = ../../include
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index 8bacb92b9d47c51f0ba43e67efa14f20ce45a12d..77a4da26b88436289a812fd3c718064e741dc7cb 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 21603b9e885e0e1d8f1342d65620b6da19f06395..70c76ff9f0b1ad4af6291259d8b83f917100f61d 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 a04617a03a98759bc1a00ec288e4948e5233a8ee..cc29f5ee9cbafbcd3d0fe11dc54f833e43310161 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 e15cbca8be3b09d25604676bc0ec0b6aa32e9f1d..092d7b7c4f1b7f7a2730dfa60c188eb7a1cc1ca9 100644 (file)
@@ -97,6 +97,8 @@ MAKES =
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index d3519119342b67422826ef1f2f14f1302fc7a398..8a6688dfd5c316b7e478f0263ed3a364774e26d3 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change the patchlevel and the release date. Snapshots change the
   * release date only.
   */
-#define MAIL_RELEASE_DATE      "20050401"
-#define MAIL_VERSION_NUMBER    "2.2.2"
+#define MAIL_RELEASE_DATE      "20050428"
+#define MAIL_VERSION_NUMBER    "2.2.3"
 
 #define VAR_MAIL_VERSION       "mail_version"
 #ifdef SNAPSHOT
index 24aad7250e128f0b1a533f72650a0ff7455ca9a2..b5c9115488199e2c84327c9e8b21124483c6643d 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 05bcc7d926c9050df8cc921671772f6a49860a91..db11b12ad72f673220c2e163c5549ba0af70cf2c 100644 (file)
@@ -377,7 +377,7 @@ void    lmtp_sasl_start(LMTP_STATE *state, 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, lmtp_sasl_sec_mask,
                                         sasl_opts_val);
index fb439cde6a6720fbdd4fd9893e662b3fd19e48d3..a804f1582d5fd36c70446c0122d0385973d7b7e5 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 d21f674c8a034d93c921ea79f91137914e1d079f..8c7bd19fe72181172c755cce259d40a597790f9c 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 509875b755b3974bbb38e37dc6f909eeaf57e372..7f16e4b32b030a14446f26d095d51530543aff13 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 5e74360295e77c4aec44cf9e651c7ea22e971745..e30b4243200f95949dd15f48a322aedadb749d95 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 6a676ed8f4fb98f2f672c91fb9ba7079d5c1c34a..5ed3a20ddc08d5f7cac972298f4515a82ff58420 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 2e414ad780eed6ff1e35e875c4b57a74c26c3c3f..6e5112289fa581e07333c3849029fd0f7257192d 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 4cce48332d868ba5cfdef7439e30ee276fc73730..0982b679066e6cd85a22f8e0386392e75ef1bf2b 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 069f951b088e2ef58f808813a173544927b77114..54a12e3ec845dce6329eee1afd0a908811f6e693 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 6ddcf835edbb6e24272e9b3e6546ee16371e2c94..c9fa3fe9f1e953905cef606bf9a5951915cf42ba 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..7d22955d84fc737b41c64034a0b78cfadfbd8a24 100644 (file)
@@ -165,48 +165,45 @@ static CONFIG_STR_TABLE str_table[] = {
   */
 static char *postdrop_path;
 
-/* postdrop_cleanup - callback for the runtime error handler */
-
-static void postdrop_cleanup(void)
-{
-
-    /*
-     * This is the fatal error handler. Don't try to do anything fancy.
-     * 
-     * msg_xxx() does not allocate memory, so it is safe as long as the signal
-     * handler can't be invoked recursively.
-     */
-    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;
-    }
-}
-
 /* postdrop_sig - catch signal and clean up */
 
 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
+     * This is the fatal error handler. Don't try to do anything fancy.
+     * 
+     * msg_vstream does not allocate memory, but msg_syslog may indirectly in
+     * syslog(), so it should not be called from a user-triggered signal
+     * handler.
+     * 
+     * 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();
+       (void) signal(SIGQUIT, SIG_IGN);
+       (void) signal(SIGTERM, SIG_IGN);
+       (void) signal(SIGHUP, SIG_IGN);
+       if (postdrop_path) {
+           (void) remove(postdrop_path);
+           postdrop_path = 0;
+       }
        /* Future proofing. If you need exit() here then you broke Postfix. */
-       _exit(sig);
+       if (sig)
+           _exit(sig);
     }
 }
 
+/* postdrop_cleanup - callback for the runtime error handler */
+
+static void postdrop_cleanup(void)
+{
+    postdrop_sig(0);
+}
+
 /* main - the main program */
 
 int     main(int argc, char **argv)
@@ -228,6 +225,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 +426,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 dad1be2c3059eac8dc3b154b66e424ecf08d2800..52942c84601abb9feb73644ed5c64ef4deaf551c 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 568edf654eee159b1a00f05638e7e19c29595a28..77ffc568f3cc9c95a6eef7b2c2c19e4bf84e2a3b 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 48853df79196876144f92e8ea5728a760c7f54ef..8a3588bde8ebac6cb4fae478fbb8be5fd7278146 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 64f32b5d4ad9334eb01db96586d07efcd5c0914f..421649f6fcc5fe46a4d542eb33647a376c2d922f 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 7761292e48aed532a55bfaa22abb21051457647a..739162ff0a6fd9bba7916fe7d343517b19c0c1b6 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 f3a523b5e62367bc5f68b3479a88df23033423bb..31bb675f68508ddb8132bceb50125af05216165c 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 df0dfa08ab0013dd218adfa298f7e9142b6abf04..ba6b844a21641bc98cdddc652b7d15b692a1d789 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 633e0a42ad6dff726787fcf4eac973a5245b3ff6..32b818d3bf70470730448c1e73ad97d1be26cab7 100644 (file)
@@ -943,19 +943,31 @@ static void super(const char **queues, int action)
     argv_free(hash_queue_names);
 }
 
-/* fatal_exit - print warning if queue fix is incomplete */
+/* interrupted - signal handler */
 
-static void fatal_exit(void)
+static void interrupted(int sig)
 {
-    if (inode_mismatch > 0 || inode_fixed > 0 || position_mismatch > 0)
-       msg_fatal("OPERATION INCOMPLETE -- RERUN COMMAND TO FIX THE QUEUE FIRST");
+
+    /*
+     * This commands requires root privileges. We therefore do not worry
+     * about hostile signals, and report problems via msg_warn().
+     */
+    if (signal(SIGHUP, SIG_IGN) != SIG_IGN) {
+       (void) signal(SIGINT, SIG_IGN);
+       (void) signal(SIGQUIT, SIG_IGN);
+       (void) signal(SIGTERM, SIG_IGN);
+       if (inode_mismatch > 0 || inode_fixed > 0 || position_mismatch > 0)
+           msg_warn("OPERATION INCOMPLETE -- RERUN COMMAND TO FIX THE QUEUE FIRST");
+       if (sig)
+           _exit(sig);
+    }
 }
 
-/* interrupted - signal handler */
+/* fatal_warning - print warning if queue fix is incomplete */
 
-static void interrupted(int unused_sig)
+static void fatal_warning(void)
 {
-    fatal_exit();
+    interrupted(0);
 }
 
 int     main(int argc, char **argv)
@@ -1136,7 +1148,7 @@ int     main(int argc, char **argv)
     signal(SIGINT, interrupted);
     signal(SIGQUIT, interrupted);
     signal(SIGTERM, interrupted);
-    msg_cleanup(fatal_exit);
+    msg_cleanup(fatal_warning);
 
     /*
      * Sanity checks.
index deb28075c4c7aeaf0cfab5b68e66652f845ca57b..02c9d8c87d862c2c6bedc100246675536e284236 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 91f19f17690a8b6c34ac6273ab5d96445af681ba..18e77af595a91f2c041e8078a6eead515300a1be 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 b610438404ce76787ed7df12e3857a5f79057b00..e5db831dd94b539f21f70d3c7e5bd49eaee974a3 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 $?) >$@
 
index 9ce8504943dbc88181fa833574844b13ab5b8f3b..b4cc80885d1f983b9a49be7dd088b6400c46625c 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 364e6a15aedfa1afd897127ce027329e4475e197..4df66f03d67dec0b8f3081417aa803a4e37fc1b9 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 285d77adc0e953a6b9557639d3bc174349fddda9..81e0423ed1a047235dcf4e72d8c6e9277102901d 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 16cae7bd2d9c38df638aae7a39d70d0272e02b02..4f6c6253d27dcde41cc4d2b31a3ff4bd509892b4 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 ecaa2ebfa4897d2bc2d5c4265ea17407b482c23a..3b69841d32c8b64cbddf11d98a23a6391b7fe2ee 100644 (file)
@@ -561,9 +561,6 @@ int     smtp_connect(SMTP_STATE *state)
            (*(cpp) && (cpp) >= (sites)->argv + (non_fallback_sites))
 
     for (cpp = sites->argv; SMTP_RCPT_LEFT(state) > 0 && (dest = *cpp) != 0; cpp++) {
-       if (i_am_mx && IS_FALLBACK_RELAY(cpp, sites, non_fallback_sites))
-           break;
-       state->final_server = (cpp[1] == 0);
 
        /*
         * Parse the destination. Default is to use the SMTP port. Look up
@@ -588,7 +585,11 @@ int     smtp_connect(SMTP_STATE *state)
            /* XXX We could be an MX host for this destination... */
        } else {
            addr_list = smtp_domain_addr(domain, misc_flags, why, &i_am_mx);
+           /* If we're MX host, don't connect to non-MX backups. */
+           if (i_am_mx)
+               argv_truncate(sites, cpp - sites->argv + 1);
        }
+       state->final_server = (cpp[1] == 0);
 
        /*
         * When session caching is enabled, store the first good session for
@@ -699,8 +700,16 @@ int     smtp_connect(SMTP_STATE *state)
      * 
      * Pay attention to what could be configuration problems, and pretend that
      * these are recoverable rather than bouncing the mail.
+     * 
+     * In case of a "no error" indication we make up an excuse; this can happen
+     * when the fall-back relay was already tried via a cached connection, so
+     * that the address list scrubber left behind an empty list.
      */
     if (SMTP_RCPT_LEFT(state) > 0) {
+       if (smtp_errno == SMTP_ERR_NONE) {
+           vstring_sprintf(why, "server unavailable or unable to receive mail");
+           smtp_errno = SMTP_ERR_RETRY;
+       }
        switch (smtp_errno) {
 
        default:
index 398a951c7d96b5f2ade6ffb22c5d17937fff415f..f197ea5e1fc96a9d401d2ae6d09111a0dfd6e2f6 100644 (file)
@@ -1411,8 +1411,7 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
                                          vstring_str(session->scratch),
                                          VSTRING_LEN(session->scratch));
                    if (mime_errs) {
-                       smtp_mesg_fail(state, 554,
-                                      "MIME 7-bit conversion failed: %s",
+                       smtp_mesg_fail(state, 554, "%s",
                                       mime_state_error(mime_errs));
                        RETURN(0);
                    }
@@ -1429,12 +1428,13 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
                 * ending in newline via /usr/sbin/sendmail while MIME input
                 * processing is turned off, and MIME 8bit->7bit conversion
                 * is requested upon delivery.
+                * 
+                * Or some error while doing generic address mapping.
                 */
                mime_errs =
                    mime_state_update(session->mime_state, rec_type, "", 0);
                if (mime_errs) {
-                   smtp_mesg_fail(state, 554,
-                                  "MIME 7-bit conversion failed: %s",
+                   smtp_mesg_fail(state, 554, "%s",
                                   mime_state_error(mime_errs));
                    RETURN(0);
                }
index 735c2a4568b883b6fdab80d6f71b4bfaa8c88fcc..b6e93ee8cd9f9d43e305608cf8060386da24347d 100644 (file)
@@ -412,7 +412,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 88a8dbe9b06a759d1f19b409010506ab8b520b00..4c0c64218f0d683d20e6aa83868dafeee729ab64 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 63f3d81831ad02a0631096f1cf5ce6bbfc2c218b..bc2f0e22f959185184af48a4a05ab7a442c7bcf4 100644 (file)
@@ -289,7 +289,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 e05b1bc02971fd4a175058830d925d6201b710ac..5823191d705bc1a3a92d9db34369bff882a568e6 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 a755e3610b233cd2e8047648e91f7640e8ae6642..93dacccd556ea0690fe2a4f825d3a6e269aec47f 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 d524015fa42dc3d6570f96fef155ce576abcb7d5..c6ed48a8060171d4075761b37ed1fc8143509eaf 100644 (file)
@@ -24,6 +24,8 @@ MAKES =
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index ddfd530a6037f1b301359124dd62c0a61ba6111c..ef0d2e13c05c0c509fdab2400b4b2f8bb76c05f1 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 dfe21f6e2e7e39e351a326443f9c7d6ed13ff8b4..7c134d057ac8a3809e2c415ff5b8558a4ec554d5 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 ea4c68980491e9f261a1d14de4345674580b6b69..70190d5735503b22ecfd9d688a263070abf8fdb6 100644 (file)
@@ -109,6 +109,8 @@ INC_DIR     = ../../include
 
 all: $(LIB)
 
+$(OBJS): ../../conf/makedefs.out
+
 Makefile: Makefile.in
        (cat ../../conf/makedefs.out $?) >$@
 
index bf3fb84ce294b553189e4eab75e155ec41a55466..33f1843d1bcbf56a52667bc2f31f1a69ed3e8334 100644 (file)
 /*
 /*     void    argv_terminate(argvp);
 /*     ARGV    *argvp;
+/*
+/*     void    argv_truncate(argvp, len);
+/*     ARGV    *argvp;
+/*     int     len;
 /* DESCRIPTION
 /*     The functions in this module manipulate arrays of string
 /*     pointers. An ARGV structure contains the following members:
 /*     returns a null pointer.
 /*
 /*     argv_terminate() null-terminates its string array argument.
+/*
+/*     argv_truncate() trucates its argument to the specified
+/*     number of entries, but does not reallocate memory. The
+/*     result is null-terminated.
 /* SEE ALSO
 /*     msg(3) diagnostics interface
 /* DIAGNOSTICS
@@ -177,3 +185,23 @@ void    argv_terminate(ARGV *argvp)
      */
     argvp->argv[argvp->argc] = 0;
 }
+
+/* argv_truncate - truncate string array */
+
+void    argv_truncate(ARGV *argvp, int len)
+{
+    char  **cpp;
+
+    /*
+     * Sanity check.
+     */
+    if (len < 0)
+       msg_panic("argv_truncate: bad length %d", len);
+
+    if (len < argvp->argc) {
+       for (cpp = argvp->argv + len; cpp < argvp->argv + argvp->argc; cpp++)
+           myfree(*cpp);
+       argvp->argc = len;
+       argvp->argv[argvp->argc] = 0;
+    }
+}
index f490c703464245658c0510ac344dd16eeef3e47d..9c0e7585131b75f582a8a66d71a3e64669c94d92 100644 (file)
@@ -24,6 +24,7 @@ extern ARGV *argv_alloc(int);
 extern void argv_add(ARGV *,...);
 extern void argv_addn(ARGV *,...);
 extern void argv_terminate(ARGV *);
+extern void argv_truncate(ARGV *, int);
 extern ARGV *argv_free(ARGV *);
 
 extern ARGV *argv_split(const char *, const char *);
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 42a36589648c1e3e8557620a6bd9d30d1e6b3754..11e847e4165e66134de5a1fbf2ec215547c3b94d 100644 (file)
@@ -1287,6 +1287,15 @@ typedef int pid_t;
   */
 #ifndef SET_H_ERRNO
 #define SET_H_ERRNO(err) (h_errno = (err))
+#endif
+
+ /*
+  * Don't mix socket message calls with socket 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 39215f5435e29857ebccbd83496ee4f78c89185a..56dd0544b5cf341a75dfe45a6c8f14ae0ee57049 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 d0e7bca7d879a381c3409a2e803397a855cd8bf3..d9b8d12130522bef6388a764473d5d70ee2c75ed 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 $?) >$@