2 # - build lib{,ssl}spamc.so (if there is a point)
5 %bcond_without tests # perform "make test"
7 %include /usr/lib/rpm/macros.perl
9 %define pnam SpamAssassin
10 Summary: A spam filter for email which can be invoked from mail delivery agents
11 Summary(pl): Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
15 License: Apache Software License v2
16 Group: Applications/Mail
17 Source0: http://www.apache.net.pl/spamassassin/source/Mail-SpamAssassin-%{version}.tar.bz2
18 # Source0-md5: 77242e45baa7e2b418e4d3f22a86a69e
19 Source1: %{name}.sysconfig
20 Source2: %{name}-spamd.init
21 URL: http://spamassassin.apache.org/
22 BuildRequires: openssl-devel >= 0.9.7d
23 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16
24 BuildRequires: perl-Archive-Tar
25 BuildRequires: perl-DBI
26 BuildRequires: perl-DB_File
27 BuildRequires: perl-Digest-SHA1 >= 2.10
28 BuildRequires: perl-HTML-Parser >= 3
29 BuildRequires: perl-IO-Socket-INET6 >= 2.51
30 BuildRequires: perl-IO-Socket-SSL
31 BuildRequires: perl-IO-Zlib
32 BuildRequires: perl-IP-Country
33 BuildRequires: perl-Mail-SPF-Query
34 BuildRequires: perl-Net-DNS
35 BuildRequires: perl-Net-Ident
36 #BuildRequires: perl-Razor2
37 BuildRequires: perl-devel >= 1:5.8.0
38 BuildRequires: perl-libwww
39 BuildRequires: rpmbuild(macros) >= 1.310
41 # are these really needed?
42 BuildRequires: perl-MIME-Base64
43 BuildRequires: perl-MIME-tools
44 BuildRequires: perl-MailTools
46 BuildRequires: rpm-perlprov >= 4.1-13
47 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
48 Requires: perl-IO-Socket-SSL
49 Obsoletes: SpamAssassin
50 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 %define _noautoreq 'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)' 'perl(Net::Ident)'
55 SpamAssassin provides you with a way to reduce if not completely
56 eliminate Unsolicited Commercial Email (SPAM) from your incoming
57 email. It can be invoked by a MDA such as sendmail or postfix, or can
58 be called from a procmail script, .forward file, etc. It uses a
59 genetic-algorithm evolved scoring system to identify messages which
60 look spammy, then adds headers to the message so they can be filtered
61 by the user's mail reading software. This distribution includes the
62 spamd/spamc components which create a server that considerably speeds
66 SpamAssassin daje mo¿liwo¶æ zredukowania, je¶li nie kompletnego
67 wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
68 Commercial Email, spamu) z poczty. Mo¿e byæ wywo³ywany z MDA, np.
69 Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. U¿ywa ogólnego
70 algorytmu oceniania w celu identyfikacji wiadomo¶ci, które wygl±daj±
71 na SPAM, po czym dodaje nag³ówki do wiadomo¶ci, umo¿liwiaj±c
72 filtrowanie przez oprogramowanie u¿ytkownika. Ta dystrybucja zawiera
73 programy spamd/spamc, umo¿liwiaj±ce uruchomienie serwera, co znacznie
74 przyspieszy proces przetwarzania poczty.
77 Summary: Miscleanous tools for SpamAssassin
78 Summary(pl): Przeró¿ne narzêdzia zwi±zane z SpamAssassin
79 Group: Applications/Mail
80 Obsoletes: SpamAssassin-tools
83 Miscleanous tools from various authors, distributed with SpamAssassin.
84 See /usr/share/doc/spamassassin-tools-*/.
86 %description tools -l pl
87 Przeró¿ne narzêdzia, dystrybuowane razem ze SpamAssassinem. Wiêcej
88 informacji w /usr/share/doc/spamassassin-tools-*/.
91 Summary: spamd - daemonized version of spamassassin
92 Summary(pl): spamd - spamassassin w postaci demona
93 Group: Applications/Mail
94 Requires(post,preun): /sbin/chkconfig
95 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
99 The purpose of this program is to provide a daemonized version of the
100 spamassassin executable. The goal is improving throughput performance
101 for automated mail checking.
103 This is intended to be used alongside "spamc", a fast, low-overhead C
106 %description spamd -l pl
107 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
108 poprawa wydajno¶ci automatycznego sprawdzania poczty.
110 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
111 wydajnym programem klienckim.
114 Summary: spamc - client for spamd
115 Summary(pl): spamc - klient dla spamd
116 Group: Applications/Mail
119 Spamc is the client half of the spamc/spamd pair. It should be used in
120 place of "spamassassin" in scripts to process mail. It will read the
121 mail from STDIN, and spool it to its connection to spamd, then read
122 the result back and print it to STDOUT. Spamc has extremely low
123 overhead in loading, so it should be much faster to load than the
124 whole spamassassin program.
126 %description spamc -l pl
127 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
128 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
129 nastêpnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
130 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
131 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
134 Summary: sa-update - automate SpamAssassin rule updates
135 Summary(pl): sa-update - automatyczne uaktualnianie regu³ek SpamAssassina
136 Group: Applications/Mail
138 Requires: perl-Archive-Tar
139 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
142 sa-update automates the process of downloading and installing new
143 rules and configuration, based on channels. The default channel is
144 updates.spamassassin.org, which has updated rules since the previous
147 Update archives are verified by default using SHA1 hashes and GPG
150 %description update -l pl
151 sa-update automatyzuje proces ¶ci±gania i instalowania nowych regu³ek
152 i konfiguracji w oparciu o kana³y. Domy¶lny kana³ to
153 updates.spamassassin.org, który ma uaktualnione regu³ki od czasu
154 poprzedniego wydania.
156 Archiwa uaktualnieñ s± sprawdzane domy¶lnie przy u¿yciu skrótów SHA1 i
159 %package -n perl-Mail-SpamAssassin
160 Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
161 Summary(pl): Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
162 Group: Development/Languages/Perl
163 Requires: perl-Cache-DB_File >= 0.2
164 Requires: perl-HTML-Parser >= 3
165 Requires: perl-IO-Socket-INET6 >= 2.51
166 Requires: perl-Mail-SPF-Query
167 Requires: perl-Sys-Hostname-Long
168 Conflicts: perl-Net-DNS < 0.50
170 %description -n perl-Mail-SpamAssassin
171 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
172 analysis and several internet-based realtime blacklists. Using its
173 rule base, it uses a wide range of heuristic tests on mail headers and
174 body text to identify ``spam'', also known as unsolicited commercial
175 email. Once identified, the mail can then be optionally tagged as spam
176 for later filtering using the user's own mail user-agent application.
178 %description -n perl-Mail-SpamAssassin -l pl
179 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
180 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
181 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
182 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
183 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
184 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
185 aplikacji do czytania poczty.
188 %setup -q -n %{pdir}-%{pnam}-%{version}
191 # for spamc/configure
192 export CFLAGS="%{rpmcflags}"
193 %{__perl} Makefile.PL \
196 SYSCONFDIR=%{_sysconfdir} \
198 CONTACT_ADDRESS="postmaster@localhost" \
199 PERL_BIN=%{__perl} < /dev/null
202 OPTIMIZE="%{rpmcflags}"
204 %{?with_tests:%{__make} test}
207 rm -rf $RPM_BUILD_ROOT
208 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
211 DESTDIR=$RPM_BUILD_ROOT
213 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
214 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
217 install -d $RPM_BUILD_ROOT/var/lib/spamassassin/$(printf %d.%03d%03d $(echo %{version} | tr '.' ' '))
218 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys
219 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys/{pubring,secring,trustdb}.gpg
221 rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*}
224 rm -rf $RPM_BUILD_ROOT
227 /sbin/chkconfig --add spamd
228 %service spamd restart
231 if [ "$1" = "0" ]; then
233 /sbin/chkconfig --del spamd
236 %triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
237 # temp hack, should we care of the dead link?
238 ln -s spamd /etc/rc.d/init.d/spamassassin
239 /sbin/chkconfig --del spamassassin
240 rm -f /etc/rc.d/init.d/spamassassin
241 if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
242 mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
246 %defattr(644,root,root,755)
247 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
248 %doc procmailrc.example
249 %attr(755,root,root) %{_bindir}/sa-learn
250 %attr(755,root,root) %{_bindir}/spamassassin
251 # It's needed for help of spamassassin command.
252 %{perl_vendorlib}/spamassassin-run.pod
253 %{_mandir}/man1/sa-learn*
254 %{_mandir}/man1/spamassassin*
257 %defattr(644,root,root,755)
258 %doc sql ldap tools masses contrib
261 %defattr(644,root,root,755)
263 %attr(754,root,root) /etc/rc.d/init.d/spamd
264 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
265 %attr(755,root,root) %{_bindir}/spamd
266 %{_mandir}/man1/spamd*
269 %defattr(644,root,root,755)
270 %attr(755,root,root) %{_bindir}/spamc
271 %{_mandir}/man1/spamc*
274 %defattr(644,root,root,755)
275 %attr(700,root,root) %dir %{_sysconfdir}/mail/spamassassin/sa-update-keys
276 %attr(700,root,root) %ghost %{_sysconfdir}/mail/spamassassin/sa-update-keys/*
277 %attr(755,root,root) %{_bindir}/sa-update
278 %{_datadir}/spamassassin/sa-update-pubkey.txt
279 %dir /var/lib/spamassassin
280 %dir /var/lib/spamassassin/*
281 %{_mandir}/man1/sa-update*
283 %files -n perl-Mail-SpamAssassin
284 %defattr(644,root,root,755)
285 %doc sample-nonspam.txt sample-spam.txt
286 %dir %{_sysconfdir}/mail/spamassassin
287 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.pre
288 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*.cf
289 %exclude %{_sysconfdir}/mail/spamassassin/sa-update-keys
291 %dir %{_datadir}/spamassassin
292 %config(noreplace) %{_datadir}/spamassassin/*
293 %exclude %{_datadir}/spamassassin/sa-update-pubkey.txt
295 %{perl_vendorlib}/Mail/*