temporary. This problem was reported by Ankit Kulkarni.
Files: proto/postconf.proto global/mail_params.h milter/milter8.c.
+
+20251216
+
+ Logging: after a delivery failure, the bounce daemon logged
+ "<old-queue-id>: sender non-delivery notification:
+ <new-queue-id>" only if the notification was queued
+ successfully. If the notification could not be queued, the
+ bounce daemon did not log why. The only hint was in the
+ form of qmgr logging with "<old-queue-id>: status=deferred
+ (bounce failed)".
+
+ Visible changes for logfile analyzers:
+
+ - The bounce daemon now logs "<old-queue-id>: sender
+ non-delivery notification: <new-queue-id>" BEFORE the cleanup
+ daemon logs activity with "<new-queue-id>". Previously, the
+ bounce daemon logged the old<=>new queue ID connection
+ later, which made logfile analysis more difficult.
+
+ - The bounce daemon now logs a logfile record "<old-queue-id>:
+ sender notification failed to <address>: <reason>" when the
+ notification was not queued. In some cases it will log
+ "<old-queue-id>: sender notification failed to <address>".
+ In those cases the failure reason was already logged by
+ lower-level code, without the queue ID.
+
+ Files: bounce/bounce_notify_service.c, bounce/bounce_notify_verp.c,
+ bounce/bounce_one_service.c, bounce/bounce_trace_service.c,
+ bounce/bounce_warn_service.c.
+
+ TODO: unit test coverage.
makedefs bounce bounce c cleanup cleanup_init c
smtp smtp c smtpd smtpd c trivial rewrite trivial rewrite c
Files makedefs bounce bounce c cleanup cleanup_init c
+ Portability makedefs postalias postalias c util dict_debug c
nocertmatch
pgnd
jl
+Ankit
+Kulkarni
* reason for the bounce, and the headers of the original
* message. Don't bother sending the boiler-plate text.
*/
+ msg_info("%s: postmaster non-delivery notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (bounce_header(bounce, bounce_info, postmaster,
POSTMASTER_COPY) == 0
DSN_NOTIFY_OVERRIDE) > 0) {
bounce_original(bounce, bounce_info, DSN_RET_FULL);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: postmaster non-delivery notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: postmaster notification failed: %s",
+ queue_id, cleanup_strerror(bounce_status));
} else {
/* No applicable recipients found - cancel this notice. */
(void) vstream_fclose(bounce);
if (count == 0)
bounce_status = 0;
}
+ } else {
+ msg_warn("%s: postmaster notification failed", queue_id);
}
}
}
* pretends that we are a polite mail system, the text with
* reason for the bounce, and a copy of the original message.
*/
+ msg_info("%s: sender non-delivery notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (bounce_header(bounce, bounce_info, recipient,
NO_POSTMASTER_COPY) == 0
bounce_original(bounce, bounce_info, dsn_ret ?
dsn_ret : DSN_RET_FULL);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: sender non-delivery notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: sender notification failed to %s: %s",
+ queue_id, recipient,
+ cleanup_strerror(bounce_status));
} else {
/* No applicable recipients found - cancel this notice. */
(void) vstream_fclose(bounce);
if (count == 0)
bounce_status = 0;
}
+ } else {
+ msg_warn("%s: sender notification failed to %s",
+ queue_id, recipient);
}
/*
NULL_TRACE_FLAGS,
sendopts,
new_id)) != 0) {
+ msg_info("%s: postmaster non-delivery notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (bounce_header(bounce, bounce_info, postmaster,
POSTMASTER_COPY) == 0
DSN_NOTIFY_OVERRIDE) > 0) {
bounce_original(bounce, bounce_info, DSN_RET_HDRS);
postmaster_status = post_mail_fclose(bounce);
- if (postmaster_status == 0)
- msg_info("%s: postmaster non-delivery notification: %s",
- queue_id, STR(new_id));
} else {
/* No applicable recipients found - cancel this notice. */
(void) vstream_fclose(bounce);
* pretends that we are a polite mail system, the text with
* reason for the bounce, and a copy of the original message.
*/
+ msg_info("%s: sender non-delivery notification: %s",
+ queue_id, STR(new_id));
if (bounce_header(bounce, bounce_info, STR(verp_buf),
NO_POSTMASTER_COPY) == 0
&& bounce_boilerplate(bounce, bounce_info) == 0
bounce_original(bounce, bounce_info, dsn_ret ?
dsn_ret : DSN_RET_FULL);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: sender non-delivery notification: %s",
- queue_id, STR(new_id));
- } else
+ if (bounce_status)
+ msg_warn("%s: sender notification failed to %s: %s",
+ queue_id, STR(verp_buf),
+ cleanup_strerror(bounce_status));
+ } else {
+ msg_warn("%s: sender notification failed to %s",
+ queue_id, STR(verp_buf));
bounce_status = 1;
+ }
/*
* Stop at the first sign of trouble, instead of making the
NULL_TRACE_FLAGS,
sendopts,
new_id)) != 0) {
+ msg_info("%s: postmaster non-delivery notification: %s",
+ queue_id, STR(new_id));
if (bounce_header(bounce, bounce_info, postmaster,
POSTMASTER_COPY) == 0
&& bounce_recipient_log(bounce, bounce_info) == 0
&& bounce_recipient_dsn(bounce, bounce_info) == 0)
bounce_original(bounce, bounce_info, DSN_RET_HDRS);
postmaster_status = post_mail_fclose(bounce);
- if (postmaster_status == 0)
- msg_info("%s: postmaster non-delivery notification: %s",
- queue_id, STR(new_id));
} else
postmaster_status = 1;
* reason for the bounce, and the headers of the original
* message. Don't bother sending the boiler-plate text.
*/
+ msg_info("%s: postmaster non-delivery notification: %s",
+ queue_id, STR(new_id));
if (!bounce_header(bounce, bounce_info, var_2bounce_rcpt,
POSTMASTER_COPY)
&& bounce_recipient_log(bounce, bounce_info) == 0
&& bounce_recipient_dsn(bounce, bounce_info) == 0)
bounce_original(bounce, bounce_info, DSN_RET_FULL);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: postmaster non-delivery notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: postmaster notification failed: %s",
+ queue_id, cleanup_strerror(bounce_status));
+ } else {
+ msg_warn("%s: postmaster notification failed", queue_id);
}
}
}
* pretends that we are a polite mail system, the text with
* reason for the bounce, and a copy of the original message.
*/
+ msg_info("%s: sender non-delivery notification: %s",
+ queue_id, STR(new_id));
if (bounce_header(bounce, bounce_info, orig_sender,
NO_POSTMASTER_COPY) == 0
&& bounce_boilerplate(bounce, bounce_info) == 0
bounce_original(bounce, bounce_info, dsn_ret ?
dsn_ret : DSN_RET_FULL);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: sender non-delivery notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: sender notification failed to %s: %s",
+ queue_id, orig_sender,
+ cleanup_strerror(bounce_status));
+ } else {
+ msg_warn("%s: sender notification failed to %s",
+ queue_id, orig_sender);
}
}
NULL_TRACE_FLAGS,
sendopts,
new_id)) != 0) {
+ msg_info("%s: postmaster non-delivery notification: %s",
+ queue_id, STR(new_id));
if (bounce_header(bounce, bounce_info, var_bounce_rcpt,
POSTMASTER_COPY) == 0
&& bounce_recipient_log(bounce, bounce_info) == 0
&& bounce_recipient_dsn(bounce, bounce_info) == 0)
bounce_original(bounce, bounce_info, DSN_RET_HDRS);
postmaster_status = post_mail_fclose(bounce);
- if (postmaster_status == 0)
- msg_info("%s: postmaster non-delivery notification: %s",
- queue_id, STR(new_id));
}
if (postmaster_status)
msg_warn("%s: postmaster notice failed while bouncing to %s",
NULL_TRACE_FLAGS,
sendopts,
new_id)) != 0) {
+ msg_info("%s: sender delivery status notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (bounce_header(bounce, bounce_info, recipient,
NO_POSTMASTER_COPY) == 0
DSN_NOTIFY_OVERRIDE) > 0) {
bounce_original(bounce, bounce_info, DSN_RET_HDRS);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: sender delivery status notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: sender notification failed to %s: %s",
+ queue_id, recipient,
+ cleanup_strerror(bounce_status));
} else {
(void) vstream_fclose(bounce);
if (count == 0)
bounce_status = 0;
}
+ } else {
+ msg_warn("%s: sender notification failed to %s",
+ queue_id, recipient);
}
/*
* reason for the bounce, and the headers of the original
* message. Don't bother sending the boiler-plate text.
*/
+ msg_info("%s: postmaster delay notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (!bounce_header(bounce, bounce_info, postmaster,
POSTMASTER_COPY)
DSN_NOTIFY_OVERRIDE) > 0) {
bounce_original(bounce, bounce_info, DSN_RET_FULL);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: postmaster delay notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: postmaster notification failed: %s",
+ queue_id, cleanup_strerror(bounce_status));
} else {
(void) vstream_fclose(bounce);
if (count == 0)
bounce_status = 0;
}
+ } else {
+ msg_warn("%s: postmaster notification failed", queue_id);
}
}
}
* pretends that we are a polite mail system, the text with
* reason for the bounce, and a copy of the original message.
*/
+ msg_info("%s: sender delay notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (bounce_header(bounce, bounce_info, recipient,
NO_POSTMASTER_COPY) == 0
DSN_NOTIFY_DELAY) > 0) {
bounce_original(bounce, bounce_info, DSN_RET_HDRS);
bounce_status = post_mail_fclose(bounce);
- if (bounce_status == 0)
- msg_info("%s: sender delay notification: %s",
- queue_id, STR(new_id));
+ if (bounce_status)
+ msg_warn("%s: sender notification failed to %s: %s",
+ queue_id, recipient,
+ cleanup_strerror(bounce_status));
} else {
(void) vstream_fclose(bounce);
if (count == 0)
bounce_status = 0;
}
+ } else {
+ msg_warn("%s: sender notification failed to %s",
+ queue_id, recipient);
}
/*
NULL_TRACE_FLAGS,
sendopts,
new_id)) != 0) {
+ msg_info("%s: postmaster delay notification: %s",
+ queue_id, STR(new_id));
count = -1;
if (bounce_header(bounce, bounce_info, postmaster,
POSTMASTER_COPY) == 0
DSN_NOTIFY_OVERRIDE) > 0) {
bounce_original(bounce, bounce_info, DSN_RET_HDRS);
postmaster_status = post_mail_fclose(bounce);
- if (postmaster_status == 0)
- msg_info("%s: postmaster delay notification: %s",
- queue_id, STR(new_id));
} else {
(void) vstream_fclose(bounce);
if (count == 0)
msg_info("%s: status=deferred (%s failed)", ap->id,
ap->command == BOUNCE_CMD_FLUSH ? "bounce" :
ap->command == BOUNCE_CMD_WARN ? "delay warning" :
- ap->command == BOUNCE_CMD_VERP ? "verp" :
+ ap->command == BOUNCE_CMD_VERP ? "bounce" :
ap->command == BOUNCE_CMD_TRACE ? "trace" :
"whatever");
ap->callback(status, ap->context);
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20251208"
+#define MAIL_RELEASE_DATE "20251217"
#define MAIL_VERSION_NUMBER "3.11"
#ifdef SNAPSHOT