Hi,

I did it and know I get another error:

syntax error at logcheck line 25, near "'PiX Detected
Attack } ' )"
Missing right curly or square bracket at logcheck line
28, at end of line
Execution of logcheck aborted due to compilation
errors.

This is the code:

use strict;
use warnings;
use Mail::Mailer;

my @lines = ();
open (INFO, "/var/log/messages") or die "$!";
while (my $line = <INFO>) {
   if ($line =~ /IDS/) {
      push @lines,$line;
   }
}
close INFO;
if (@lines) {
   my $mailer = Mail::Mailer->new("smtp",
"10.83.27.71");
  $mailer->open( {'From' => 'Syslog
<[EMAIL PROTECTED]>',
                  'To' => 'gabriela pinado
<[EMAIL PROTECTED]>',
                  'Subject' => 'PiX Detected Attack }
' );
   print $mailer @lines;
   $mailer->close or die "can't close mailer: $!";


thanks a lot !

Juan


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to