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.
}
$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)
#endif
mail_stream_ctl(state->handle,
MAIL_STREAM_CTL_QUEUE, state->queue_name,
- MAIL_STREAM_CTL_CLASS, 0,
- MAIL_STREAM_CTL_SERVICE, 0,
+ MAIL_STREAM_CTL_CLASS, (char *) 0,
+ MAIL_STREAM_CTL_SERVICE, (char *) 0,
#ifdef DELAY_ACTION
MAIL_STREAM_CTL_DELAY, state->defer_delay,
#endif
* 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"
+#define MAIL_RELEASE_DATE "20070423"
+#define MAIL_VERSION_NUMBER "2.3.9"
#ifdef SNAPSHOT
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
struct sigaction action;
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.
*/
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
* signal handler and really should not be doing complicated things...
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(multi_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(multi_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(multi_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(single_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(single_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(single_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(trigger_server_timeout, (char *) 0, time_left);
return;
msg_fatal("select unlock: %m");
if (fd < 0) {
if (errno != EAGAIN)
- msg_fatal("accept connection: %m");
+ msg_error("accept connection: %m");
if (time_left >= 0)
event_request_timer(trigger_server_timeout, (char *) 0, time_left);
return;
const char *errstr;
char *junk;
struct timeval start;
+ int saved_errno;
/*
* Be consistent with file permissions.
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)
+ /* 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)
* Finish the file.
*/
if ((status = mail_stream_finish(dst, (VSTRING *) 0)) != 0) {
- postdrop_cleanup();
msg_warn("uid=%ld: %m", (long) uid);
+ postdrop_cleanup();
}
/*