]> git.pld-linux.org Git - packages/exim.git/commitdiff
- rel 3; update git branch; fixes bug 1891 auto/th/exim-4.92-3
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 6 Apr 2019 10:28:18 +0000 (12:28 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sat, 6 Apr 2019 10:28:18 +0000 (12:28 +0200)
exim-bug-1891.patch [new file with mode: 0644]
exim.spec

diff --git a/exim-bug-1891.patch b/exim-bug-1891.patch
new file mode 100644 (file)
index 0000000..e5597f4
--- /dev/null
@@ -0,0 +1,64 @@
+commit 3c55eef24050cec9e50e98e2f5fc12cd45f1ef8a
+Author: Jeremy Harris <jgh146exb@wizmail.org>
+Date:   Fri Apr 5 15:22:20 2019 +0100
+
+    Logging: close logfile when non-smtp input is taking a long time.  Bug 1891
+
+diff --git a/src/src/receive.c b/src/src/receive.c
+index 0cb38626..64f62757 100644
+--- a/src/src/receive.c
++++ b/src/src/receive.c
+@@ -571,6 +571,30 @@ return FALSE;
++/* Pause for a while waiting for input.  If none received in that time,
++close the logfile, if we had one open; then if we wait for a long-running
++datasource (months, in one use-case) log rotation will not leave us holding
++the file copy. */
++
++static void
++log_close_chk(void)
++{
++if (!receive_timeout)
++  {
++  struct timeval t;
++  timesince(&t, &received_time);
++  if (t.tv_sec > 30*60)
++    mainlog_close();
++  else
++    {
++    fd_set r;
++    FD_ZERO(&r); FD_SET(0, &r);
++    t.tv_sec = 30*60 - t.tv_sec; t.tv_usec = 0;
++    if (select(1, &r, NULL, NULL, &t) == 0) mainlog_close();
++    }
++  }
++}
++
+ /*************************************************
+ *     Read data portion of a non-SMTP message    *
+ *************************************************/
+@@ -619,9 +643,11 @@ register int linelength = 0;
+ if (!f.dot_ends)
+   {
+-  register int last_ch = '\n';
++  int last_ch = '\n';
+-  for (; (ch = (receive_getc)(GETC_BUFFER_UNLIMITED)) != EOF; last_ch = ch)
++  for ( ;
++       log_close_chk(), (ch = (receive_getc)(GETC_BUFFER_UNLIMITED)) != EOF;
++       last_ch = ch)
+     {
+     if (ch == 0) body_zerocount++;
+     if (last_ch == '\r' && ch != '\n')
+@@ -663,7 +689,7 @@ if (!f.dot_ends)
+ ch_state = 1;
+-while ((ch = (receive_getc)(GETC_BUFFER_UNLIMITED)) != EOF)
++while (log_close_chk(), (ch = (receive_getc)(GETC_BUFFER_UNLIMITED)) != EOF)
+   {
+   if (ch == 0) body_zerocount++;
+   switch (ch_state)
index 38a810ff38e593faeab7c6e5983fa5ad41678a7a..cdba6b68c1b0fc6048e5f3564d5955faa0772104 100644 (file)
--- a/exim.spec
+++ b/exim.spec
@@ -25,7 +25,7 @@ Summary(pl.UTF-8):    Agent Transferu Poczty Uniwersytetu w Cambridge
 Summary(pt_BR.UTF-8):  Servidor de correio eletrônico exim
 Name:          exim
 Version:       4.92
-Release:       2
+Release:       3
 Epoch:         2
 License:       GPL
 Group:         Networking/Daemons/SMTP
@@ -51,7 +51,7 @@ Source15:     %{name}4-smtp.pamd
 Source16:      %{name}on.png
 # sh branch.sh
 Patch100:      %{name}-git.patch
-# Patch100-md5:        56f4bdc1806cbadf2b2a0abad6edf956
+# Patch100-md5:        c977ead09cc58ce7cdba59a6183f6c69
 Patch0:                %{name}4-EDITME.patch
 Patch1:                %{name}4-monitor-EDITME.patch
 Patch2:                %{name}4-cflags.patch
@@ -59,6 +59,7 @@ Patch3:               exim-defs.patch
 Patch4:                %{name}4-Makefile-Default.patch
 # http://marc.merlins.org/linux/exim/files/sa-exim-cvs/localscan_dlopen_exim_4.20_or_better.patch
 Patch5:                localscan_dlopen_%{name}_4.20_or_better.patch
+Patch6:                exim-bug-1891.patch
 
 Patch8:                %{name}-spam-timeout.patch
 
@@ -184,6 +185,7 @@ Pliki nagłówkowe dla Exima.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p2
 
 %patch8 -p1
 
This page took 0.322799 seconds and 4 git commands to generate.