#!/usr/bin/perl -n
# thanks to Brian Dowling for an example with security in mind.
$TO = 'email@dot.com';
$FROM = xSolaris;
s/^<\d{1,2}>//;
open(MAIL, "|/usr/sbin/sendmail -t");
print MAIL <<"EOT";
To: $TO
From: $FROM
Subject: Log Alert: $_
$_
EOT
close(MAIL);
Thursday, July 23, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment