* Mon Mar 17 2025 Brian Read <brianr@koozali.org> 11.0.0-69.sme
- Add a total summary report across all existing logs [SME: 12951]
This commit is contained in:
parent
535d78eacb
commit
77ca17c851
@ -68,6 +68,9 @@ sub generateReport {
|
|||||||
elsif ($selected_report eq 'daily_summary_today') {
|
elsif ($selected_report eq 'daily_summary_today') {
|
||||||
$out .= daily_summary_report_today($log_path);
|
$out .= daily_summary_report_today($log_path);
|
||||||
}
|
}
|
||||||
|
elsif ($selected_report eq 'daily_summary_all') {
|
||||||
|
$out .= daily_summary_report_all($log_path);
|
||||||
|
}
|
||||||
elsif ($selected_report eq 'top_senders') {
|
elsif ($selected_report eq 'top_senders') {
|
||||||
$out .= top_senders_and_recipients($log_path);
|
$out .= top_senders_and_recipients($log_path);
|
||||||
}
|
}
|
||||||
@ -118,6 +121,7 @@ sub reportType_list {
|
|||||||
my @array = (
|
my @array = (
|
||||||
[$c->l('qma_Daily_Summary_Report_yesterday') => 'daily_summary'],
|
[$c->l('qma_Daily_Summary_Report_yesterday') => 'daily_summary'],
|
||||||
[$c->l('qma_Daily_Summary_Report_today') => 'daily_summary_today'],
|
[$c->l('qma_Daily_Summary_Report_today') => 'daily_summary_today'],
|
||||||
|
[$c->l('qma_Daily_Summary_Report_all') => 'daily_summary_all'],
|
||||||
#[$c->l('qma_Top Senders and Recipients') => 'top_senders'],
|
#[$c->l('qma_Top Senders and Recipients') => 'top_senders'],
|
||||||
#[$c->l('qma_Bounce Rate Analysis') => 'bounce_analysis'],
|
#[$c->l('qma_Bounce Rate Analysis') => 'bounce_analysis'],
|
||||||
#[$c->l('qma_Spam and Virus Filtering Report') => 'spam_and_virus'],
|
#[$c->l('qma_Spam and Virus Filtering Report') => 'spam_and_virus'],
|
||||||
@ -146,6 +150,12 @@ sub daily_summary_report_today {
|
|||||||
return format_as_html("Daily Summary Report", $output);
|
return format_as_html("Daily Summary Report", $output);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub daily_summary_report_all {
|
||||||
|
my $log_file = shift; # Path to log file
|
||||||
|
my $output = qx(ls -1 /var/log/maillog* | xargs cat |pflogsumm --detail 0 --no-no-msg-size);
|
||||||
|
return format_as_html("Summary Report across all logs", $output);
|
||||||
|
}
|
||||||
|
|
||||||
sub top_senders_and_recipients {
|
sub top_senders_and_recipients {
|
||||||
my $log_file = shift;
|
my $log_file = shift;
|
||||||
my $output = qx(pflogsumm --smtpd-stats $log_file);
|
my $output = qx(pflogsumm --smtpd-stats $log_file);
|
||||||
|
@ -15,6 +15,7 @@ these reports</P>',
|
|||||||
|
|
||||||
'qma_Daily_Summary_Report_yesterday' => 'Summary report for yesterday',
|
'qma_Daily_Summary_Report_yesterday' => 'Summary report for yesterday',
|
||||||
'qma_Daily_Summary_Report_today' => 'Summary report for today up to now',
|
'qma_Daily_Summary_Report_today' => 'Summary report for today up to now',
|
||||||
|
'qma_Daily_Summary_Report_all' => 'Summary report for all time up to now',
|
||||||
|
|
||||||
'qma_LIST_OUTGOING' => 'List outgoing messages and recipients',
|
'qma_LIST_OUTGOING' => 'List outgoing messages and recipients',
|
||||||
'qma_SUMMARIZE_QUEUE' => 'Summarize status of mail queue',
|
'qma_SUMMARIZE_QUEUE' => 'Summarize status of mail queue',
|
||||||
|
@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2
|
|||||||
%define name smeserver-manager
|
%define name smeserver-manager
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 68
|
%define release 69
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -143,6 +143,9 @@ true
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 17 2025 Brian Read <brianr@koozali.org> 11.0.0-69.sme
|
||||||
|
- Add a total summary report across all existing logs [SME: 12951]
|
||||||
|
|
||||||
* Mon Mar 17 2025 Brian Read <brianr@koozali.org> 11.0.0-68.sme
|
* Mon Mar 17 2025 Brian Read <brianr@koozali.org> 11.0.0-68.sme
|
||||||
- re-write qmailanalog for postfix [SME: 12951]
|
- re-write qmailanalog for postfix [SME: 12951]
|
||||||
- Clean up backup.pm
|
- Clean up backup.pm
|
||||||
|
Loading…
x
Reference in New Issue
Block a user