diff --git a/Changes b/Changes index 53141c3..19922e3 100644 --- a/Changes +++ b/Changes @@ -12,6 +12,8 @@ - Added the new option 'rrdtool_extra_options' to be able to include RRDtool extra options on every graph. (suggested by Greg Ogonowski, greg AT indexcom.com) +- Added the new option 'subject_prefix' in 'emailreports.pm' to be able to + set a customized prefix in the Subject of the emails that will be sent. - Changed the main loop functionality using now the select() function, instead of the alarm()+pause() pair. This should improve the responsiveness on high system loads. [#230] diff --git a/lib/emailreports.pm b/lib/emailreports.pm index 33ae8f9..7757840 100644 --- a/lib/emailreports.pm +++ b/lib/emailreports.pm @@ -38,6 +38,7 @@ sub emailreports_send { my $imgs_dir = $config->{imgs_dir}; my $images; my $mime; + my $subject; logger("$myself: sending $report reports."); @@ -175,6 +176,8 @@ EOF $html .= $html_footer; + $subject = $emailreports->{subject_prefix} || "Monitorix:"; + # create the multipart container and add attachments foreach (split(',', $emailreports->{$report}->{to})) { my $to = trim($_); @@ -182,7 +185,7 @@ EOF my $msg = new MIME::Lite( From => $emailreports->{from_address}, To => $to, - Subject => "Monitorix: '$report' Report", + Subject => "$subject '$report' Report", Type => "multipart/related", Organization => "Monitorix", ); diff --git a/man/man5/monitorix.conf.5 b/man/man5/monitorix.conf.5 index 97d66d6..07e066e 100644 --- a/man/man5/monitorix.conf.5 +++ b/man/man5/monitorix.conf.5 @@ -3117,6 +3117,13 @@ This is the address that will be used as remitent for all the monthly report ema Default value: \fInoreply@example.com\fP .RE .P +.BI subject_prefix +.RS +This is a string that will be prefixed in the Subject of all emails that will be sent. +.P +Default value: \fIMonitorix:\fP +.RE +.P .BI hour .RS This is the hour (in 24h format) when the email reports will be sent.