-
3
- #1
ChrisEsser
IS-IT--Management
I've never liked the standard subject for savegroup completion e-mails. I have about 40 groups that send me e-mails everyday and I don't like the fact that you need to open the e-mail to see what group it's for and if it succeded or not.
This is a simple perl script that I wrote that re-formats the email so the subject is actually informative. Just put this script on your server and use it in place of sendmail in the 'action' field of the notification configuration (i.e. /nsr/scripts/remail.pl legatoadmin@mydomain.com) and you'll end up with subjects that look something like this:
Solstice Backup Savegroup: (notice) NT completed, 1 client(s) (All Succeeded)
------------------------
#!/usr/local/bin/perl
$email = shift;
open (MAIL,"|/usr/lib/sendmail $email"
while (<STDIN>) {
if (/^Solstice Backup Savegroup/) {
print MAIL "Subject: $_";
}
print MAIL $_;
}
print MAIL ".\n";
close(MAIL);
--------------------
BTW: I use Solaris. This should work on any UNIX system with Perl loaded. If you don't like Perl it can easily be rewritten as a shell script. If you use NT, then you're on your own.
This is a simple perl script that I wrote that re-formats the email so the subject is actually informative. Just put this script on your server and use it in place of sendmail in the 'action' field of the notification configuration (i.e. /nsr/scripts/remail.pl legatoadmin@mydomain.com) and you'll end up with subjects that look something like this:
Solstice Backup Savegroup: (notice) NT completed, 1 client(s) (All Succeeded)
------------------------
#!/usr/local/bin/perl
$email = shift;
open (MAIL,"|/usr/lib/sendmail $email"
while (<STDIN>) {
if (/^Solstice Backup Savegroup/) {
print MAIL "Subject: $_";
}
print MAIL $_;
}
print MAIL ".\n";
close(MAIL);
--------------------
BTW: I use Solaris. This should work on any UNIX system with Perl loaded. If you don't like Perl it can easily be rewritten as a shell script. If you use NT, then you're on your own.