1 Summary: A library and Mail Delivery Agent for Bayesian spam filtering
6 Group: Applications/Mail
7 Source0: http://www.nuclearelephant.com/projects/dspam/sources/%{name}-%{version}.tar.gz
8 URL: http://www.nuclearelephant.com/projects/dspam/
9 BuildRequires: mysql-devel
10 Buildroot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
13 DSPAM (as in De-Spam) is an open-source project to create a new kind
14 of anti-spam mechanism, and is currently effective as both a
15 server-side agent for UNIX email servers and a developer's library for
16 mail clients, other anti-spam tools, and similar projects requiring
17 drop-in spam filtering.
19 The DSPAM agent masquerades as the email server's local delivery agent
20 and filters/learns spams using an advanced Bayesian statistical
21 approach (based on Baye's theorem of combined probabilities) which
22 provides an administratively maintenance-free, easy-learning Anti-Spam
23 service custom tailored to each individual user's behavior. Advanced
24 because on top of standard Bayesian filtering is also incorporated the
25 use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
26 works great with Sendmail and Exim, and should work well with any
27 other MTA that supports an external local delivery agent (postfix,
31 Summary: A library and Mail Delivery Agent for Bayesian spam filtering
35 DSPAM (as in De-Spam) is an open-source project to create a new kind
36 of anti-spam mechanism, and is currently effective as both a
37 server-side agent for UNIX email servers and a developer's library for
38 mail clients, other anti-spam tools, and similar projects requiring
39 drop-in spam filtering.
41 The DSPAM agent masquerades as the email server's local delivery agent
42 and filters/learns spams using an advanced Bayesian statistical
43 approach (based on Baye's theorem of combined probabilities) which
44 provides an administratively maintenance-free, easy-learning Anti-Spam
45 service custom tailored to each individual user's behavior. Advanced
46 because on top of standard Bayesian filtering is also incorporated the
47 use of Chained Tokens, de-obfuscation, and other enhancements. DSPAM
48 works great with Sendmail and Exim, and should work well with any
49 other MTA that supports an external local delivery agent (postfix,
53 Summary: Development library and header files for the %{name} library
54 Group: Development/Libraries
55 Requires: %{name}-libs = %{version}-%{release}
58 DSPAM has had its core engine moved into a separate library, libdspam.
59 This library can be used by developers to provide 'drop-in' spam
60 filtering for their mail client applications, other anti-spam tools,
68 --enable-trusted-user-security \
69 --enable-bayesian-dobly \
70 --enable-chained-tokens \
71 --enable-neural-networking \
72 --enable-experimental \
73 --enable-signature-attachments \
75 --enable-large-scale \
76 --enable-delivery-to-stdout \
77 --enable-virtual-users \
78 --with-userdir=/var/lib/%{name} \
79 --with-userdir-owner=none \
80 --with-userdir-group=none \
81 --with-dspam-owner=none \
82 --with-dspam-group=none \
83 --with-signature-life=14 \
84 --disable-dependency-tracking \
85 --enable-virtual-users \
86 --with-storage-driver=mysql_drv \
87 --with-mysql-includes=%{_includedir}/mysql \
88 --with-mysql-libraries=%{_libdir}/mysql \
92 rm -rf $RPM_BUILD_ROOT
97 install -d %{buildroot}%{_includedir}/%{name}
98 install -m0644 libdspam.h %{buildroot}%{_includedir}/%{name}/
99 install -m0644 libdspam_objects.h %{buildroot}%{_includedir}/%{name}/
100 install -m0644 lht.h %{buildroot}%{_includedir}/%{name}/
101 install -m0644 nodetree.h %{buildroot}%{_includedir}/%{name}/
103 # provide maintenance scripts
104 install -d %{buildroot}%{_sysconfdir}/cron.daily
105 install -d %{buildroot}%{_sysconfdir}/cron.weekly
107 cat > %{buildroot}%{_sysconfdir}/cron.daily/%{name} <<EOF
109 exec %{_bindir}/%{name}_clean 2>&1 > /dev/null
112 chmod 755 %{buildroot}%{_sysconfdir}/cron.daily/%{name}
115 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" %{buildroot}%{_bindir}/%{name}_corpus
116 perl -pi -e "s|%{_prefix}/local|%{_prefix}|g" cgi/dspam.cgi
118 cp tools.mysql_drv/README README.mysql
121 install -m0755 dspam-cron.weekly %{buildroot}%{_sysconfdir}/cron.weekly/%{name}
124 install -d %{buildroot}/var/lib/%{name}
125 cat > %{buildroot}/var/lib/%{name}/mysql.data <<EOF
130 This file can only contain 5 lines with the following values:
139 %post libs -p /sbin/ldconfig
140 %postun libs -p /sbin/ldconfig
143 [ "%{buildroot}" != "/" ] && rm -rf %{buildroot}
146 %defattr(644,root,root,755)
148 %doc cgi/base.css cgi/dspam.cgi cgi/logo.gif cgi/template.html
150 %doc tools.mysql_drv/mysql_objects.sql.space.optimized
151 %doc tools.mysql_drv/mysql_objects.sql.speed.optimized
152 %doc tools.mysql_drv/purge.sql
153 %doc tools.mysql_drv/virtual_users.sql
154 %dir %attr(0750,root,mail) /var/lib/%{name}
155 %attr(0640,root,mail) %config(noreplace) /var/lib/%{name}/mysql.data
156 %attr(0755,root,root) %config(noreplace) %{_sysconfdir}/cron.daily/%{name}
157 %attr(0755,root,root) %config(noreplace) %{_sysconfdir}/cron.weekly/%{name}
158 %attr(0755,root,mail) %{_bindir}/%{name}
159 %attr(0755,root,root) %{_bindir}/%{name}_clean
160 %attr(0755,root,root) %{_bindir}/%{name}_corpus
161 %attr(0755,root,root) %{_bindir}/%{name}_crc
162 %attr(0755,root,root) %{_bindir}/%{name}_dump
163 %attr(0755,root,root) %{_bindir}/%{name}_genaliases
164 %attr(0755,root,root) %{_bindir}/%{name}_stats
165 %attr(0755,root,root) %{_bindir}/%{name}_merge
166 %attr(0755,root,root) %{_bindir}/%{name}_2mysql
167 %attr(0755,root,root) %{_bindir}/%{name}_ngstats
170 %defattr(644,root,root,755)
172 %attr(0755,root,root) %{_libdir}/*.so.*
175 %defattr(644,root,root,755)
176 %attr(0644,root,root) %{_includedir}/%{name}/*.h
177 %attr(0755,root,root) %{_libdir}/*.so
178 %attr(0644,root,root) %{_libdir}/*.la
179 %attr(0755,root,root) %{_libdir}/*.a