3 %bcond_with mysql # enable mysql storage driver (disable db4 driver)
5 Summary: A library and Mail Delivery Agent for Bayesian spam filtering
6 Summary(pl): Biblioteka i MDA do bayesowskiego filtrowania spamu
11 Group: Applications/Mail
12 Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
13 # Source0-md5: ddb40d26cc923d7569d48b3072e61715
14 URL: http://www.nuclearelephant.com/projects/dspam/
16 BuildRequires: mysql-static
18 BuildRequires: db-static
20 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 DSPAM (as in De-Spam) is an open-source project to create a new kind
24 of anti-spam mechanism, and is currently effective as both a
25 server-side agent for UNIX email servers and a developer's library for
26 mail clients, other anti-spam tools, and similar projects requiring
27 drop-in spam filtering.
29 The DSPAM agent masquerades as the email server's local delivery agent
30 and filters/learns spams using an advanced Bayesian statistical
31 approach (based on Bayes's theorem of combined probabilities) which
32 provides an administratively maintenance-free, easy-learning Anti-Spam
33 service custom tailored to each individual user's behavior. Advanced
34 because on top of standard Bayesian filtering is also incorporated the
35 use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
36 works great with Sendmail and Exim, and should work well with any
37 other MTA that supports an external local delivery agent (postfix,
41 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
42 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
43 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
44 uniksowych serwerów pocztowych jak i biblioteka dla programistów
45 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
46 wymagaj±cych filtrowania spamu w locie.
48 Agent DSPAM zachowuje siê jak lokalny agent dostarczania poczty (MDA)
49 i filtruje/uczy siê spamu przy u¿yciu zaawansowanego bayesowskiego
50 przybli¿enia statystycznego (opartego na twierdzeniu Bayesa o
51 po³±czonych prawdopodobieñstwach), daj±c nie wymagaj±c± obs³ugi
52 administracyjnej, ³atwo ucz±c± siê us³ugê antyspamow± dostosowan± do
53 zachowania ka¿dego u¿ytkownika. Metoda jest zaawansowana poniewa¿ na
54 podstawie standardowego filtrowania bayesowskiego wprowadzono u¿ycie
55 tokenów ³añcuchowych, eliminowanie ukrywanie i inne rozszerzenia.
56 DSPAM dzia³a wspaniale z Sendmailem i Eximem, powinien dzia³aæ dobrze
57 z ka¿dym innym MTA obs³uguj±cym zewnêtrznego agenta MDA (postfiksem,
61 Summary: A library for Bayesian spam filtering
62 Summary(pl): Biblioteka do bayesowskiego filtrowania spamu
66 DSPAM (as in De-Spam) is an open-source project to create a new kind
67 of anti-spam mechanism, and is currently effective as both a
68 server-side agent for UNIX email servers and a developer's library for
69 mail clients, other anti-spam tools, and similar projects requiring
70 drop-in spam filtering.
72 This package contains the library.
74 %description libs -l pl
75 DSPAM (czyli De-Spam) to projekt o otwartych ¼ród³ach maj±cy na celu
76 stworzenie nowego rodzaju mechanizmu antyspamowego. Aktualnie jest
77 efektywny zarówno jako dzia³aj±cy po stronie serwera agent dla
78 uniksowych serwerów pocztowych jak i biblioteka dla programistów
79 klientów pocztowych, innych narzêdzi antyspamowych i innych projektów
80 wymagaj±cych filtrowania spamu w locie.
82 Ten pakiet zawiera wspomnian± bibliotekê.
85 Summary: Header files for the DSPAM library
86 Summary(pl): Pliki nag³ówkowe biblioteki DSPAM
87 Group: Development/Libraries
88 Requires: %{name}-libs = %{version}-%{release}
91 DSPAM has had its core engine moved into a separate library, libdspam.
92 This library can be used by developers to provide 'drop-in' spam
93 filtering for their mail client applications, other anti-spam tools,
96 %description devel -l pl
97 G³ówny silnik DSPAM zosta³ przeniesiony do oddzielnej biblioteki
98 libdspam, która mo¿e byæ u¿ywana przez programistów do zapewnienia
99 filtrowania spamu w locie dla aplikacji klientów pocztowych, innych
100 narzêdzi antyspamowych i podobnych projektów.
103 Summary: Static DSPAM library
104 Summary(pl): Statyczna biblioteka DSPAM
105 Group: Development/Libraries
106 Requires: %{name}-devel = %{version}-%{release}
109 Static DSPAM library.
111 %description static -l pl
112 Statyczna biblioteka DSPAM.
119 --enable-static=yes \
120 --enable-trusted-user-security \
121 --enable-bayesian-dobly \
122 --enable-chained-tokens \
123 --enable-experimental \
124 --enable-signature-attachments \
126 --enable-large-scale \
127 --enable-delivery-to-stdout \
128 --enable-virtual-users \
129 --with-userdir=/var/lib/%{name} \
130 --with-userdir-owner=none \
131 --with-userdir-group=none \
132 --with-dspam-owner=none \
133 --with-dspam-group=none \
134 --with-signature-life=14 \
135 --disable-dependency-tracking \
137 --enable-neural-networking \
138 --enable-virtual-users \
139 --with-storage-driver=mysql_drv \
140 --with-mysql-includes=%{_includedir}/mysql \
141 --with-mysql-libraries=%{_libdir}
143 --with-storage-driver=libdb4_drv \
144 --with-db4-includes=%{_includedir} \
145 --with-db4-libraries=%{_libdir}
150 rm -rf $RPM_BUILD_ROOT
153 %{__make} install DESTDIR=$RPM_BUILD_ROOT
155 # install devel files
156 install -d $RPM_BUILD_ROOT%{_includedir}/%{name}
157 install -m0644 libdspam.h $RPM_BUILD_ROOT%{_includedir}/%{name}
158 install -m0644 libdspam_objects.h $RPM_BUILD_ROOT%{_includedir}/%{name}
159 install -m0644 lht.h $RPM_BUILD_ROOT%{_includedir}/%{name}
160 install -m0644 nodetree.h $RPM_BUILD_ROOT%{_includedir}/%{name}
162 # provide maintenance scripts
163 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily
164 install -d $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly
166 cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name} <<EOF
168 exec %{_bindir}/%{name}_clean 2>&1 > /dev/null
171 chmod 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.daily/%{name}
174 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" $RPM_BUILD_ROOT%{_bindir}/%{name}_corpus
175 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
178 #install -m0755 dspam-cron.weekly $RPM_BUILD_ROOT%{_sysconfdir}/cron.weekly/%{name}
181 cp tools.mysql_drv/README README.mysql
184 install -d $RPM_BUILD_ROOT/var/lib/%{name}
185 cat > $RPM_BUILD_ROOT/var/lib/%{name}/mysql.data <<EOF
190 This file can only contain 5 lines with the following values:
201 rm -rf $RPM_BUILD_ROOT
203 %post libs -p /sbin/ldconfig
204 %postun libs -p /sbin/ldconfig
207 %defattr(644,root,root,755)
209 %doc cgi/base.css cgi/dspam.cgi cgi/logo.gif cgi/template.html
212 %doc tools.mysql_drv/mysql_objects.sql.space.optimized
213 %doc tools.mysql_drv/mysql_objects.sql.speed.optimized
214 %doc tools.mysql_drv/purge.sql
215 %doc tools.mysql_drv/virtual_users.sql
217 %dir %attr(0750,root,mail) /var/lib/%{name}
218 %{?with_mysql:%attr(640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data}
219 %attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
220 #%attr(755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
221 %attr(755,root,mail) %{_bindir}/%{name}
222 %attr(755,root,root) %{_bindir}/%{name}_clean
223 %attr(755,root,root) %{_bindir}/%{name}_corpus
224 %attr(755,root,root) %{_bindir}/%{name}_crc
225 %attr(755,root,root) %{_bindir}/%{name}_dump
226 %attr(755,root,root) %{_bindir}/%{name}_genaliases
227 %attr(755,root,root) %{_bindir}/%{name}_stats
228 %attr(755,root,root) %{_bindir}/%{name}_merge
229 %attr(755,root,root) %{_bindir}/%{name}_2mysql
230 %attr(755,root,root) %{_bindir}/%{name}_ngstats
231 %attr(755,root,root) %{_bindir}/libdb4_purge
234 %defattr(644,root,root,755)
236 %attr(755,root,root) %{_libdir}/lib*.so.*.*.*
239 %defattr(644,root,root,755)
240 %attr(755,root,root) %{_libdir}/lib*.so
242 %{_includedir}/%{name}
245 %defattr(644,root,root,755)