#!/usr/local/bin/perl # Allow changing of the rule for delivering spam require './spam-lib.pl'; &can_use_check("procmail"); &ui_print_header(undef, $text{'procmail_title'}, ""); print &text('procmail_desc', "$pmrc"),"
\n"; # Find the existing recipe &foreign_require("procmail", "procmail-lib.pl"); @pmrcs = &get_procmailrc(); $pmrc = $pmrcs[$#pmrcs]; @recipes = &procmail::parse_procmail_file($pmrc); $spamrec = &find_file_recipe(\@recipes); if (!$spamrec) { $mode = 4; } elsif ($spamrec->{'action'} eq "\$DEFAULT") { $mode = 4; } elsif ($spamrec->{'action'} eq "/dev/null") { $mode = 0; } elsif ($spamrec->{'action'} =~ /^(.*)\/$/) { $mode = 2; $file = $1; } elsif ($spamrec->{'action'} =~ /^(.*)\/\.$/) { $mode = 3; $file = $1; } elsif ($spamrec->{'type'} eq '!') { $mode = 5; $email = $spamrec->{'action'}; } else { $mode = 1; $file = $spamrec->{'action'}; } print "
\n"; &ui_print_footer("", $text{'index_return'});