--- a/src.quota-ignore Fri Apr 01 16:08:28 2011 +0200
+++ b/src.quota-ignore Fri Apr 01 16:36:54 2011 +0200
@@ -3,7 +3,7 @@
diff -r 525ee4a1a637 doc/spec.txt
--- a/doc/spec.txt Fri Apr 01 14:06:59 2011 +0200
-+++ b/doc/spec.txt Fri Apr 01 16:08:04 2011 +0200
++++ b/doc/spec.txt Fri Apr 01 16:33:35 2011 +0200
@@ -18340,6 +18340,9 @@
large file support (Linux and FreeBSD have this), mailboxes larger than 2G can
be handled.
@@ -26,7 +26,7 @@
+--------------------------------------------------------------+
diff -r 525ee4a1a637 src/transports/appendfile.c
--- a/src/transports/appendfile.c Fri Apr 01 14:06:59 2011 +0200
-+++ b/src/transports/appendfile.c Fri Apr 01 16:08:04 2011 +0200
++++ b/src/transports/appendfile.c Fri Apr 01 16:33:35 2011 +0200
@@ -237,7 +237,9 @@
FALSE, /* mailstore_format */
FALSE, /* mbx_format */
@@ -97,37 +97,51 @@
ob->quota_warn_threshold_value,
ob->quota_warn_threshold_is_percent? "%" : "",
isdirectory? "directory" : "file",
-@@ -2771,15 +2787,23 @@
- debug_printf(" file count quota = %d count = %d\n",
- ob->quota_filecount_value, mailbox_filecount);
+@@ -2773,18 +2789,31 @@
}
-- if (mailbox_size + (ob->quota_is_inclusive? message_size:0) > ob->quota_value)
-+ DEBUG(D_transport) {
-+ if (ob->quota_no_check)
-+ debug_printf("not checking quota (/no_check seen)\n");
-+ if (ob->quota_filecount_no_check)
-+ debug_printf("not checking quota filecount (/no_check seen)\n");
-+ }
-+ if (!ob->quota_no_check
-+ && mailbox_size + (ob->quota_is_inclusive? message_size:0) > ob->quota_value)
+ if (mailbox_size + (ob->quota_is_inclusive? message_size:0) > ob->quota_value)
{
- DEBUG(D_transport) debug_printf("mailbox quota exceeded\n");
- yield = DEFER;
- errno = ERRNO_EXIMQUOTA;
+- DEBUG(D_transport) debug_printf("mailbox quota exceeded\n");
+- yield = DEFER;
+- errno = ERRNO_EXIMQUOTA;
++ DEBUG(D_transport) if (ob->quota_no_check)
++ debug_printf("mailbox quota exceeded but ignored\n");
++
++ if (!ob->quota_no_check)
++ {
++ DEBUG(D_transport) debug_printf("mailbox quota exceeded\n");
++ yield = DEFER;
++ errno = ERRNO_EXIMQUOTA;
++ }
++
}
- else if (ob->quota_filecount_value > 0 &&
- mailbox_filecount + (ob->quota_is_inclusive ? 1:0) >
- ob->quota_filecount_value)
-+ else if (!ob->quota_filecount_no_check
-+ && ob->quota_filecount_value > 0
++ else if (ob->quota_filecount_value > 0
+ && mailbox_filecount + (ob->quota_is_inclusive ? 1:0) >
+ ob->quota_filecount_value)
{
- DEBUG(D_transport) debug_printf("mailbox file count quota exceeded\n");
- yield = DEFER;
+- DEBUG(D_transport) debug_printf("mailbox file count quota exceeded\n");
+- yield = DEFER;
+- errno = ERRNO_EXIMQUOTA;
+- filecount_msg = US" filecount";
++ DEBUG(D_transport) if (ob->quota_filecount_no_check)
++ debug_printf("mailbox file count quota exceeded but ignored\n");
++
++ if(!ob->quota_filecount_no_check)
++ {
++ DEBUG(D_transport) debug_printf("mailbox file count quota exceeded\n");
++ yield = DEFER;
++ errno = ERRNO_EXIMQUOTA;
++ filecount_msg = US" filecount";
++ }
+ }
+ }
+
diff -r 525ee4a1a637 src/transports/appendfile.h
--- a/src/transports/appendfile.h Fri Apr 01 14:06:59 2011 +0200
-+++ b/src/transports/appendfile.h Fri Apr 01 16:08:04 2011 +0200
++++ b/src/transports/appendfile.h Fri Apr 01 16:33:35 2011 +0200
@@ -72,6 +72,8 @@
BOOL mbx_format;
BOOL quota_warn_threshold_is_percent;