#! /usr/bin/perl # blockspam - create simple .procmailrc file # input is list of 'from' headings to block. use integer; $| = 1; foreach $file (@ARGV) { # Open this file. open(FILE, $file) || die "Can't open $file: $!\n"; open(FILE2, ">.procmailrc") || die "Can't create file\n"; # Initialize variables. my $ff = 0; my %configList = (); print FILE2 "# .procmailrc created by blockspam on "; print FILE2 `date`; print FILE2 "\n"; while ( ) { print "Blocking $_"; print FILE2 ":0\n* ^From *$_/dev/null\n\n"; } close(FILE2); close(FILE); }