Prereq: "2.3.8" diff -cr /var/tmp/postfix-2.3.8/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-2.3.8/src/global/mail_version.h Fri Mar 2 12:36:10 2007 --- ./src/global/mail_version.h Mon Apr 23 20:08:11 2007 *************** *** 20,27 **** * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ ! #define MAIL_RELEASE_DATE "20070301" ! #define MAIL_VERSION_NUMBER "2.3.8" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE --- 20,27 ---- * Patches change both the patchlevel and the release date. Snapshots have no * patchlevel; they change the release date only. */ ! #define MAIL_RELEASE_DATE "20070423" ! #define MAIL_VERSION_NUMBER "2.3.9" #ifdef SNAPSHOT # define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE diff -cr /var/tmp/postfix-2.3.8/HISTORY ./HISTORY *** /var/tmp/postfix-2.3.8/HISTORY Sun Feb 25 09:47:30 2007 --- ./HISTORY Mon Apr 23 20:08:47 2007 *************** *** 12961,12963 **** --- 12961,12988 ---- Duchovni, Morgan Stanley. Files: src/smtp/smtp_proto.c, src/smtpd/smtpd.c, src/tls/tls.h, src/tls/tls_client.c, src/tls/tls_misc.c and src/tls/tls_server.c. + + 20070306 + + Workaround: on some FreeBSD versions, accept(2) can fail + with a bogus EINVAL error. We now allow accept(2) to fail + for a limited number of times before terminating the process. + Files: master/single_server.c, master/multi_server.c. + Back-ported from Postfix 2.4. + + Bugfix (introduced with Postfix 2.3 Milter support): postdrop + reported "illegal seek" instead of "file too large". File: + postdrop/postdrop.c. Back-ported from Postfix 2.4. + + 20070331 + + Bugfix (introduced Postfix 2.3): segfault with HOLD action + in access/header_checks/body_checks on 64-bit platforms. + File: cleanup/cleanup_api.c. Back-ported from Postfix 2.4. + + 20070421 + + Workaround: on (Linux) platforms that cripple signal handlers + with deadlock, "postfix stop" forcefully stops all processes + in the master's process group. Files: conf/postfix-script, + master/master_sig.c. Back-ported from Postfix 2.4. diff -cr /var/tmp/postfix-2.3.8/conf/postfix-script ./conf/postfix-script *** /var/tmp/postfix-2.3.8/conf/postfix-script Thu Feb 3 20:05:21 2005 --- ./conf/postfix-script Mon Apr 23 19:59:28 2007 *************** *** 129,134 **** --- 129,143 ---- } $INFO stopping the Postfix mail system kill `sed 1q pid/master.pid` + for i in 5 4 3 2 1 + do + $daemon_directory/master -t && exit 0 + $INFO waiting for the Postfix mail system to terminate + sleep 1 + done + $WARN stopping the Postfix mail system with force + pid=`awk '{ print $1; exit 0 } END { exit 1 }' pid/master.pid` && + kill -9 -$pid ;; abort) diff -cr /var/tmp/postfix-2.3.8/src/cleanup/cleanup_api.c ./src/cleanup/cleanup_api.c *** /var/tmp/postfix-2.3.8/src/cleanup/cleanup_api.c Thu Jun 15 14:07:15 2006 --- ./src/cleanup/cleanup_api.c Sat Mar 31 13:07:35 2007 *************** *** 289,296 **** #endif mail_stream_ctl(state->handle, MAIL_STREAM_CTL_QUEUE, state->queue_name, ! MAIL_STREAM_CTL_CLASS, 0, ! MAIL_STREAM_CTL_SERVICE, 0, #ifdef DELAY_ACTION MAIL_STREAM_CTL_DELAY, state->defer_delay, #endif --- 289,296 ---- #endif mail_stream_ctl(state->handle, MAIL_STREAM_CTL_QUEUE, state->queue_name, ! MAIL_STREAM_CTL_CLASS, (char *) 0, ! MAIL_STREAM_CTL_SERVICE, (char *) 0, #ifdef DELAY_ACTION MAIL_STREAM_CTL_DELAY, state->defer_delay, #endif diff -cr /var/tmp/postfix-2.3.8/src/master/master_sig.c ./src/master/master_sig.c *** /var/tmp/postfix-2.3.8/src/master/master_sig.c Thu Jun 15 14:07:15 2006 --- ./src/master/master_sig.c Mon Apr 23 20:03:07 2007 *************** *** 173,185 **** pid_t pid = getpid(); /* - * XXX We're running from a signal handler, and really should not call - * any msg() routines at all, but it would be even worse to silently - * terminate without informing the sysadmin. - */ - msg_info("terminating on signal %d", sig); - - /* * Terminate all processes in our process group, except ourselves. */ sigemptyset(&action.sa_mask); --- 173,178 ---- *************** *** 189,194 **** --- 182,194 ---- msg_fatal("%s: sigaction: %m", myname); if (kill(-pid, SIGTERM) < 0) msg_fatal("%s: kill process group: %m", myname); + + /* + * XXX We're running from a signal handler, and really should not call + * any msg() routines at all, but it would be even worse to silently + * terminate without informing the sysadmin. + */ + msg_info("terminating on signal %d", sig); /* * Deliver the signal to ourselves and clean up. XXX We're running as a diff -cr /var/tmp/postfix-2.3.8/src/master/multi_server.c ./src/master/multi_server.c *** /var/tmp/postfix-2.3.8/src/master/multi_server.c Fri Jun 30 11:28:52 2006 --- ./src/master/multi_server.c Tue Mar 6 12:59:13 2007 *************** *** 372,378 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(multi_server_timeout, (char *) 0, time_left); return; --- 372,378 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(multi_server_timeout, (char *) 0, time_left); return; *************** *** 409,415 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(multi_server_timeout, (char *) 0, time_left); return; --- 409,415 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(multi_server_timeout, (char *) 0, time_left); return; *************** *** 446,452 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(multi_server_timeout, (char *) 0, time_left); return; --- 446,452 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(multi_server_timeout, (char *) 0, time_left); return; diff -cr /var/tmp/postfix-2.3.8/src/master/single_server.c ./src/master/single_server.c *** /var/tmp/postfix-2.3.8/src/master/single_server.c Fri Jun 30 11:28:52 2006 --- ./src/master/single_server.c Tue Mar 6 12:59:20 2007 *************** *** 290,296 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(single_server_timeout, (char *) 0, time_left); return; --- 290,296 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(single_server_timeout, (char *) 0, time_left); return; *************** *** 326,332 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(single_server_timeout, (char *) 0, time_left); return; --- 326,332 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(single_server_timeout, (char *) 0, time_left); return; *************** *** 362,368 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(single_server_timeout, (char *) 0, time_left); return; --- 362,368 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(single_server_timeout, (char *) 0, time_left); return; diff -cr /var/tmp/postfix-2.3.8/src/master/trigger_server.c ./src/master/trigger_server.c *** /var/tmp/postfix-2.3.8/src/master/trigger_server.c Fri Jun 30 11:28:52 2006 --- ./src/master/trigger_server.c Tue Mar 6 12:59:29 2007 *************** *** 313,319 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(trigger_server_timeout, (char *) 0, time_left); return; --- 313,319 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(trigger_server_timeout, (char *) 0, time_left); return; *************** *** 359,365 **** msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_fatal("accept connection: %m"); if (time_left >= 0) event_request_timer(trigger_server_timeout, (char *) 0, time_left); return; --- 359,365 ---- msg_fatal("select unlock: %m"); if (fd < 0) { if (errno != EAGAIN) ! msg_error("accept connection: %m"); if (time_left >= 0) event_request_timer(trigger_server_timeout, (char *) 0, time_left); return; diff -cr /var/tmp/postfix-2.3.8/src/postdrop/postdrop.c ./src/postdrop/postdrop.c *** /var/tmp/postfix-2.3.8/src/postdrop/postdrop.c Sat May 6 20:03:46 2006 --- ./src/postdrop/postdrop.c Tue Mar 6 12:42:47 2007 *************** *** 229,234 **** --- 229,235 ---- const char *errstr; char *junk; struct timeval start; + int saved_errno; /* * Be consistent with file permissions. *************** *** 425,433 **** continue; } if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) { ! while ((rec_type = rec_get(VSTREAM_IN, buf, var_line_limit)) > 0 ! && rec_type != REC_TYPE_END) /* void */ ; break; } if (rec_type == REC_TYPE_END) --- 426,437 ---- continue; } if (REC_PUT_BUF(dst->stream, rec_type, buf) < 0) { ! /* rec_get() errors must not clobber errno. */ ! saved_errno = errno; ! while (rec_get_raw(VSTREAM_IN, buf, var_line_limit, ! REC_FLAG_NONE) > 0) /* void */ ; + errno = saved_errno; break; } if (rec_type == REC_TYPE_END) *************** *** 439,446 **** * Finish the file. */ if ((status = mail_stream_finish(dst, (VSTRING *) 0)) != 0) { - postdrop_cleanup(); msg_warn("uid=%ld: %m", (long) uid); } /* --- 443,450 ---- * Finish the file. */ if ((status = mail_stream_finish(dst, (VSTRING *) 0)) != 0) { msg_warn("uid=%ld: %m", (long) uid); + postdrop_cleanup(); } /*