summaryrefslogtreecommitdiffstats
path: root/src/global
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-12 16:10:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-12-12 16:10:49 +0000
commit4bf2526f886d71a067a1004ee5be2b75d0f721f7 (patch)
tree6d07da5e11537220569c748c2af66ae9db991d15 /src/global
parentReleasing progress-linux version 3.9.0-2~progress7.99u1. (diff)
downloadpostfix-4bf2526f886d71a067a1004ee5be2b75d0f721f7.tar.xz
postfix-4bf2526f886d71a067a1004ee5be2b75d0f721f7.zip
Merging upstream version 3.9.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--src/global/mail_version.h4
-rw-r--r--src/global/maillog_client.c19
2 files changed, 17 insertions, 6 deletions
diff --git a/src/global/mail_version.h b/src/global/mail_version.h
index 9e08896..bbd5d21 100644
--- a/src/global/mail_version.h
+++ b/src/global/mail_version.h
@@ -20,8 +20,8 @@
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20240306"
-#define MAIL_VERSION_NUMBER "3.9"
+#define MAIL_RELEASE_DATE "20241204"
+#define MAIL_VERSION_NUMBER "3.9.1"
#ifdef SNAPSHOT
#define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
diff --git a/src/global/maillog_client.c b/src/global/maillog_client.c
index 34952ef..a6e8436 100644
--- a/src/global/maillog_client.c
+++ b/src/global/maillog_client.c
@@ -120,6 +120,7 @@ static int maillog_client_flags;
static void maillog_client_logwriter_fallback(const char *text)
{
static int fallback_guard = 0;
+ static VSTREAM *fp;
/*
* Guard against recursive calls.
@@ -129,10 +130,20 @@ static void maillog_client_logwriter_fallback(const char *text)
* logfile. All we can do is to hope that stderr logging will bring out
* the bad news.
*/
- if (fallback_guard == 0 && var_maillog_file && *var_maillog_file
- && logwriter_one_shot(var_maillog_file, text, strlen(text)) < 0) {
- fallback_guard = 1;
- msg_fatal("logfile '%s' write error: %m", var_maillog_file);
+ if (fallback_guard++ == 0 && var_maillog_file && *var_maillog_file) {
+ if (text == 0 && fp != 0) {
+ (void) vstream_fclose(fp);
+ fp = 0;
+ }
+ if (fp == 0) {
+ fp = logwriter_open_or_die(var_maillog_file);
+ close_on_exec(vstream_fileno(fp), CLOSE_ON_EXEC);
+ }
+ if (text && (logwriter_write(fp, text, strlen(text)) != 0 ||
+ vstream_fflush(fp) != 0)) {
+ msg_fatal("logfile '%s' write error: %m", var_maillog_file);
+ }
+ fallback_guard = 0;
}
}