[exim-dev] [Bug 2552] smtp_check_spool_space: not checking w…

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: admin
Fecha:  
A: exim-dev
Asunto: [exim-dev] [Bug 2552] smtp_check_spool_space: not checking with SIZE parameter correctly
https://bugs.exim.org/show_bug.cgi?id=2552

Git Commit <git@???> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |git@???


--- Comment #1 from Git Commit <git@???> ---
Git commit:
https://git.exim.org/exim.git/commitdiff/dd6711f05c57e1e284306ccc9bb6cd6c926cea01

commit dd6711f05c57e1e284306ccc9bb6cd6c926cea01
Author:     Erik Lax <erik@???>
AuthorDate: Mon Apr 20 21:34:33 2020 +0100
Commit:     Jeremy Harris <jgh146exb@???>
CommitDate: Mon Apr 20 21:34:33 2020 +0100


    Fix spool space check to account for SIZE.  Bug 2552
---
 doc/doc-txt/ChangeLog | 5 +++++
 src/src/receive.c     | 4 ++--
 src/src/smtp_in.c     | 4 ++--
 3 files changed, 9 insertions(+), 4 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index edab6a8..3fb7ed8 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -167,6 +167,11 @@ JH/35 The dsearch lookup now requires that the directory
is an absolute path.
 JH/36 Bug 2554: Fix msg:defer event for the hosts_max_try_hardlimit case.
       Previously no event was raised.


+JH/37 Bug 2552: Fix the check on spool space during reception to use the SIZE
+      parameter supplied by the sender MAIL FROM command.  Previously it was
+      ignored, and only the check_spool_space option value for the required
+      leeway checked.
+


 Exim version 4.93
 -----------------
diff --git a/src/src/receive.c b/src/src/receive.c
index 2d88d64..f228169 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -270,8 +270,8 @@ if (check_spool_space > 0 || msg_size > 0 ||
check_spool_inodes > 0)
       "check_space = " PR_EXIM_ARITH "K inodes = %d msg_size = %d\n",
       space, inodes, check_spool_space, check_spool_inodes, msg_size);


-  if ((space >= 0 && space < check_spool_space) ||
-      (inodes >= 0 && inodes < check_spool_inodes))
+  if (  space >= 0 && space + msg_size / 1024 < check_spool_space
+     || inodes >= 0 && inodes < check_spool_inodes)
     {
     log_write(0, LOG_MAIN, "spool directory space check failed: space="
       PR_EXIM_ARITH " inodes=%d", space, inodes);
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 2c54a4c..1c02eb5 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -4861,8 +4861,8 @@ while (done <= 0)
       and EXPN etc. to be used when space is short. */


       if (!receive_check_fs(
-       (smtp_check_spool_space && message_size >= 0)?
-          message_size + 5000 : 0))
+       smtp_check_spool_space && message_size >= 0
+          ? message_size + 5000 : 0))
     {
     smtp_printf("452 Space shortage, please try later\r\n", FALSE);
     sender_address = NULL;


--
You are receiving this mail because:
You are on the CC list for the bug.