first the script
#!/usr/bin/perl
open (FILE, "</home/joe/mailfilter_logs/.mailfilter.log");
@log = <FILE>;
close (FILE);
foreach $log (@log) {
if ($log =~ "@freelotto.com"){
$counter++;
}
}
open (MAIL, "|/usr/sbin/sendmail -t") || die;
print MAIL "To:
joes_box@cox.net\n From: mailfilter/n";
print MAIL "Subject: Deleted mail for bonnie";
print MAIL "$counter E-mails were deleted today. send a message to bonnie \n
letting her know that the program is working";
close (MAIL);
next the question. is there a way to have this program send me an email (or someone else one) without having a full running server. i don't have a running mail server going. i ran the program and this is the output:
[joe@joes-box cgi-bin]$ ./mailfilter*
sendmail: warning: My hostname joes-box is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
postdrop: warning: My hostname joes-box is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
[joe@joes-box cgi-bin]$
is there a way to have this use my isp's mailserver or maybe a mail client to send the mail?? or maybe this is for a different forum but is there a way to utilize my isp's mail server to launch mail from my box kinda like emulating a mail server for my intranet? hopefully i said everything write. i am new at this server thing.