src.maildir_use_size_file
changeset 0 cdbb57192764
child 1 9f4d070abcf0
equal deleted inserted replaced
-1:000000000000 0:cdbb57192764
       
     1 # HG changeset patch
       
     2 # Parent d98fade4115f99c28d62e112e3f2e9e068a12642
       
     3 
       
     4 diff -r d98fade4115f doc/spec.txt
       
     5 --- a/doc/spec.txt	Fri Feb 11 23:27:39 2011 +0100
       
     6 +++ b/doc/spec.txt	Sat Feb 12 14:24:32 2011 +0100
       
     7 @@ -18180,10 +18180,11 @@
       
     8  section 26.5 below.
       
     9  
       
    10  +------------------------------------------------------------------+
       
    11 -|maildir_use_size_file|Use: appendfile|Type: boolean|Default: false|
       
    12 +|maildir_use_size_file|Use: appendfile|Type: boolean*|Default: false|
       
    13  +------------------------------------------------------------------+
       
    14  
       
    15 -Setting this option true enables support for maildirsize files. Exim creates a
       
    16 +The result of string expansion for this option must be a valid boolean value.
       
    17 +If it is true, it enables support for maildirsize files. Exim creates a
       
    18  maildirsize file in a maildir if one does not exist, taking the quota from the
       
    19  quota option of the transport. If quota is unset, the value is zero. See
       
    20  maildir_quota_directory_regex above and section 26.5 below for further details.
       
    21 diff -r d98fade4115f src/transports/appendfile.c
       
    22 --- a/src/transports/appendfile.c	Fri Feb 11 23:27:39 2011 +0100
       
    23 +++ b/src/transports/appendfile.c	Sat Feb 12 14:24:32 2011 +0100
       
    24 @@ -38,6 +38,10 @@
       
    25  opt_public flag. */
       
    26  
       
    27  optionlist appendfile_transport_options[] = {
       
    28 +#ifdef SUPPORT_MAILDIR
       
    29 +  { "*expand_maildir_use_size_file", opt_stringptr,
       
    30 +      (void *)offsetof(appendfile_transport_options_block, expand_maildir_use_size_file) },
       
    31 +#endif
       
    32    { "*set_use_fcntl_lock",opt_bool | opt_hidden,
       
    33        (void *)offsetof(appendfile_transport_options_block, set_use_fcntl) },
       
    34    { "*set_use_flock_lock",opt_bool | opt_hidden,
       
    35 @@ -105,7 +109,7 @@
       
    36        (void *)offsetof(appendfile_transport_options_block, maildir_retries) },
       
    37    { "maildir_tag",       opt_stringptr,
       
    38        (void *)offsetof(appendfile_transport_options_block, maildir_tag) },
       
    39 -  { "maildir_use_size_file", opt_bool,
       
    40 +  { "maildir_use_size_file", opt_expand_bool,
       
    41        (void *)offsetof(appendfile_transport_options_block, maildir_use_size_file ) } ,
       
    42    { "maildirfolder_create_regex", opt_stringptr,
       
    43        (void *)offsetof(appendfile_transport_options_block, maildirfolder_create_regex ) },
       
    44 @@ -184,6 +188,7 @@
       
    45    NULL,           /* quota_warn_threshold */
       
    46    NULL,           /* mailbox_size_string */
       
    47    NULL,           /* mailbox_filecount_string */
       
    48 +  NULL,           /* expand_maildir_use_size_file */ 
       
    49    US"^(?:cur|new|\\..*)$",  /* maildir_dir_regex */
       
    50    NULL,           /* maildir_tag */
       
    51    NULL,           /* maildirfolder_create_regex */
       
    52 @@ -272,6 +277,10 @@
       
    53  uid = uid;
       
    54  gid = gid;
       
    55  
       
    56 +if (ob->expand_maildir_use_size_file)
       
    57 +	ob->maildir_use_size_file = expand_check_condition(ob->expand_maildir_use_size_file, 
       
    58 +		US"`maildir_use_size_file` in transport", tblock->name);
       
    59 +
       
    60  /* Loop for quota, quota_filecount, quota_warn_threshold, mailbox_size,
       
    61  mailbox_filecount */
       
    62  
       
    63 diff -r d98fade4115f src/transports/appendfile.h
       
    64 --- a/src/transports/appendfile.h	Fri Feb 11 23:27:39 2011 +0100
       
    65 +++ b/src/transports/appendfile.h	Sat Feb 12 14:24:32 2011 +0100
       
    66 @@ -23,6 +23,7 @@
       
    67    uschar *quota_warn_threshold;
       
    68    uschar *mailbox_size_string;
       
    69    uschar *mailbox_filecount_string;
       
    70 +  uschar *expand_maildir_use_size_file;
       
    71    uschar *maildir_dir_regex;
       
    72    uschar *maildir_tag;
       
    73    uschar *maildirfolder_create_regex;