%define perl_major_ver %(eval `perl -V:version`; echo ${version%*.[0-9]*}.0) Name: SpamAssassin Version: 3.3.2 Release: 2mamba Summary: SpamAssassin(tm) is a mail filter to identify spam Group: System/Tools Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco 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 Requires: perl >= %{perl_major_ver} 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: /usr/sbin/sendmail 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} %preun #erase if [ $1 -eq 0 ]; then chkconfig spamassassin [ $? -eq 0 ] && %{_initrddir}/spamassassin stop fi exit 0 %postun # upgrade if [ $1 -eq 1 ]; then chkconfig spamassassin [ $? -eq 0 ] && %{_initrddir}/spamassassin condrestart 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 %{_bindir}/qmail-spamc %dir %{_datadir}/spamassassin %{_datadir}/spamassassin/* %{_initrddir}/spamassassin %changelog * Mon Nov 12 2012 Silvan Calarco 3.3.2-2mamba - perl 5.16 mass rebuild * Wed Jun 22 2011 Automatic Build System 3.3.2-1mamba - automatic update by autodist * Sat May 15 2010 Automatic Build System 3.3.1-1mamba - automatic update to 3.3.1 by autodist * Mon Oct 19 2009 Silvan Calarco 3.2.5-4mamba - reinstall missing v*.pre files * Thu Oct 01 2009 Silvan Calarco 3.2.5-3mamba - rebuilt with perl 5.10.1 * Thu Nov 06 2008 Silvan Calarco 3.2.5-2mamba - automatic rebuild by autodist * Thu Jun 19 2008 Silvan Calarco 3.2.5-1mamba - update to 3.2.5 * Wed Jun 04 2008 Silvan Calarco 3.2.4-1mamba - update to 3.2.4 * Thu Nov 08 2007 Silvan Calarco 3.2.3-1mamba - update to 3.2.3 - build against some more perl requirements * Wed May 09 2007 Silvan Calarco 3.2.0-1mamba - update to 3.2.0 * Wed Apr 26 2006 Davide Madrisan 2.64-4qilnx - removed dependency on perl- * Thu Apr 06 2006 Davide Madrisan 2.64-2qilnx - removed dependency on qmail * Mon Oct 18 2004 Davide Madrisan 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 2.63-2qilnx - added customized default configuration file * Mon Feb 02 2004 Silvan Calarco 2.63-1qilnx - new version rebuild * Wed Nov 26 2003 Silvan Calarco 2.60-1qilnx - first build