25.10.2008

simple mailer

#!/usr/bin/perl -w
use strict;
my $dir="/var/SPAM/";
my @mail=`ls -1 $dir`;
#print "This messages will be sent:\n@mail";
my $msg;
foreach $msg(@mail)
{
chomp $msg;
print "Spaming msg $dir$msg\n";
system ("cat $dir$msg | sendmail sed");

}

Комментариев нет: