2024-01-05 18:01:58 +01:00
|
|
|
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
|
2024-01-05 18:01:58 +01:00
|
|
|
%define spamd_groupid 65436
|
|
|
|
%define spamd_userid 65436
|
2024-01-05 18:01:58 +01:00
|
|
|
|
|
|
|
Name: spamassassin
|
2024-03-30 16:42:27 +01:00
|
|
|
Version: 4.0.1
|
|
|
|
Release: 1mamba
|
2024-01-05 18:01:58 +01:00
|
|
|
Summary: SpamAssassin(tm) is a mail filter to identify spam
|
|
|
|
Group: System/Tools
|
|
|
|
Vendor: openmamba
|
|
|
|
Distribution: openmamba
|
|
|
|
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
|
2024-01-05 18:01:58 +01:00
|
|
|
URL: https://spamassassin.apache.org/
|
2024-01-05 18:01:58 +01:00
|
|
|
Source0: http://www.apache.org/dist/spamassassin/source/Mail-SpamAssassin-%{version}.tar.bz2
|
2024-01-05 18:01:58 +01:00
|
|
|
Source1: spamassassin.service
|
2024-01-05 18:01:58 +01:00
|
|
|
Source2: spamassassin-conf
|
|
|
|
License: GPL
|
|
|
|
## AUTOBUILDREQ-BEGIN
|
|
|
|
BuildRequires: glibc-devel
|
2024-01-05 18:01:58 +01:00
|
|
|
BuildRequires: libperl
|
2024-01-05 18:01:58 +01:00
|
|
|
BuildRequires: libz-devel
|
2024-01-05 18:01:59 +01:00
|
|
|
BuildRequires: perl-Encode
|
2024-01-05 18:01:58 +01:00
|
|
|
BuildRequires: perl-HTML-Parser
|
|
|
|
BuildRequires: perl-Net-DNS
|
2024-01-05 18:01:58 +01:00
|
|
|
BuildRequires: perl-NetAddr-IP
|
2024-01-05 18:01:59 +01:00
|
|
|
BuildRequires: perl-Scalar-List-Utils
|
2024-01-05 18:01:58 +01:00
|
|
|
BuildRequires: perl-devel
|
2024-01-05 18:01:58 +01:00
|
|
|
## AUTOBUILDREQ-END
|
2024-01-05 18:01:59 +01:00
|
|
|
BuildRequires: perl >= 2:5.36.0
|
2024-01-05 18:01:58 +01:00
|
|
|
BuildRequires: libopenssl-devel
|
|
|
|
BuildRequires: perl-Compress-Zlib >= 1.41
|
|
|
|
BuildRequires: perl-IO-Socket-SSL >= 0.96
|
|
|
|
BuildRequires: perl-Mail-SPF >= 2.004
|
|
|
|
BuildRequires: perl-Net-Ident >= 1.20
|
|
|
|
BuildRequires: perl-IP-Country
|
|
|
|
BuildRequires: perl-Mail-DomainKeys
|
|
|
|
BuildRequires: perl-Mail-DKIM
|
|
|
|
BuildRequires: perl-Encode-Detect
|
|
|
|
Requires: perl >= %{perl_major_ver}
|
|
|
|
Requires: /usr/sbin/sendmail
|
|
|
|
Requires: perl-Encode-Locale
|
|
|
|
Provides: SpamAssassin
|
|
|
|
Obsoletes: SpamAssassin
|
|
|
|
|
|
|
|
# FIXME:
|
|
|
|
#optional module missing: Mail::SPF::Query Skipped becaus:
|
|
|
|
# Used to check DNS Sender Policy Framework (SPF) records to fight email
|
|
|
|
# address forgery and make it easier to identify spams. (Mail::SPF is
|
|
|
|
# preferred instead of this module.)
|
|
|
|
#
|
|
|
|
#optional module missing: Razor2
|
|
|
|
|
|
|
|
%description
|
|
|
|
SpamAssassin(tm) is a mail filter to identify spam.
|
|
|
|
Using its rule base, it uses a wide range of heuristic tests on mail headers and body text to identify "spam", also known as unsolicited commercial email.
|
|
|
|
|
|
|
|
The spam-identification tactics used include:
|
|
|
|
* header analysis: spammers use a number of tricks to mask their identities, fool you into thinking they've sent a valid mail, or fool you into thinking you must have subscribed at some stage. SpamAssassin tries to spot these.
|
|
|
|
* text analysis: again, spam mails often have a characteristic style (to put it politely), and some characteristic disclaimers and CYA text. SpamAssassin can spot these, too.
|
|
|
|
* blacklists: SpamAssassin supports many useful existing blacklists, such as mail-abuse.org, ordb.org or others.
|
|
|
|
* Razor: Vipul's Razor is a collaborative spam-tracking database, which works by taking a signature of spam messages. Since spam typically operates by sending an identical message to hundreds of people, Razor short-circuits this by allowing the first person to receive a spam to add it to the database -- at which point everyone else will automatically block it.
|
|
|
|
|
|
|
|
Once identified, the mail can then be optionally tagged as spam for later filtering using the user's own mail user-agent application.
|
|
|
|
|
|
|
|
SpamAssassin requires very little configuration; you do not need to continually update it with details of your mail accounts, mailing list memberships, etc.
|
|
|
|
It accomplishes filtering without this knowledge, as much as possible.
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
%debug_package
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
%prep
|
|
|
|
%setup -q -n Mail-SpamAssassin-%{version}
|
|
|
|
##sed -i "s|qmail-queue|/var/qmail/bin/qmail-queue|" qmail/qmail-spamc.c
|
|
|
|
|
|
|
|
%build
|
|
|
|
perl Makefile.PL INSTALLDIRS=vendor CONTACT_ADDRESS=postmaster
|
|
|
|
|
|
|
|
make
|
|
|
|
#make test
|
|
|
|
%make qmail/qmail-spamc
|
|
|
|
|
|
|
|
%install
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
#% makeinstall_perl
|
|
|
|
%makeinstall
|
|
|
|
# VENDORPREFIX=%{buildroot}%{_prefix}
|
|
|
|
|
|
|
|
packlist=`find %{buildroot} -name .packlist`
|
|
|
|
[ -z "$packlist" ] && exit 1 || cat $packlist | \
|
|
|
|
sed "s,%buildroot,,g;s,.*/man/.*,&.gz,g" | \
|
|
|
|
sort -u > .packlist && rm $packlist
|
|
|
|
|
|
|
|
strid=`echo $packlist | sed 's,.*auto\(.*\)/.packlist,\1,'`
|
|
|
|
for dir in `find %{buildroot} -type d | grep $strid`; do
|
|
|
|
echo "%dir ${dir#%buildroot}" >> .packlist
|
|
|
|
done
|
|
|
|
|
|
|
|
install -D %{SOURCE2} %{buildroot}%{_sysconfdir}/mail/spamassassin/local.cf
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/spamassassin.service
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
install -p qmail/qmail-spamc %{buildroot}%{_bindir}
|
|
|
|
|
|
|
|
# dirty hack
|
|
|
|
sed -i "s,^#!%{_bindir}/perl[0-9\.]*,#!%{_bindir}/perl," \
|
|
|
|
%{buildroot}%{_bindir}/{sa-learn,spamassassin,spamd}
|
|
|
|
|
|
|
|
# remove unpackaged files
|
|
|
|
find %{buildroot}/usr/lib/perl5 -name perllocal.pod -exec rm -f {} \;
|
|
|
|
|
|
|
|
install rules/*.pre %{buildroot}%{_sysconfdir}/mail/spamassassin/
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
chmod o+w %{buildroot}%{_bindir}/*
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
%clean
|
|
|
|
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
%pre
|
2024-01-05 18:01:58 +01:00
|
|
|
if [ $1 -ge 1 ]; then
|
2024-01-05 18:01:58 +01:00
|
|
|
/usr/sbin/groupadd spamd -g %{spamd_groupid} 2>/dev/null
|
|
|
|
/usr/sbin/useradd -u %{spamd_userid} -c 'Spamassassin user' -d /var/lib/spamassassin -g spamd \
|
|
|
|
-s /bin/false spamd 2>/dev/null
|
2024-01-05 18:01:58 +01:00
|
|
|
fi
|
2024-01-05 18:01:58 +01:00
|
|
|
:
|
2024-01-05 18:01:58 +01:00
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
%post
|
|
|
|
%systemd_post spamassassin
|
|
|
|
if [ $1 -ge 1 ]; then
|
|
|
|
sa-update &>/dev/null
|
|
|
|
|
|
|
|
# sysv -> systemd upgrade
|
|
|
|
if [ -L /etc/rc.d/rc5.d/S78spamassassin -o -L /etc/rc.d/rc3.d/S78spamassassin ]; then
|
|
|
|
systemctl -q enable postfix
|
|
|
|
systemctl -q restart postfix
|
|
|
|
fi
|
|
|
|
fi
|
2024-01-05 18:01:58 +01:00
|
|
|
if [ $1 -eq 1 ]; then
|
2024-01-05 18:01:58 +01:00
|
|
|
systemctl -q enable spamassassin
|
|
|
|
systemctl -q start spamassassin
|
2024-01-05 18:01:58 +01:00
|
|
|
fi
|
2024-01-05 18:01:58 +01:00
|
|
|
:
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun spamassassin
|
|
|
|
if [ $1 -eq 0 ]; then
|
|
|
|
/usr/sbin/userdel spamd 2>/dev/null
|
|
|
|
/usr/sbin/groupdel spamd 2>/dev/null
|
|
|
|
fi
|
|
|
|
:
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart spamassassin
|
|
|
|
:
|
|
|
|
|
|
|
|
%posttrans
|
|
|
|
# clean old sysv broken links
|
|
|
|
find /etc/rc[0-6].d/ -type l -xtype l -exec rm -f {} \;
|
|
|
|
:
|
2024-01-05 18:01:58 +01:00
|
|
|
|
|
|
|
%files -f .packlist
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_sysconfdir}/mail/spamassassin
|
|
|
|
%{_sysconfdir}/mail/spamassassin/v330.pre
|
|
|
|
%config(noreplace) %{_sysconfdir}/mail/spamassassin/local.cf
|
|
|
|
%{_sysconfdir}/mail/spamassassin/init.pre
|
2024-01-05 18:01:58 +01:00
|
|
|
%{_sysconfdir}/mail/spamassassin/v*.pre
|
2024-01-05 18:01:58 +01:00
|
|
|
%{_bindir}/qmail-spamc
|
|
|
|
%dir %{_datadir}/spamassassin
|
|
|
|
%{_datadir}/spamassassin/*
|
2024-01-05 18:01:58 +01:00
|
|
|
%{_unitdir}/spamassassin.service
|
2024-01-05 18:01:58 +01:00
|
|
|
|
|
|
|
%changelog
|
2024-03-30 16:42:27 +01:00
|
|
|
* Sat Mar 30 2024 Automatic Build System <autodist@openmamba.org> 4.0.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:59 +01:00
|
|
|
* Tue Apr 18 2023 Sdk Build System <sdk@mambasoft.it> 4.0.0-2mamba
|
|
|
|
- rebuilt with perl 5.36.0
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Sat Dec 17 2022 Automatic Build System <autodist@mambasoft.it> 4.0.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Mon Apr 12 2021 Automatic Build System <autodist@mambasoft.it> 3.4.6-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Sun Apr 04 2021 Automatic Build System <autodist@mambasoft.it> 3.4.5-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Fri Jan 31 2020 Automatic Build System <autodist@mambasoft.it> 3.4.4-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Tue Dec 31 2019 Automatic Build System <autodist@mambasoft.it> 3.4.3-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Wed Sep 19 2018 Automatic Build System <autodist@mambasoft.it> 3.4.2-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Sat May 09 2015 Automatic Build System <autodist@mambasoft.it> 3.4.1-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Thu Apr 09 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-4mamba
|
|
|
|
- fix spamd path in service file
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Thu Jan 22 2015 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-3mamba
|
|
|
|
- systemd plus spamd user/group support
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Thu Jul 24 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 3.4.0-2mamba
|
|
|
|
- initscript: don't check obsoleted /etc/sysconfig/network
|
|
|
|
|
2024-01-05 18:01:58 +01:00
|
|
|
* Wed Feb 12 2014 Automatic Build System <autodist@mambasoft.it> 3.4.0-1mamba
|
|
|
|
- automatic version update by autodist
|
|
|
|
|
|
|
|
* Wed Nov 27 2013 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.2-3mamba
|
|
|
|
- run sa-update in post script
|
|
|
|
- renamed from SpamAssassin
|
|
|
|
- require perl-Encode-Locale
|
|
|
|
- enable service by default on install/upgrade
|
|
|
|
|
|
|
|
* Mon Nov 12 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.2-2mamba
|
|
|
|
- perl 5.16 mass rebuild
|
|
|
|
|
|
|
|
* Wed Jun 22 2011 Automatic Build System <autodist@mambasoft.it> 3.3.2-1mamba
|
|
|
|
- automatic update by autodist
|
|
|
|
|
|
|
|
* Sat May 15 2010 Automatic Build System <autodist@mambasoft.it> 3.3.1-1mamba
|
|
|
|
- automatic update to 3.3.1 by autodist
|
|
|
|
|
|
|
|
* Mon Oct 19 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.5-4mamba
|
|
|
|
- reinstall missing v*.pre files
|
|
|
|
|
|
|
|
* Thu Oct 01 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.5-3mamba
|
|
|
|
- rebuilt with perl 5.10.1
|
|
|
|
|
|
|
|
* Thu Nov 06 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.5-2mamba
|
|
|
|
- automatic rebuild by autodist
|
|
|
|
|
|
|
|
* Thu Jun 19 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.5-1mamba
|
|
|
|
- update to 3.2.5
|
|
|
|
|
|
|
|
* Wed Jun 04 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.4-1mamba
|
|
|
|
- update to 3.2.4
|
|
|
|
|
|
|
|
* Thu Nov 08 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.3-1mamba
|
|
|
|
- update to 3.2.3
|
|
|
|
- build against some more perl requirements
|
|
|
|
|
|
|
|
* Wed May 09 2007 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.0-1mamba
|
|
|
|
- update to 3.2.0
|
|
|
|
|
|
|
|
* Wed Apr 26 2006 Davide Madrisan <davide.madrisan@qilinux.it> 2.64-4qilnx
|
|
|
|
- removed dependency on perl-<version>
|
|
|
|
|
|
|
|
* Thu Apr 06 2006 Davide Madrisan <davide.madrisan@qilinux.it> 2.64-2qilnx
|
|
|
|
- removed dependency on qmail
|
|
|
|
|
|
|
|
* Mon Oct 18 2004 Davide Madrisan <davide.madrisan@qilinux.it> 2.64-1qilnx
|
|
|
|
- update to version 2.64 by autospec
|
|
|
|
- also fixe a security issue (QSA-2004-042): CAN-2004-0796
|
|
|
|
|
|
|
|
* Mon Feb 02 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.63-2qilnx
|
|
|
|
- added customized default configuration file
|
|
|
|
|
|
|
|
* Mon Feb 02 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 2.63-1qilnx
|
|
|
|
- new version rebuild
|
|
|
|
|
|
|
|
* Wed Nov 26 2003 Silvan Calarco <silvan.calarco@mambasoft.it> 2.60-1qilnx
|
|
|
|
- first build
|