# # Conditional build: %bcond_with mysql # enable mysql storage driver (disable db4 driver) # Summary: A library and Mail Delivery Agent for Bayesian spam filtering Summary(pl): Biblioteka i MDA do bayesowskiego filtrowania spamu Name: dspam Version: 2.10.6 Release: 1 License: GPL Group: Applications/Mail Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz # Source0-md5: ddb40d26cc923d7569d48b3072e61715 Patch0: %{name}-Makefile.patch URL: http://www.nuclearelephant.com/projects/dspam/ %if %{with mysql} BuildRequires: mysql-devel %else BuildRequires: db-devel %endif Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description DSPAM (as in De-Spam) is an open-source project to create a new kind of anti-spam mechanism, and is currently effective as both a server-side agent for UNIX email servers and a developer's library for mail clients, other anti-spam tools, and similar projects requiring drop-in spam filtering. The DSPAM agent masquerades as the email server's local delivery agent and filters/learns spams using an advanced Bayesian statistical approach (based on Bayes's theorem of combined probabilities) which provides an administratively maintenance-free, easy-learning Anti-Spam service custom tailored to each individual user's behavior. Advanced because on top of standard Bayesian filtering is also incorporated the use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM works great with Sendmail and Exim, and should work well with any other MTA that supports an external local delivery agent (postfix, qmail, etc.) %description -l pl DSPAM (czyli De-Spam) to projekt o otwartych źródłach mający na celu stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest efektywny zarówno jako działający po stronie serwera agent dla uniksowych serwerów pocztowych jak i biblioteka dla programistów klientów pocztowych, innych narzędzi antyspamowych i innych projektów wymagających filtrowania spamu w locie. Agent DSPAM zachowuje się jak lokalny agent dostarczania poczty (MDA) i filtruje/uczy się spamu przy użyciu zaawansowanego bayesowskiego przybliżenia statystycznego (opartego na twierdzeniu Bayesa o połączonych prawdopodobieństwach), dając nie wymagającą obsługi administracyjnej, łatwo uczącą się usługę antyspamową dostosowaną do zachowania każdego użytkownika. Metoda jest zaawansowana ponieważ na podstawie standardowego filtrowania bayesowskiego wprowadzono użycie tokenów łańcuchowych, eliminowanie ukrywanie i inne rozszerzenia. DSPAM działa wspaniale z Sendmailem i Eximem, powinien działać dobrze z każdym innym MTA obsługującym zewnętrznego agenta MDA (postfiksem, qmailem itd.). %package libs Summary: A library for Bayesian spam filtering Summary(pl): Biblioteka do bayesowskiego filtrowania spamu Group: Libraries %description libs DSPAM (as in De-Spam) is an open-source project to create a new kind of anti-spam mechanism, and is currently effective as both a server-side agent for UNIX email servers and a developer's library for mail clients, other anti-spam tools, and similar projects requiring drop-in spam filtering. This package contains the library. %description libs -l pl DSPAM (czyli De-Spam) to projekt o otwartych źródłach mający na celu stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest efektywny zarówno jako działający po stronie serwera agent dla uniksowych serwerów pocztowych jak i biblioteka dla programistów klientów pocztowych, innych narzędzi antyspamowych i innych projektów wymagających filtrowania spamu w locie. Ten pakiet zawiera wspomnianą bibliotekę. %package devel Summary: Header files for the DSPAM library Summary(pl): Pliki nagłówkowe biblioteki DSPAM Group: Development/Libraries Requires: %{name}-libs = %{version}-%{release} %description devel DSPAM has had its core engine moved into a separate library, libdspam. This library can be used by developers to provide 'drop-in' spam filtering for their mail client applications, other anti-spam tools, or similar projects. %description devel -l pl Główny silnik DSPAM został przeniesiony do oddzielnej biblioteki libdspam, która może być używana przez programistów do zapewnienia filtrowania spamu w locie dla aplikacji klientów pocztowych, innych narzędzi antyspamowych i podobnych projektów. %package static Summary: Static DSPAM library Summary(pl): Statyczna biblioteka DSPAM Group: Development/Libraries Requires: %{name}-devel = %{version}-%{release} %description static Static DSPAM library. %description static -l pl Statyczna biblioteka DSPAM. %prep %setup -q %patch0 -p1 %build %configure \ --enable-trusted-user-security \ --enable-bayesian-dobly \ --enable-chained-tokens \ --enable-experimental \ --enable-signature-attachments \ --enable-bias \ --enable-large-scale \ --enable-delivery-to-stdout \ --enable-virtual-users \ --with-userdir=/var/lib/%{name} \ --with-userdir-owner=none \ --with-userdir-group=none \ --with-dspam-owner=none \ --with-dspam-group=none \ --with-signature-life=14 \ --disable-dependency-tracking \ %if %{with mysql} --enable-neural-networking \ --enable-virtual-users \ --with-storage-driver=mysql_drv \ --with-mysql-includes=%{_includedir}/mysql \ --with-mysql-libraries=%{_libdir} %else --with-storage-driver=libdb4_drv \ --with-db4-includes=%{_includedir} \ --with-db4-libraries=%{_libdir} %endif %{__make} %install rm -rf $RPM_BUILD_ROOT #%makeinstall_std %{__make} install DESTDIR=$RPM_BUILD_ROOT # install devel files install -d $RPM_BUILD_ROOT%{_includedir}/%{name} install -m0644 libdspam.h $RPM_BUILD_ROOT%{_includedir}/%{name} install -m0644 libdspam_objects.h $RPM_BUILD_ROOT%{_includedir}/%{name} install -m0644 lht.h $RPM_BUILD_ROOT%{_includedir}/%{name} install -m0644 nodetree.h $RPM_BUILD_ROOT%{_includedir}/%{name} # provide maintenance scripts install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <&1 > /dev/null EOF chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} # fix prefix perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi # fix purge stuff #install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name} %if %{with mysql} cp tools.mysql_drv/README README.mysql # fix missing file install -d $RPM_BUILD_ROOT/var/lib/%{name} cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <