automatic version update by autodist [release 3.4.0-1mamba;Wed Feb 12 2014]

This commit is contained in:
Automatic Build System 2024-01-05 18:01:58 +01:00
parent f184dcf041
commit 98968bc407
4 changed files with 299 additions and 0 deletions

View File

@ -1,2 +1,16 @@
# spamassassin
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.

23
spamassassin-conf Normal file
View File

@ -0,0 +1,23 @@
# This is the right place to customize your installation of SpamAssassin.
#
# See 'perldoc Mail::SpamAssassin::Conf' for details of what can be
# tweaked.
#
###########################################################################
#
# rewrite subject by adding ****SPAM****
rewrite_subject 1
# insert report in the header instead of the e-mail body
# report_safe 1
# spamming threshold level
required_hits 5
# language userd for reports
lang en
# trusted_networks 212.17.35.
# log (for debugging)
#timelog_path /var/log/spamassassin

63
spamassassin-initscript Normal file
View File

@ -0,0 +1,63 @@
#!/bin/sh
#
# spamassassin This script starts and stops the spamd daemon
#
# chkconfig: 2345 80 30
#
# description: spamd is a daemon process which uses SpamAssassin to check
# email messages for SPAM. It is normally called by spamc
# from a MDA.
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Source spamd configuration.
if [ -f /etc/sysconfig/spamassassin ] ; then
. /etc/sysconfig/spamassassin
else
SPAMDOPTIONS="-d -c -a -m5 -H"
fi
[ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n "Starting spamd: "
daemon spamd $SPAMDOPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/spamassassin
;;
stop)
# Stop daemons.
echo -n "Shutting down spamd: "
killproc spamd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamassassin
;;
restart)
$0 stop
$0 start
;;
condrestart)
[ -e /var/lock/subsys/spamassassin ] && $0 restart
;;
status)
status spamd
;;
*)
echo "Usage: $0 {start|stop|restart|status|condrestart}"
exit 1
esac
exit 0

199
spamassassin.spec Normal file
View File

@ -0,0 +1,199 @@
%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0)
Name: spamassassin
Version: 3.4.0
Release: 1mamba
Summary: SpamAssassin(tm) is a mail filter to identify spam
Group: System/Tools
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://spamassassin.org
Source0: http://www.apache.org/dist/spamassassin/source/Mail-SpamAssassin-%{version}.tar.bz2
Source1: spamassassin-initscript
Source2: spamassassin-conf
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libz-devel
BuildRequires: perl-Archive-Tar
BuildRequires: perl-devel
BuildRequires: perl-Digest-SHA1
BuildRequires: perl-HTML-Parser
BuildRequires: perl-libwww
BuildRequires: perl-Net-DNS
## AUTOBUILDREQ-END
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
BuildRoot: %{_tmppath}/%{name}-%{version}-root
# 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.
%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 -m0755 spamd/redhat-rc-script.sh %{buildroot}%{_initrddir}/spamassassin
install -D %{SOURCE2} %{buildroot}%{_sysconfdir}/mail/spamassassin/local.cf
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/
%clean
[ "%{buildroot}" != / ] && rm -rf %{buildroot}
%post
if [ $1 -ge 1 ]; then
chkconfig spamassassin on
systemctl daemon-reload
systemctl start spamassassin
sa-update
fi
exit 0
%postun
# upgrade
if [ $1 -eq 1 ]; then
chkconfig spamassassin
[ $? -eq 0 ] && chkconfig spamassassin off
fi
exit 0
%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
%{_sysconfdir}/mail/spamassassin/v310.pre
%{_sysconfdir}/mail/spamassassin/v312.pre
%{_sysconfdir}/mail/spamassassin/v320.pre
%{_sysconfdir}/mail/spamassassin/v340.pre
%{_bindir}/qmail-spamc
%dir %{_datadir}/spamassassin
%{_datadir}/spamassassin/*
%{_initrddir}/spamassassin
%changelog
* 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