2 # - build lib{,ssl}spamc.so (if there is a point)
3 # - ATTN: http://issues.apache.org/SpamAssassin/show_bug.cgi?id=5058
6 %bcond_without tests # perform "make test"
8 %include /usr/lib/rpm/macros.perl
10 %define pnam SpamAssassin
11 Summary: A spam filter for email which can be invoked from mail delivery agents
12 Summary(pl): Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
16 License: Apache Software License v2
17 Group: Applications/Mail
18 Source0: http://www.apache.org/dist/spamassassin/source/%{pdir}-%{pnam}-%{version}.tar.bz2
19 # Source0-md5: c620b0a20791999a8f8091b0888e0195
20 Source1: %{name}.sysconfig
21 Source2: %{name}-spamd.init
22 URL: http://spamassassin.apache.org/
23 BuildRequires: openssl-devel >= 0.9.7d
24 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16
25 BuildRequires: perl-Archive-Tar
26 BuildRequires: perl-DBI
27 BuildRequires: perl-DB_File
28 BuildRequires: perl-Digest-SHA1 >= 2.10
29 BuildRequires: perl-HTML-Parser >= 3
30 BuildRequires: perl-IO-Socket-INET6 >= 2.51
31 BuildRequires: perl-IO-Socket-SSL
32 BuildRequires: perl-IO-Zlib
33 BuildRequires: perl-IP-Country
34 BuildRequires: perl-Mail-SPF-Query
35 BuildRequires: perl-Net-DNS
36 BuildRequires: perl-Net-Ident
37 #BuildRequires: perl-Razor2
38 BuildRequires: perl-devel >= 1:5.8.0
39 BuildRequires: perl-libwww
40 BuildRequires: rpmbuild(macros) >= 1.310
42 # are these really needed?
43 BuildRequires: perl-MIME-Base64
44 BuildRequires: perl-MIME-tools
45 BuildRequires: perl-MailTools
47 BuildRequires: rpm-perlprov >= 4.1-13
48 Requires: perl-Mail-SpamAssassin = %{version}-%{release}
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 %{__perl} Makefile.PL \
194 SYSCONFDIR=%{_sysconfdir} \
196 CONTACT_ADDRESS="postmaster@localhost" \
197 PERL_BIN=%{__perl} < /dev/null
200 OPTIMIZE="%{rpmcflags}"
202 %{?with_tests:%{__make} test}
205 rm -rf $RPM_BUILD_ROOT
206 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
209 DESTDIR=$RPM_BUILD_ROOT
211 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamd
212 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamd
215 install -d $RPM_BUILD_ROOT/var/lib/spamassassin/$(printf %d.%03d%03d $(echo %{version} | tr '.' ' '))
216 install -d $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys
217 touch $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/sa-update-keys/{pubring,secring,trustdb}.gpg
219 rm -f $RPM_BUILD_ROOT{%{perl_archlib}/perllocal.pod,%{perl_vendorarch}/auto/Mail/SpamAssassin/.packlist,%{_mandir}/man3/spamassassin-run.*}
220 rm -f $RPM_BUILD_ROOT%{perl_vendorlib}/spamassassin-run.pod
223 rm -rf $RPM_BUILD_ROOT
226 /sbin/chkconfig --add spamd
227 %service spamd restart
230 if [ "$1" = "0" ]; then
232 /sbin/chkconfig --del spamd
235 %triggerpostun spamd -- spamassassin-spamd < 3.1.0-5.3
236 # temp hack, should we care of the dead link?
237 ln -s spamd /etc/rc.d/init.d/spamassassin
238 /sbin/chkconfig --del spamassassin
239 rm -f /etc/rc.d/init.d/spamassassin
240 if [ -f /etc/sysconfig/spamassassin.rpmsave ]; then
241 mv -f /etc/sysconfig/spamassassin.rpmsave /etc/sysconfig/spamd
245 %defattr(644,root,root,755)
246 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
247 %doc procmailrc.example
248 %attr(755,root,root) %{_bindir}/sa-learn
249 %attr(755,root,root) %{_bindir}/spamassassin
250 %{_mandir}/man1/sa-learn*
251 %{_mandir}/man1/spamassassin*
254 %defattr(644,root,root,755)
255 %doc sql ldap tools masses contrib
258 %defattr(644,root,root,755)
260 %attr(754,root,root) /etc/rc.d/init.d/spamd
261 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/spamd
262 %attr(755,root,root) %{_bindir}/spamd
263 %{_mandir}/man1/spamd*
266 %defattr(644,root,root,755)
267 %attr(755,root,root) %{_bindir}/spamc
268 %{_mandir}/man1/spamc*
271 %defattr(644,root,root,755)
272 %attr(700,root,root) %dir %{_sysconfdir}/mail/spamassassin/sa-update-keys
273 %attr(700,root,root) %ghost %{_sysconfdir}/mail/spamassassin/sa-update-keys/*
274 %attr(755,root,root) %{_bindir}/sa-update
275 %{_datadir}/spamassassin/sa-update-pubkey.txt
276 %dir /var/lib/spamassassin
277 %dir /var/lib/spamassassin/*
278 %{_mandir}/man1/sa-update*
280 %files -n perl-Mail-SpamAssassin
281 %defattr(644,root,root,755)
282 %doc sample-nonspam.txt sample-spam.txt
283 %dir %{_sysconfdir}/mail/spamassassin
284 %attr(600,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/mail/spamassassin/*
285 %exclude %{_sysconfdir}/mail/spamassassin/sa-update-keys
286 %dir %{_datadir}/spamassassin
287 %config(noreplace) %{_datadir}/spamassassin/*
288 %exclude %{_datadir}/spamassassin/sa-update-pubkey.txt
289 %{perl_vendorlib}/Mail/*