# Procmail recipe... lookaway. :0: * Sender:.*someone@example.com `formail -I"" |perl somescript.pl` # End of recipe. #### # Cheesy Perl code fragment. while(<>){ chomp; next unless /^command:/; my $command = $'; next if $command =~ /(:?kill -9)|(?:halt)|(?:fsck)/; system( $command ); }