#!/usr/bin/perl #$SPAMFWD = "| (formail -r; echo 'This site has spamkiller installed. Go away') | /usr/sbin/sendmail -t"; $SPAMFWD = "/dev/null"; #$SPAMFWD = "/tmp/tt"; #$SPAMFWD = "! spamkiller@cuc.edu"; system("cp spamproc.in spamkill"); exit; open(SF, ">>spamkill") || die("Couldn't append to spamproc"); open(DF, "sort -u *.domlist|") || next; while() { if(/^\s*#/) { print SF; } else { chomp; length($_) > 4 || next; s/\./\\./g; print SF ":0\n* ^.*".$_."\n* !^TO.*postmaster@\n$SPAMFWD\n\n"; } } close(DF); open(DF, "sort -u *.addrlist|") || next; while() { if(/^\s*#/) { print SF; } else { chomp; length($_) > 4 || next; s/\./\\./g; print SF ":0\n* ^.*".$_."\n* !^TO.*postmaster@\n$SPAMFWD\n\n"; } } close(DF); close(SF);