#!/usr/bin/perl # use this script to add email addresses to your procmail blacklist use strict; use warnings; my @msg; my $line; my $file = "/home/jaq/.spammers"; my $domain = shift || ""; @msg = ; open OUT, ">>$file" or die "couldn't open file $file"; my ($from) = map /^From:.*[< ]([\w.-]+\@([\w.-]+\.)+\w+)>?/, @msg; if($domain eq "--domain") { $from =~ s/.*@//; } print OUT "$from\n" if ($from); close OUT;