Make maildir_use_size_file expandable.
[exim.git] / src / src / transports / appendfile.c
index a9283f696b08432554db0553b021140fe1c12fce..11c59bb0b96b1d1c93088def9cc2ce7be3efa38f 100644 (file)
@@ -36,6 +36,10 @@ stored in the publicly visible instance block - these are flagged with the
 opt_public flag. */
 
 optionlist appendfile_transport_options[] = {
+#ifdef SUPPORT_MAILDIR
+  { "*expand_maildir_use_size_file", opt_stringptr,
+      (void *)offsetof(appendfile_transport_options_block, expand_maildir_use_size_file) },
+#endif
   { "*set_use_fcntl_lock",opt_bool | opt_hidden,
       (void *)offsetof(appendfile_transport_options_block, set_use_fcntl) },
   { "*set_use_flock_lock",opt_bool | opt_hidden,
@@ -103,7 +107,7 @@ optionlist appendfile_transport_options[] = {
       (void *)offsetof(appendfile_transport_options_block, maildir_retries) },
   { "maildir_tag",       opt_stringptr,
       (void *)offsetof(appendfile_transport_options_block, maildir_tag) },
-  { "maildir_use_size_file", opt_bool,
+  { "maildir_use_size_file", opt_expand_bool,
       (void *)offsetof(appendfile_transport_options_block, maildir_use_size_file ) } ,
   { "maildirfolder_create_regex", opt_stringptr,
       (void *)offsetof(appendfile_transport_options_block, maildirfolder_create_regex ) },
@@ -182,6 +186,7 @@ appendfile_transport_options_block appendfile_transport_option_defaults = {
   NULL,           /* quota_warn_threshold */
   NULL,           /* mailbox_size_string */
   NULL,           /* mailbox_filecount_string */
+  NULL,           /* expand_maildir_use_size_file */ 
   US"^(?:cur|new|\\..*)$",  /* maildir_dir_regex */
   NULL,           /* maildir_tag */
   NULL,           /* maildirfolder_create_regex */
@@ -270,6 +275,10 @@ dummy = dummy;
 uid = uid;
 gid = gid;
 
+if (ob->expand_maildir_use_size_file)
+       ob->maildir_use_size_file = expand_check_condition(ob->expand_maildir_use_size_file, 
+               US"`maildir_use_size_file` in transport", tblock->name);
+
 /* Loop for quota, quota_filecount, quota_warn_threshold, mailbox_size,
 mailbox_filecount */