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