Prereq: "2.2.2" diff -cr /var/tmp/postfix-2.2.2/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-2.2.2/src/global/mail_version.h Fri Apr 1 10:13:57 2005 --- ./src/global/mail_version.h Fri Apr 29 17:17:45 2005 *************** *** 20,27 **** * 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 VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT --- 20,27 ---- * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20050428" ! #define MAIL_VERSION_NUMBER "2.2.3" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT diff -cr /var/tmp/postfix-2.2.2/HISTORY ./HISTORY *** /var/tmp/postfix-2.2.2/HISTORY Wed Mar 30 09:23:51 2005 --- ./HISTORY Fri Apr 29 17:16:40 2005 *************** *** 10512,10514 **** --- 10512,10573 ---- 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. diff -cr /var/tmp/postfix-2.2.2/conf/post-install ./conf/post-install *** /var/tmp/postfix-2.2.2/conf/post-install Fri Mar 4 20:16:29 2005 --- ./conf/post-install Fri Apr 15 07:52:19 2005 *************** *** 638,644 **** grep "^tlsmgr[ ]*fifo[ ]" \ $config_directory/master.cf >/dev/null && { ! echo Editing $config_directory/master.cf, updating the tlsmgr fifo->unix service ed $config_directory/master.cf </dev/null && { ! echo Editing $config_directory/master.cf, updating the tlsmgr from fifo to unix service ed $config_directory/master.cf <$@ diff -cr /var/tmp/postfix-2.2.2/src/bounce/Makefile.in ./src/bounce/Makefile.in *** /var/tmp/postfix-2.2.2/src/bounce/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/bounce/Makefile.in Fri Apr 29 17:07:08 2005 *************** *** 19,24 **** --- 19,26 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/cleanup/Makefile.in ./src/cleanup/Makefile.in *** /var/tmp/postfix-2.2.2/src/cleanup/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/cleanup/Makefile.in Fri Apr 29 17:07:12 2005 *************** *** 23,28 **** --- 23,30 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/cleanup/cleanup.c ./src/cleanup/cleanup.c *** /var/tmp/postfix-2.2.2/src/cleanup/cleanup.c Wed Mar 9 15:07:25 2005 --- ./src/cleanup/cleanup.c Tue Apr 12 12:34:21 2005 *************** *** 338,343 **** --- 338,344 ---- CLEANUP_STATE *state; int flags; int type = 0; + int status; /* * Sanity check. This service takes no command-line arguments. *************** *** 403,410 **** /* * Finish this message, and report the result status to the client. */ attr_print(src, ATTR_FLAG_NONE, ! ATTR_TYPE_NUM, MAIL_ATTR_STATUS, cleanup_flush(state), ATTR_TYPE_STR, MAIL_ATTR_WHY, state->reason ? state->reason : "", ATTR_TYPE_END); --- 404,412 ---- /* * 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, status, ATTR_TYPE_STR, MAIL_ATTR_WHY, state->reason ? state->reason : "", ATTR_TYPE_END); diff -cr /var/tmp/postfix-2.2.2/src/discard/Makefile.in ./src/discard/Makefile.in *** /var/tmp/postfix-2.2.2/src/discard/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/discard/Makefile.in Fri Apr 29 17:07:16 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/dns/Makefile.in ./src/dns/Makefile.in *** /var/tmp/postfix-2.2.2/src/dns/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/dns/Makefile.in Fri Apr 29 17:08:31 2005 *************** *** 18,23 **** --- 18,25 ---- all: $(LIB) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/error/Makefile.in ./src/error/Makefile.in *** /var/tmp/postfix-2.2.2/src/error/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/error/Makefile.in Fri Apr 29 17:08:35 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/flush/Makefile.in ./src/flush/Makefile.in *** /var/tmp/postfix-2.2.2/src/flush/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/flush/Makefile.in Fri Apr 29 17:08:38 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/fsstone/Makefile.in ./src/fsstone/Makefile.in *** /var/tmp/postfix-2.2.2/src/fsstone/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/fsstone/Makefile.in Fri Apr 29 17:08:41 2005 *************** *** 14,19 **** --- 14,21 ---- all: $(PROG) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/global/Makefile.in ./src/global/Makefile.in *** /var/tmp/postfix-2.2.2/src/global/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/global/Makefile.in Fri Apr 29 17:08:44 2005 *************** *** 97,102 **** --- 97,104 ---- all: $(LIB) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/lmtp/Makefile.in ./src/lmtp/Makefile.in *** /var/tmp/postfix-2.2.2/src/lmtp/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/lmtp/Makefile.in Fri Apr 29 17:08:47 2005 *************** *** 19,24 **** --- 19,26 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/lmtp/lmtp_sasl_glue.c ./src/lmtp/lmtp_sasl_glue.c *** /var/tmp/postfix-2.2.2/src/lmtp/lmtp_sasl_glue.c Fri Sep 12 14:46:58 2003 --- ./src/lmtp/lmtp_sasl_glue.c Wed Apr 13 10:09:47 2005 *************** *** 377,383 **** */ memset(&sec_props, 0L, sizeof(sec_props)); sec_props.min_ssf = 0; ! sec_props.max_ssf = 1; /* don't allow real SASL * security layer */ sec_props.security_flags = name_mask(sasl_opts_name, lmtp_sasl_sec_mask, sasl_opts_val); --- 377,383 ---- */ memset(&sec_props, 0L, sizeof(sec_props)); sec_props.min_ssf = 0; ! 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); diff -cr /var/tmp/postfix-2.2.2/src/local/Makefile.in ./src/local/Makefile.in *** /var/tmp/postfix-2.2.2/src/local/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/local/Makefile.in Fri Apr 29 17:08:50 2005 *************** *** 21,26 **** --- 21,28 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/master/Makefile.in ./src/master/Makefile.in *** /var/tmp/postfix-2.2.2/src/master/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/master/Makefile.in Fri Apr 29 17:13:48 2005 *************** *** 24,29 **** --- 24,31 ---- all: $(PROG) $(LIB) + $(OBJS) $(LIB_OBJ): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/oqmgr/Makefile.in ./src/oqmgr/Makefile.in *** /var/tmp/postfix-2.2.2/src/oqmgr/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/oqmgr/Makefile.in Fri Apr 29 17:09:02 2005 *************** *** 19,24 **** --- 19,26 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/pickup/Makefile.in ./src/pickup/Makefile.in *** /var/tmp/postfix-2.2.2/src/pickup/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/pickup/Makefile.in Fri Apr 29 17:09:05 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/pipe/Makefile.in ./src/pipe/Makefile.in *** /var/tmp/postfix-2.2.2/src/pipe/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/pipe/Makefile.in Fri Apr 29 17:09:08 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postalias/Makefile.in ./src/postalias/Makefile.in *** /var/tmp/postfix-2.2.2/src/postalias/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postalias/Makefile.in Fri Apr 29 17:09:11 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postcat/Makefile.in ./src/postcat/Makefile.in *** /var/tmp/postfix-2.2.2/src/postcat/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postcat/Makefile.in Fri Apr 29 17:09:14 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postconf/Makefile.in ./src/postconf/Makefile.in *** /var/tmp/postfix-2.2.2/src/postconf/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postconf/Makefile.in Fri Apr 29 17:09:17 2005 *************** *** 25,30 **** --- 25,32 ---- echo "#"; \ ./$(PROG) -d) |egrep -v '^(myhostname|mydomain|mynetworks) ' >$@ + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postdrop/Makefile.in ./src/postdrop/Makefile.in *** /var/tmp/postfix-2.2.2/src/postdrop/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postdrop/Makefile.in Fri Apr 29 17:09:20 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postdrop/postdrop.c ./src/postdrop/postdrop.c *** /var/tmp/postfix-2.2.2/src/postdrop/postdrop.c Wed Mar 2 09:34:26 2005 --- ./src/postdrop/postdrop.c Mon Apr 18 04:16:31 2005 *************** *** 165,212 **** */ 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 * 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); } } /* main - the main program */ int main(int argc, char **argv) --- 165,209 ---- */ static char *postdrop_path; /* postdrop_sig - catch signal and clean up */ static void postdrop_sig(int sig) { /* ! * 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); ! if (postdrop_path) { ! (void) remove(postdrop_path); ! postdrop_path = 0; ! } /* Future proofing. If you need exit() here then you broke Postfix. */ ! 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,233 **** --- 225,231 ---- char *attr_name; char *attr_value; const char *errstr; + char *junk; /* * Be consistent with file permissions. *************** *** 428,435 **** * will not be deleted after we have taken responsibility for delivery. */ if (postdrop_path) { ! myfree(postdrop_path); postdrop_path = 0; } /* --- 426,434 ---- * will not be deleted after we have taken responsibility for delivery. */ if (postdrop_path) { ! junk = postdrop_path; postdrop_path = 0; + myfree(junk); } /* diff -cr /var/tmp/postfix-2.2.2/src/postfix/Makefile.in ./src/postfix/Makefile.in *** /var/tmp/postfix-2.2.2/src/postfix/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postfix/Makefile.in Fri Apr 29 17:09:23 2005 *************** *** 16,21 **** --- 16,23 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postkick/Makefile.in ./src/postkick/Makefile.in *** /var/tmp/postfix-2.2.2/src/postkick/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postkick/Makefile.in Fri Apr 29 17:09:28 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postlock/Makefile.in ./src/postlock/Makefile.in *** /var/tmp/postfix-2.2.2/src/postlock/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postlock/Makefile.in Fri Apr 29 17:11:43 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postlog/Makefile.in ./src/postlog/Makefile.in *** /var/tmp/postfix-2.2.2/src/postlog/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postlog/Makefile.in Fri Apr 29 17:11:46 2005 *************** *** 16,21 **** --- 16,23 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postmap/Makefile.in ./src/postmap/Makefile.in *** /var/tmp/postfix-2.2.2/src/postmap/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postmap/Makefile.in Fri Apr 29 17:11:51 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postqueue/Makefile.in ./src/postqueue/Makefile.in *** /var/tmp/postfix-2.2.2/src/postqueue/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postqueue/Makefile.in Fri Apr 29 17:11:53 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postsuper/Makefile.in ./src/postsuper/Makefile.in *** /var/tmp/postfix-2.2.2/src/postsuper/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/postsuper/Makefile.in Fri Apr 29 17:11:56 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/postsuper/postsuper.c ./src/postsuper/postsuper.c *** /var/tmp/postfix-2.2.2/src/postsuper/postsuper.c Sun Feb 13 13:46:05 2005 --- ./src/postsuper/postsuper.c Fri Apr 22 13:14:01 2005 *************** *** 943,961 **** argv_free(hash_queue_names); } ! /* fatal_exit - print warning if queue fix is incomplete */ ! static void fatal_exit(void) { ! if (inode_mismatch > 0 || inode_fixed > 0 || position_mismatch > 0) ! msg_fatal("OPERATION INCOMPLETE -- RERUN COMMAND TO FIX THE QUEUE FIRST"); } ! /* interrupted - signal handler */ ! static void interrupted(int unused_sig) { ! fatal_exit(); } int main(int argc, char **argv) --- 943,973 ---- argv_free(hash_queue_names); } ! /* interrupted - signal handler */ ! static void interrupted(int sig) { ! ! /* ! * 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); ! } } ! /* fatal_warning - print warning if queue fix is incomplete */ ! static void fatal_warning(void) { ! interrupted(0); } int main(int argc, char **argv) *************** *** 1136,1142 **** signal(SIGINT, interrupted); signal(SIGQUIT, interrupted); signal(SIGTERM, interrupted); ! msg_cleanup(fatal_exit); /* * Sanity checks. --- 1148,1154 ---- signal(SIGINT, interrupted); signal(SIGQUIT, interrupted); signal(SIGTERM, interrupted); ! msg_cleanup(fatal_warning); /* * Sanity checks. diff -cr /var/tmp/postfix-2.2.2/src/proxymap/Makefile.in ./src/proxymap/Makefile.in *** /var/tmp/postfix-2.2.2/src/proxymap/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/proxymap/Makefile.in Fri Apr 29 17:11:59 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/qmgr/Makefile.in ./src/qmgr/Makefile.in *** /var/tmp/postfix-2.2.2/src/qmgr/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/qmgr/Makefile.in Fri Apr 29 17:12:01 2005 *************** *** 21,26 **** --- 21,28 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/qmqpd/Makefile.in ./src/qmqpd/Makefile.in *** /var/tmp/postfix-2.2.2/src/qmqpd/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/qmqpd/Makefile.in Fri Apr 29 17:12:04 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/scache/Makefile.in ./src/scache/Makefile.in *** /var/tmp/postfix-2.2.2/src/scache/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/scache/Makefile.in Fri Apr 29 17:12:07 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/sendmail/Makefile.in ./src/sendmail/Makefile.in *** /var/tmp/postfix-2.2.2/src/sendmail/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/sendmail/Makefile.in Fri Apr 29 17:12:10 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/showq/Makefile.in ./src/showq/Makefile.in *** /var/tmp/postfix-2.2.2/src/showq/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/showq/Makefile.in Fri Apr 29 17:12:13 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/smtp/Makefile.in ./src/smtp/Makefile.in *** /var/tmp/postfix-2.2.2/src/smtp/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/smtp/Makefile.in Fri Apr 29 17:12:25 2005 *************** *** 20,25 **** --- 20,27 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/smtp/smtp_connect.c ./src/smtp/smtp_connect.c *** /var/tmp/postfix-2.2.2/src/smtp/smtp_connect.c Thu Feb 10 07:29:03 2005 --- ./src/smtp/smtp_connect.c Fri Apr 29 16:40:47 2005 *************** *** 561,569 **** (*(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 --- 561,566 ---- *************** *** 588,594 **** --- 585,595 ---- /* 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,706 **** --- 700,715 ---- * * 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: diff -cr /var/tmp/postfix-2.2.2/src/smtp/smtp_proto.c ./src/smtp/smtp_proto.c *** /var/tmp/postfix-2.2.2/src/smtp/smtp_proto.c Tue Mar 22 13:47:18 2005 --- ./src/smtp/smtp_proto.c Sat Apr 2 16:22:50 2005 *************** *** 1411,1418 **** vstring_str(session->scratch), VSTRING_LEN(session->scratch)); if (mime_errs) { ! smtp_mesg_fail(state, 554, ! "MIME 7-bit conversion failed: %s", mime_state_error(mime_errs)); RETURN(0); } --- 1411,1417 ---- vstring_str(session->scratch), VSTRING_LEN(session->scratch)); if (mime_errs) { ! smtp_mesg_fail(state, 554, "%s", mime_state_error(mime_errs)); RETURN(0); } *************** *** 1429,1440 **** * ending in newline via /usr/sbin/sendmail while MIME input * processing is turned off, and MIME 8bit->7bit conversion * is requested upon delivery. */ 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", mime_state_error(mime_errs)); RETURN(0); } --- 1428,1440 ---- * 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, "%s", mime_state_error(mime_errs)); RETURN(0); } diff -cr /var/tmp/postfix-2.2.2/src/smtp/smtp_sasl_glue.c ./src/smtp/smtp_sasl_glue.c *** /var/tmp/postfix-2.2.2/src/smtp/smtp_sasl_glue.c Fri Aug 27 21:25:32 2004 --- ./src/smtp/smtp_sasl_glue.c Wed Apr 13 10:09:53 2005 *************** *** 412,418 **** */ memset(&sec_props, 0L, sizeof(sec_props)); sec_props.min_ssf = 0; ! sec_props.max_ssf = 1; /* don't allow real SASL * security layer */ sec_props.security_flags = name_mask(sasl_opts_name, smtp_sasl_sec_mask, sasl_opts_val); --- 412,418 ---- */ memset(&sec_props, 0L, sizeof(sec_props)); sec_props.min_ssf = 0; ! 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); diff -cr /var/tmp/postfix-2.2.2/src/smtpd/Makefile.in ./src/smtpd/Makefile.in *** /var/tmp/postfix-2.2.2/src/smtpd/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/smtpd/Makefile.in Fri Apr 29 17:12:28 2005 *************** *** 21,26 **** --- 21,28 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/smtpd/smtpd_sasl_glue.c ./src/smtpd/smtpd_sasl_glue.c *** /var/tmp/postfix-2.2.2/src/smtpd/smtpd_sasl_glue.c Mon Feb 28 13:04:30 2005 --- ./src/smtpd/smtpd_sasl_glue.c Wed Apr 13 10:09:59 2005 *************** *** 289,295 **** */ memset(&sec_props, 0, sizeof(sec_props)); sec_props.min_ssf = 0; ! sec_props.max_ssf = 1; /* don't allow real SASL * security layer */ sec_props.security_flags = name_mask(sasl_opts_name, smtpd_sasl_mask, sasl_opts_val); --- 289,295 ---- */ memset(&sec_props, 0, sizeof(sec_props)); sec_props.min_ssf = 0; ! 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); diff -cr /var/tmp/postfix-2.2.2/src/smtpstone/Makefile.in ./src/smtpstone/Makefile.in *** /var/tmp/postfix-2.2.2/src/smtpstone/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/smtpstone/Makefile.in Fri Apr 29 17:12:31 2005 *************** *** 14,19 **** --- 14,21 ---- all: $(PROG) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/spawn/Makefile.in ./src/spawn/Makefile.in *** /var/tmp/postfix-2.2.2/src/spawn/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/spawn/Makefile.in Fri Apr 29 17:12:34 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/tls/Makefile.in ./src/tls/Makefile.in *** /var/tmp/postfix-2.2.2/src/tls/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/tls/Makefile.in Fri Apr 29 17:12:37 2005 *************** *** 24,29 **** --- 24,31 ---- all: $(LIB) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/tlsmgr/Makefile.in ./src/tlsmgr/Makefile.in *** /var/tmp/postfix-2.2.2/src/tlsmgr/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/tlsmgr/Makefile.in Fri Apr 29 17:12:40 2005 *************** *** 16,21 **** --- 16,23 ---- $(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 $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/trivial-rewrite/Makefile.in ./src/trivial-rewrite/Makefile.in *** /var/tmp/postfix-2.2.2/src/trivial-rewrite/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/trivial-rewrite/Makefile.in Fri Apr 29 17:12:43 2005 *************** *** 20,25 **** --- 20,27 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/util/Makefile.in ./src/util/Makefile.in *** /var/tmp/postfix-2.2.2/src/util/Makefile.in Fri Mar 11 10:14:00 2005 --- ./src/util/Makefile.in Fri Apr 29 17:12:46 2005 *************** *** 109,114 **** --- 109,116 ---- all: $(LIB) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/util/argv.c ./src/util/argv.c *** /var/tmp/postfix-2.2.2/src/util/argv.c Thu Dec 11 18:33:39 2003 --- ./src/util/argv.c Wed Apr 27 11:22:07 2005 *************** *** 23,28 **** --- 23,32 ---- /* /* 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: *************** *** 49,54 **** --- 53,62 ---- /* 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 *************** *** 176,179 **** --- 184,207 ---- * Trust that argvp->argc < argvp->len. */ 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; + } } diff -cr /var/tmp/postfix-2.2.2/src/util/argv.h ./src/util/argv.h *** /var/tmp/postfix-2.2.2/src/util/argv.h Tue Jan 18 20:22:17 2005 --- ./src/util/argv.h Wed Apr 27 11:03:46 2005 *************** *** 24,29 **** --- 24,30 ---- 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 *); diff -cr /var/tmp/postfix-2.2.2/src/util/dict_cdb.c ./src/util/dict_cdb.c *** /var/tmp/postfix-2.2.2/src/util/dict_cdb.c Wed Dec 8 18:58:06 2004 --- ./src/util/dict_cdb.c Sat Apr 9 19:16:02 2005 *************** *** 190,195 **** --- 190,204 ---- 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. */ diff -cr /var/tmp/postfix-2.2.2/src/util/sys_defs.h ./src/util/sys_defs.h *** /var/tmp/postfix-2.2.2/src/util/sys_defs.h Thu Feb 3 19:07:44 2005 --- ./src/util/sys_defs.h Wed Apr 13 10:07:32 2005 *************** *** 1290,1295 **** --- 1290,1304 ---- #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 + + /* * Making the ctype.h macros not more expensive than necessary. On some * systems, ctype.h misbehaves with non-ASCII and/or negative characters. */ diff -cr /var/tmp/postfix-2.2.2/src/verify/Makefile.in ./src/verify/Makefile.in *** /var/tmp/postfix-2.2.2/src/verify/Makefile.in Fri Mar 11 10:14:01 2005 --- ./src/verify/Makefile.in Fri Apr 29 17:12:49 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@ diff -cr /var/tmp/postfix-2.2.2/src/virtual/Makefile.in ./src/virtual/Makefile.in *** /var/tmp/postfix-2.2.2/src/virtual/Makefile.in Fri Mar 11 10:14:01 2005 --- ./src/virtual/Makefile.in Fri Apr 29 17:12:56 2005 *************** *** 15,20 **** --- 15,22 ---- $(PROG): $(OBJS) $(LIBS) $(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS) + $(OBJS): ../../conf/makedefs.out + Makefile: Makefile.in (cat ../../conf/makedefs.out $?) >$@