diff options
author | Erik Lax <erik@datahack.se> | 2020-04-20 21:34:33 +0100 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2020-04-20 21:34:33 +0100 |
commit | dd6711f05c57e1e284306ccc9bb6cd6c926cea01 (patch) | |
tree | 09296df6b0ae11c2255871b925054e84694090d4 | |
parent | b008f54f89a3e1a0aae0c301122820b87a84d21a (diff) |
Fix spool space check to account for SIZE. Bug 2552
-rw-r--r-- | doc/doc-txt/ChangeLog | 5 | ||||
-rw-r--r-- | src/src/receive.c | 4 | ||||
-rw-r--r-- | 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 edab6a829..3fb7ed8a9 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 2d88d6476..f22816920 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 2c54a4ccf..1c02eb5c8 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; |