Deliver to $DEFAULT when default delivery is selected
authorJamie Cameron <jcameron@webmin.com>
Wed, 25 Apr 2007 05:21:20 +0000 (05:21 +0000)
committerJamie Cameron <jcameron@webmin.com>
Wed, 25 Apr 2007 05:21:20 +0000 (05:21 +0000)
spam/edit_procmail.cgi
spam/save_procmail.cgi
spam/setup.cgi

index f790cc8..470b948 100755 (executable)
@@ -17,6 +17,9 @@ $spamrec = &find_file_recipe(\@recipes);
 if (!$spamrec) {
        $mode = 4;
        }
+elsif ($spamrec->{'action'} eq "\$DEFAULT") {
+       $mode = 4;
+       }
 elsif ($spamrec->{'action'} eq "/dev/null") {
        $mode = 0;
        }
index 405b3d0..a9d3826 100755 (executable)
@@ -23,6 +23,9 @@ elsif ($in{'to'} == 3) {
        $in{'mhdir'} =~ /^\S+$/ || &error($text{'setup_emhdir'});
        $file = "$in{'mhdir'}/.";
        }
+elsif ($in{'to'} == 4) {
+       $file = "\$DEFAULT";
+       }
 elsif ($in{'to'} == 5) {
        $in{'email'} =~ /^\S+$/ || &error($text{'setup_eemail'});
        $file = $in{'email'};
index 2c72718..e4232ef 100755 (executable)
@@ -24,6 +24,9 @@ elsif ($in{'to'} == 3) {
        $in{'mhdir'} =~ /^\S+$/ || &error($text{'setup_emhdir'});
        $file = "$in{'mhdir'}/.";
        }
+elsif ($in{'to'} == 4) {
+       $file = "\$DEFAULT";
+       }
 elsif ($in{'to'} == 5) {
        $in{'email'} =~ /^\S+$/ || &error($text{'setup_eemail'});
        $file = $in{'email'};