[Date Prev]   [Date Next] [Thread Prev]   [Thread Next] [Date Index]   [Thread Index]

 

     Re: [snips-users] No Subject on Notifier.pl Emails

Chris Cannon wrote:
> 
> I am running snips with the pingmon, and have notifier.pl called from
> snipslogd to send email of critical events.  However, these emails never
> include a subject line.  I see that the notifier script has variables for
> subject, but I never have received an email with a subject line so far.

notifier.pl calls the Unix 'mail' program to do the actual mailing.
Historically the /usr/ucb/mail program accepted a subject flag on the
command line (-s) but /bin/mail did not accept such a flag.  On newer
systems this might be different, so you can test by editing this following
line of code in notifier.pl (around line 333)

	-vikas
--------------------------------------------
if ($email_program =~ /ucb/) {
  open(XPIPE, "|$email_program -s \"SNIPS notification: $subject\"
$address") 
||
   die "Cannot open $email_program.\n";
}
  else { # not ucb/mail so cannot take -s command line option
    open(XPIPE, "|$email_program $address") || die "Cannot open
$email_program.\
n";


Zyrion Traverse Network Monitoring & Network Management Software