Enable locking for mbox folders
authorJamie Cameron <jcameron@webmin.com>
Wed, 25 Mar 2009 20:58:21 +0000 (20:58 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 25 Mar 2009 20:58:21 +0000 (20:58 +0000)
filter/filter-lib.pl

index d8adace..8f36889 100644 (file)
@@ -262,6 +262,11 @@ elsif ($filter->{'actionreply'}) {
 else {
        $recipe->{'type'} = $filter->{'actiontype'};
        $recipe->{'action'} = $filter->{'action'};
+       local $folder = &file_to_folder($filter->{'action'}, [ ], undef, 1);
+       if ($recipe->{'type'} eq '' && $folder->{'type'} == 1) {
+               # Enable locking for file delivery
+               $recipe->{'lockfile'} ||= "";
+               }
        }
 
 # Set flags