2024-06-18 13:09:47 +02:00
|
|
|
# $Id: smeserver-mailstats.spec,v 1.7 2021/04/02 11:11:44 brianr Exp $
|
2023-07-09 12:18:48 +02:00
|
|
|
# Authority: brianread
|
|
|
|
# Name: Brian Read
|
|
|
|
|
|
|
|
Summary: Daily mail statistics for SME Server
|
|
|
|
%define name smeserver-mailstats
|
|
|
|
Name: %{name}
|
2024-06-18 13:09:47 +02:00
|
|
|
%define version 1.1
|
|
|
|
%define release 18
|
2023-07-09 12:18:48 +02:00
|
|
|
Version: %{version}
|
|
|
|
Release: %{release}%{?dist}
|
|
|
|
License: GPL
|
|
|
|
Group: SME/addon
|
2024-06-18 13:09:47 +02:00
|
|
|
Source: %{name}-%{version}.tgz
|
|
|
|
Patch0: smeserver-mailstats-1.1-random-cron_and_spamfilter-stats-7-update.patch
|
|
|
|
Patch1: smeserver-mailstats-1.1.bz8957.Create_the_mailstats_user.patch
|
|
|
|
Patch2: smeserver-mailstats-1.1.bz8656.Spamassassin_scores_and_tags.patch
|
|
|
|
Patch3: smeserver-mailstats-1.0-628.patch
|
|
|
|
Patch4: smeserver-mailstats-1.1.bz9588.qpsmtpd0_96compatible.patch
|
|
|
|
Patch5: smeserver-mailstats-1.1.bz9717-9716email_specific_stats.patch
|
|
|
|
Patch6: smeserver-mailstats-1.1.bz9888.geoip.patch
|
|
|
|
Patch7: smeserver-mailstats-1.1.bz10858_10327.cleanup_and_email_truncate.patch
|
|
|
|
Patch8: smeserver-mailstats-1.1-uninitialised-variable-on-no-data
|
|
|
|
Patch9: smeserver-mailstats-1.1-Clear-up-uninitialsed-use-of-lc.patch
|
|
|
|
Patch10:smeserver-mailstats-1.1-Add-Update-event-to-createlinks.patch
|
|
|
|
Patch11:smeserver-mailstats-1.1-Take-out-dot-in-cron-file-and-also-re-direct-errors-to-syslog.patch
|
|
|
|
Patch12:smeserver-mailstats-1.1-bz12327-Add-in-imap-authorisation-log-string.patch
|
|
|
|
Patch13:smeserver-mailstats-1.1-Pull-in-python-rewrite-from-sme11-dev.patch
|
2023-07-09 12:18:48 +02:00
|
|
|
|
|
|
|
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-buildroot
|
|
|
|
BuildArchitectures: noarch
|
|
|
|
Requires: smeserver-release => 9.0
|
|
|
|
Requires: qpsmtpd >= 0.96
|
|
|
|
BuildRequires: e-smith-devtools >= 1.13.1-03
|
|
|
|
Requires: perl-Switch
|
2024-06-18 13:09:47 +02:00
|
|
|
BuildRequires: python36
|
|
|
|
Requires: python36
|
|
|
|
Requires: html2text
|
|
|
|
Requires: python3-chameleon
|
|
|
|
AutoReqProv: no
|
2023-07-09 12:18:48 +02:00
|
|
|
|
|
|
|
%description
|
|
|
|
A script that via cron.d e-mails mail statistics to admin on a daily basis.
|
|
|
|
See http://www.contribs.org/bugzilla/show_bug.cgi?id=819
|
|
|
|
|
|
|
|
%changelog
|
2024-06-18 13:09:47 +02:00
|
|
|
* Fri Jun 07 2024 Brian Read <brianr@koozali.org> 1.1-18.sme
|
|
|
|
- Pull in python re-write from SME11 dev [SME: ]
|
2023-07-09 12:18:48 +02:00
|
|
|
|
|
|
|
* Wed Feb 15 2023 Brian Read <brianr@bjsystems.co.uk> 1.1-17.sme
|
|
|
|
- Add-in-imap-authorisation-log-string [SME: 12327]
|
|
|
|
|
|
|
|
* Fri Apr 02 2021 Brian Read <brianr@bjsystems.co.uk> 1.1-16.sme
|
|
|
|
- Take out dot in cron file and also re-direct errors to syslog [SME: 11519]
|
|
|
|
|
|
|
|
* Wed Mar 24 2021 Brian Read <brianr@bjsystems.co.uk> 1.1-15.sme
|
|
|
|
- Add Update event to createlinks [SME: 10923]
|
|
|
|
|
|
|
|
* Thu Dec 17 2020 Brian Read <brianr@bjsystems.co.uk> 1.1-14.sme
|
|
|
|
- Add in perl-Switch as requirement [SME: 11044]
|
|
|
|
|
|
|
|
* Mon Oct 19 2020 Brian Read <brianr@bjsystems.co.uk> 1.1-13.sme
|
|
|
|
- More uninitialised data [SME: 11044]
|
|
|
|
|
|
|
|
* Thu Apr 16 2020 brian read <brianr@bjsystems.co.uk> 1.1-12.sme
|
|
|
|
- Sort out uninitialised variable on no data.
|
|
|
|
|
|
|
|
* Sun Jan 5 2020 brian read <brianr@bjsystems.co.uk> 1.1-11.sme
|
|
|
|
- [sme:10858][sme:10327] Sort out email truncate and generally cleanup code format and take out debug crud
|
|
|
|
- Also change perl script file name to mailstats.pl
|
|
|
|
|
|
|
|
* Fri Oct 18 2019 brian read <brianr@bjsystems.co.uk> 1.1-10.sme
|
|
|
|
- Add Update event to createlinks display of geoip [SME: 9888]
|
|
|
|
|
|
|
|
* Wed Oct 12 2016 brian read <brianr@bjsystems.co.uk> 1.1-9.sme
|
|
|
|
- [sme:9716][sme:9717] add email specific stats and enhance relay monitoring and add code for smeoptimizer
|
|
|
|
|
|
|
|
* Sun Jul 03 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1-7.sme
|
|
|
|
- set Requires qpsmtpd >=0.96
|
|
|
|
|
|
|
|
* Sat Jul 02 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1-6.sme
|
|
|
|
- make compatible with qpstmpd 0.96 and new plugins [SME: 9588]
|
|
|
|
- work in progress : html version of email
|
|
|
|
- code by Brian Read <brianr@bjsystems.co.uk>
|
|
|
|
- thanks to Michael Doerner for his extensive testing
|
|
|
|
|
|
|
|
* Sun Apr 10 2016 Jean-Philipe Pialasse <tests@pialasse.com> 1.1-5.sme
|
|
|
|
- account for all unknown qpsmtpd plugins [SME: 9434]
|
|
|
|
- extra for "unofficial" extra clamav signatures
|
|
|
|
- code by Brian Read <brianr@bjsystems.co.uk>
|
|
|
|
- (only small suggestions from JP Pialasse aka Unnilennium)
|
|
|
|
|
|
|
|
* Thu Jun 25 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1-4
|
|
|
|
- creates the "mailstats" user [SME: 8957]
|
|
|
|
- Fixed the problem with Spamassassin scores and tags.
|
|
|
|
- Also added Geoip league table [SME: 8656]
|
|
|
|
- code done by Brian Read <brianr@bjsystems.co.uk>
|
|
|
|
|
|
|
|
* Sun Jun 14 2015 stephane de Labrusse <stephdl@de-labrusse.fr> 1.1-3
|
|
|
|
- added a random cron job
|
|
|
|
- spamfilter-stats-7-update
|
|
|
|
- code done by Brian Read <brianr@bjsystems.co.uk> and John Crisp <jcrisp@safeandsoundit.co.uk>
|
|
|
|
|
|
|
|
* Mon Jun 16 2014 JP Pialasse <tests@pialasse.com> 1.1-1.sme
|
|
|
|
- initial import to SME9 contribs
|
|
|
|
|
|
|
|
* Mon Sep 23 2013 JP Pialasse <tests@pialasse.com> 1.1-4.sme
|
|
|
|
- uninitialized value in sprintf [SME: 4747]
|
|
|
|
- patch smeserver-mailstats-1.0-spamfilter.patch
|
|
|
|
|
|
|
|
* Sun Sep 09 2012 JP Pialasse <tests@pialasse.com> 1.1-2.sme
|
|
|
|
- Add Update event to createlinks Unexpected failure string in log file: auth::auth_cvm_unix_local see [SME 7089]
|
|
|
|
|
|
|
|
* Sat May 26 2012 Brian J read <brianr@bjsystems.co.uk> 1.0-1.sme
|
|
|
|
- Initial version
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup
|
2024-06-18 13:09:47 +02:00
|
|
|
%patch0 -p1
|
|
|
|
%patch1 -p1
|
|
|
|
%patch2 -p1
|
|
|
|
%patch3 -p1
|
|
|
|
%patch4 -p1
|
|
|
|
%patch5 -p1
|
|
|
|
%patch6 -p1
|
|
|
|
%patch7 -p1
|
|
|
|
%patch8 -p1
|
|
|
|
%patch9 -p1
|
|
|
|
%patch10 -p1
|
|
|
|
%patch11 -p1
|
|
|
|
%patch12 -p1
|
|
|
|
%patch13 -p1
|
2023-07-09 12:18:48 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
perl createlinks
|
|
|
|
|
|
|
|
%install
|
|
|
|
/bin/rm -rf $RPM_BUILD_ROOT
|
|
|
|
(cd root ; /usr/bin/find . -depth -print | /bin/cpio -dump $RPM_BUILD_ROOT)
|
|
|
|
chmod +x $RPM_BUILD_ROOT/usr/bin/runmailstats.sh
|
2024-06-18 13:09:47 +02:00
|
|
|
# Define the placeholder and generate the current date and time
|
|
|
|
now=$(date +"%Y-%m-%d %H:%M:%S")
|
|
|
|
|
|
|
|
# Replace the placeholder in the Python program located at %{BUILDROOT}/usr/bin
|
|
|
|
sed -i "s|__BUILD_DATE_TIME__|$now|" $RPM_BUILD_ROOT/usr/bin/mailstats.py
|
|
|
|
|
|
|
|
|
2023-07-09 12:18:48 +02:00
|
|
|
/bin/rm -f %{name}-%{version}-filelist
|
2024-06-18 13:09:47 +02:00
|
|
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT | grep -v "\.pyc" | grep -v "\.pyo" > %{name}-%{version}-filelist
|
2023-07-09 12:18:48 +02:00
|
|
|
|
|
|
|
%clean
|
|
|
|
/bin/rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files -f %{name}-%{version}-filelist
|
|
|
|
%defattr(-,root,root)
|
2024-06-18 13:09:47 +02:00
|
|
|
|