The following small patch adds a size suffix to the file name a la
Maildir++. Interestingly, message_size does not seem to include headers.
Is there an easy way to get full message size?
A second patch that recognizes this suffix and uses it to avoid a stat()
would speed up Maildir quota calculation very much.
Michael
----------------------------------------------------------------------
--- appendfile.c.orig Mon Dec 13 15:51:39 1999
+++ appendfile.c Mon Dec 13 15:52:44 1999
@@ -1992,8 +1992,8 @@
for (i = 1;; i++)
{
- char *basename = string_sprintf("%lu.%lu.%s%s", time(NULL), getpid(),
- primary_hostname, tag);
+ char *basename = string_sprintf("%lu.%lu.%s,S=%d%s", time(NULL), getpid(),
+ primary_hostname, message_size, tag);
filename = dataname = string_sprintf("tmp/%s", basename);
newname = string_sprintf("new/%s", basename);