Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Implement delete_processed_mail_files yes/no option for mailfiles spo…

…ols.
  • Loading branch information...
commit 8460bbf642f93d0eb42dd3cb802e91f5f60b8748 1 parent 9a5ab95
Daniel Vérité authored

Showing 2 changed files with 8 additions and 0 deletions. Show diff stats Hide diff stats

  1. +2 0  lib/Manitou/Config.pm
  2. +6 0 script/manitou-mdx
2  lib/Manitou/Config.pm
@@ -34,6 +34,7 @@ my %default_conf =
34 34 'auto_db_reconnect' => 'yes',
35 35 'alive_interval' => 60, # seconds
36 36 'body_format_flowed' => 'yes',
  37 + 'delete_processed_mail_files' => "no",
37 38 'detach_text_plain' => "yes",
38 39 'flush_word_index_interval' => 60*5,
39 40 'flush_word_index_max_queued' => 100,
@@ -61,6 +62,7 @@ my %conf_opts =
61 62 'auto_db_reconnect' => 'bool',
62 63 'body_format_flowed' => 'bool',
63 64 'db_connect_string' => 'string',
  65 + 'delete_processed_mail_files' => 'bool',
64 66 'detach_text_plain' => 'bool',
65 67 'exclude_contents' => 'string',
66 68 'incoming_check_interval' => 'integer',
6 script/manitou-mdx
@@ -289,6 +289,12 @@ sub import_mailfiles {
289 289 error_log("Failed to delete file $proc_filename: $!");
290 290 }
291 291 }
  292 + if ($ret>0 && $origin->{type} eq "dot-received" &&
  293 + getconf_bool("delete_processed_mail_files"), $mbox) {
  294 + if (!unlink($done)) {
  295 + error_log("Failed to delete file $done: $!");
  296 + }
  297 + }
292 298 }
293 299 }
294 300

0 comments on commit 8460bbf

Please sign in to comment.
Something went wrong with that request. Please try again.