1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent f28044d5dcaf4418eb3c92fd325ce439c57cbab4 |
2 # Parent c61873df44aedd71ff4e40bc1067f8f03f6afd5b |
3 |
3 |
4 diff -r f28044d5dcaf doc/spec.txt |
4 diff -r c61873df44ae doc/spec.txt |
5 --- a/doc/spec.txt Tue May 17 16:17:21 2011 +0200 |
5 --- a/doc/spec.txt Tue May 17 16:24:29 2011 +0200 |
6 +++ b/doc/spec.txt Tue May 17 16:17:42 2011 +0200 |
6 +++ b/doc/spec.txt Fri May 20 11:48:11 2011 +0200 |
7 @@ -4,6 +4,16 @@ |
7 @@ -4,6 +4,16 @@ |
8 |
8 |
9 Copyright (c) 2011 University of Cambridge |
9 Copyright (c) 2011 University of Cambridge |
10 |
10 |
11 ++-------------------------------------------------------------------+ |
11 ++-------------------------------------------------------------------+ |
19 +The filename is taken relative to the mailir directory. |
19 +The filename is taken relative to the mailir directory. |
20 + |
20 + |
21 +-----------------------------------------------------------------------------+ |
21 +-----------------------------------------------------------------------------+ |
22 +-------------------------------------+--------------------------------+------+ |
22 +-------------------------------------+--------------------------------+------+ |
23 |Revision 4.76 |06 May 2011 |EM | |
23 |Revision 4.76 |06 May 2011 |EM | |
24 diff -r f28044d5dcaf src/transports/appendfile.c |
24 diff -r c61873df44ae src/transports/appendfile.c |
25 --- a/src/transports/appendfile.c Tue May 17 16:17:21 2011 +0200 |
25 --- a/src/transports/appendfile.c Tue May 17 16:24:29 2011 +0200 |
26 +++ b/src/transports/appendfile.c Tue May 17 16:17:42 2011 +0200 |
26 +++ b/src/transports/appendfile.c Fri May 20 11:48:11 2011 +0200 |
27 @@ -104,6 +104,8 @@ |
27 @@ -104,6 +104,8 @@ |
28 #ifdef SUPPORT_MAILDIR |
28 #ifdef SUPPORT_MAILDIR |
29 { "maildir_format", opt_bool, |
29 { "maildir_format", opt_bool, |
30 (void *)offsetof(appendfile_transport_options_block, maildir_format ) } , |
30 (void *)offsetof(appendfile_transport_options_block, maildir_format ) } , |
31 + { "maildir_overquota_file", opt_stringptr, |
31 + { "maildir_overquota_file", opt_stringptr, |
39 NULL, /* expand_maildir_use_size_file */ |
39 NULL, /* expand_maildir_use_size_file */ |
40 + NULL, /* maildir_overquota_file */ |
40 + NULL, /* maildir_overquota_file */ |
41 US"^(?:cur|new|\\..*)$", /* maildir_dir_regex */ |
41 US"^(?:cur|new|\\..*)$", /* maildir_dir_regex */ |
42 NULL, /* maildir_tag */ |
42 NULL, /* maildir_tag */ |
43 NULL, /* maildirfolder_create_regex */ |
43 NULL, /* maildirfolder_create_regex */ |
44 @@ -308,6 +311,7 @@ |
44 @@ -2778,9 +2781,10 @@ |
45 ob->maildir_use_size_file = expand_check_condition(ob->expand_maildir_use_size_file, |
|
46 US"`maildir_use_size_file` in transport", tblock->name); |
|
47 |
|
48 +//debug_printf("***>>>>>>>>>>>>> %s\n", ob->maildir_use_size_file); |
|
49 /* Loop for quota, quota_filecount, quota_warn_threshold, mailbox_size, |
|
50 mailbox_filecount */ |
|
51 |
|
52 @@ -2778,9 +2782,10 @@ |
|
53 is for the mailbox already being over quota (i.e. the current message is not |
45 is for the mailbox already being over quota (i.e. the current message is not |
54 included in the check). */ |
46 included in the check). */ |
55 |
47 |
56 -if (!disable_quota && ob->quota_value > 0) |
48 -if (!disable_quota && ob->quota_value > 0) |
57 +if (!disable_quota && (ob->quota_value > 0 || ob->quota_filecount_value > 0)) |
49 +if (!disable_quota && (ob->quota_value > 0 || ob->quota_filecount_value > 0)) |
60 + int overquota = 0; |
52 + int overquota = 0; |
61 + DEBUG(D_transport) |
53 + DEBUG(D_transport) |
62 { |
54 { |
63 debug_printf("Exim quota = " OFF_T_FMT " old size = " OFF_T_FMT |
55 debug_printf("Exim quota = " OFF_T_FMT " old size = " OFF_T_FMT |
64 " this message = %d (%sincluded)\n", |
56 " this message = %d (%sincluded)\n", |
65 @@ -2791,31 +2796,62 @@ |
57 @@ -2791,31 +2795,62 @@ |
66 } |
58 } |
67 if (mailbox_size + (ob->quota_is_inclusive? message_size:0) > ob->quota_value) |
59 if (mailbox_size + (ob->quota_is_inclusive? message_size:0) > ob->quota_value) |
68 { |
60 { |
69 - DEBUG(D_transport) if (ob->quota_no_check) |
61 - DEBUG(D_transport) if (ob->quota_no_check) |
70 - debug_printf("mailbox quota exceeded but ignored\n"); |
62 - debug_printf("mailbox quota exceeded but ignored\n"); |
138 + errno = _errno; |
130 + errno = _errno; |
139 + } |
131 + } |
140 } |
132 } |
141 } |
133 } |
142 |
134 |
143 diff -r f28044d5dcaf src/transports/appendfile.h |
135 diff -r c61873df44ae src/transports/appendfile.h |
144 --- a/src/transports/appendfile.h Tue May 17 16:17:21 2011 +0200 |
136 --- a/src/transports/appendfile.h Tue May 17 16:24:29 2011 +0200 |
145 +++ b/src/transports/appendfile.h Tue May 17 16:17:42 2011 +0200 |
137 +++ b/src/transports/appendfile.h Fri May 20 11:48:11 2011 +0200 |
146 @@ -24,6 +24,7 @@ |
138 @@ -24,6 +24,7 @@ |
147 uschar *mailbox_size_string; |
139 uschar *mailbox_size_string; |
148 uschar *mailbox_filecount_string; |
140 uschar *mailbox_filecount_string; |
149 uschar *expand_maildir_use_size_file; |
141 uschar *expand_maildir_use_size_file; |
150 + uschar *maildir_overquota_file; |
142 + uschar *maildir_overquota_file; |