3 %bcond_with tests # perform "make test"
4 %bcond_without prefork # don't apply prefork patch inspired by apache
6 %include /usr/lib/rpm/macros.perl
8 %define pnam SpamAssassin
9 Summary: A spam filter for email which can be invoked from mail delivery agents
10 Summary(pl): Filtr antyspamowy, przeznaczony dla programów dostarczaj±cych pocztê (MDA)
14 License: Apache Software License v2
15 Group: Applications/Mail
16 Source0: http://www.apache.org/dist/spamassassin/%{pdir}-%{pnam}-%{version}.tar.bz2
17 # Source0-md5: 83f60f97c823d9b8df19309247fe33eb
18 Source1: %{name}.sysconfig
19 Source2: %{name}-spamd.init
20 Patch0: %{name}-prefork.patch
21 URL: http://spamassassin.apache.org/
22 BuildRequires: openssl-devel >= 0.9.7d
23 BuildRequires: perl-devel >= 1:5.8.0
24 BuildRequires: perl(ExtUtils::MakeMaker) >= 6.16
25 BuildRequires: perl-Digest-SHA1 >= 2.10
27 BuildRequires: perl-HTML-Parser >= 3
28 # are these really needed?
29 BuildRequires: perl-MailTools
30 BuildRequires: perl-MIME-Base64
31 BuildRequires: perl-MIME-tools
33 BuildRequires: rpm-perlprov >= 4.1-13
34 Requires: perl-Mail-SpamAssassin >= %{version}
35 Obsoletes: SpamAssassin
36 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38 %define _noautoreq 'perl(Razor2::Client::Agent)' 'perl(Razor::Agent)' 'perl(Razor::Client)' 'perl(DBI)'
41 SpamAssassin provides you with a way to reduce if not completely
42 eliminate Unsolicited Commercial Email (SPAM) from your incoming
43 email. It can be invoked by a MDA such as sendmail or postfix, or can
44 be called from a procmail script, .forward file, etc. It uses a
45 genetic-algorithm evolved scoring system to identify messages which
46 look spammy, then adds headers to the message so they can be filtered
47 by the user's mail reading software. This distribution includes the
48 spamd/spamc components which create a server that considerably speeds
52 SpamAssassin daje mo¿liwo¶æ zredukowania, je¶li nie kompletnego
53 wyeliminowania niezamawianej komercyjnej poczty (Unsolicited
54 Commercial Email, spamu) z poczty. Mo¿e byæ wywo³ywany z MDA, np.
55 Sendmaila czy Postfiksa, lub z pliku ~/.forward itp. U¿ywa ogólnego
56 algorytmu oceniania w celu identyfikacji wiadomo¶ci, które wygl±daj±
57 na SPAM, po czym dodaje nag³ówki do wiadomo¶ci, umo¿liwiaj±c
58 filtrowanie przez oprogramowanie u¿ytkownika. Ta dystrybucja zawiera
59 programy spamd/spamc, umo¿liwiaj±ce uruchomienie serwera, co znacznie
60 przyspieszy proces przetwarzania poczty.
63 Summary: Miscleanous tools for SpamAssassin
64 Summary(pl): Przeró¿ne narzêdzia zwi±zane z SpamAssassin
65 Group: Applications/Mail
66 Obsoletes: SpamAssassin-tools
69 Miscleanous tools from various authors, distributed with SpamAssassin.
70 See /usr/share/doc/spamassassin-tools-*/.
72 %description tools -l pl
73 Przeró¿ne narzêdzia, dystrybuowane razem ze SpamAssassinem. Wiêcej
74 informacji w /usr/share/doc/spamassassin-tools-*/.
77 Summary: spamd - daemonized version of spamassassin
78 Summary(pl): spamd - spamassassin w postaci demona
79 Group: Applications/Mail
81 Requires(post,preun): /sbin/chkconfig
84 The purpose of this program is to provide a daemonized version of the
85 spamassassin executable. The goal is improving throughput performance
86 for automated mail checking.
88 This is intended to be used alongside "spamc", a fast, low-overhead C
91 %description spamd -l pl
92 Spamd jest "demoniczn±" wersj± spamassassina. Jego zadaniem jest
93 poprawa wydajno¶ci automatycznego sprawdzania poczty.
95 Spamd powinien byæ u¿ywany wespó³ ze "spamc", który jest szybkim i
96 wydajnym programem klienckim.
99 Summary: spamc - client for spamd
100 Summary(pl): spamc - klient dla spamd
101 Group: Applications/Mail
104 Spamc is the client half of the spamc/spamd pair. It should be used in
105 place of "spamassassin" in scripts to process mail. It will read the
106 mail from STDIN, and spool it to its connection to spamd, then read
107 the result back and print it to STDOUT. Spamc has extremely low
108 overhead in loading, so it should be much faster to load than the
109 whole spamassassin program.
111 %description spamc -l pl
112 Spamc powinien byæ u¿ywany zamiast "spamassassina" w skryptach
113 przetwarzaj±cych pocztê. Zczytuje pocztê ze STDIN, kolejkuje j± a
114 nastêpnie przekazuje spamdowi, odczytuje wynik i podaje go na STDOUT.
115 Spamc stara siê nie obci±¿aæ zbytnio procesora podczas ³adowania,
116 dziêki czemu powinien dzia³aæ szybciej ni¿ sam spamassassin.
118 %package -n perl-Mail-SpamAssassin
119 Summary: Mail::SpamAssassin - SpamAssassin e-mail filter libraries
120 Summary(pl): Mail::SpamAssassin - biblioteki filtra poczty SpamAssassin
121 Group: Development/Languages/Perl
122 Requires: perl-HTML-Parser >= 3
123 Requires: perl-Cache-DB_File >= 0.2
125 %description -n perl-Mail-SpamAssassin
126 Mail::SpamAssassin is a Mail::Audit plugin to identify spam using text
127 analysis and several internet-based realtime blacklists. Using its
128 rule base, it uses a wide range of heuristic tests on mail headers and
129 body text to identify ``spam'', also known as unsolicited commercial
130 email. Once identified, the mail can then be optionally tagged as spam
131 for later filtering using the user's own mail user-agent application.
133 %description -n perl-Mail-SpamAssassin -l pl
134 Mail::SpamAssassin jest pluginem dla Mail::Audit, s³u¿±cym do
135 identyfikacji spamu przy u¿yciu analizy zawarto¶ci i/lub internetowych
136 czarnych list. Do zidentyfikowania jako ,,spam'' stosuje szeroki
137 zakres testów heurystycznych na nag³ówkach i tre¶ci, posi³kuj±c siê
138 stworzon± wcze¶niej baz± regu³. Po zidentyfikowaniu, poczta mo¿e byæ
139 oznaczona jako spam w celu pó¼niejszego wyfiltrowania, np. przy u¿yciu
140 aplikacji do czytania poczty.
143 %setup -q -n %{pdir}-%{pnam}-%{version}
144 %{?with_prefork:%patch0 -p0}
147 echo "postmaster@localhost" | \
148 %{__perl} Makefile.PL \
151 SYSCONFDIR=%{_sysconfdir} \
157 OPTIMIZE="%{rpmcflags}"
159 %{?with_tests:%{__make} test}
162 rm -rf $RPM_BUILD_ROOT
163 install -d $RPM_BUILD_ROOT{/etc/{sysconfig,rc.d/init.d},%{_sysconfdir}/mail/spamassassin}
166 DESTDIR=$RPM_BUILD_ROOT
168 install %{SOURCE1} $RPM_BUILD_ROOT/etc/sysconfig/spamassassin
170 # shouldn't this script be called `spamd' instead?
171 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/spamassassin
173 rm -f spamd/{*.sh,*.conf,spam*} contrib/snp.tar.gz
176 rm -rf $RPM_BUILD_ROOT
179 /sbin/chkconfig --add spamassassin
180 if [ -f /var/lock/subsys/spamd ]; then
181 /etc/rc.d/init.d/spamassassin restart 1>&2
183 echo 'Run "/etc/rc.d/init.d/spamassassin start" to start the spamd daemon.'
187 if [ "$1" = "0" ]; then
188 if [ -f /var/lock/subsys/spamd ]; then
189 /etc/rc.d/init.d/spamassassin stop 1>&2
191 /sbin/chkconfig --del spamassassin
195 %defattr(644,root,root,755)
196 %doc BUGS CREDITS Changes INSTALL README STATUS TRADEMARK UPGRADE USAGE
197 %doc procmailrc.example sample*.txt
198 %attr(755,root,root) %{_bindir}/sa-learn
199 %attr(755,root,root) %{_bindir}/spamassassin
200 %{_mandir}/man1/sa-learn*
201 %{_mandir}/man1/spamassassin*
204 %defattr(644,root,root,755)
205 %doc sql tools masses contrib
208 %defattr(644,root,root,755)
210 %attr(754,root,root) /etc/rc.d/init.d/spamassassin
211 %attr(600,root,root) %config(noreplace) /etc/sysconfig/spamassassin
212 %attr(755,root,root) %{_bindir}/spamd
213 %{_mandir}/man1/spamd*
216 %defattr(644,root,root,755)
217 %attr(755,root,root) %{_bindir}/spamc
218 %{_mandir}/man1/spamc*
220 %files -n perl-Mail-SpamAssassin
221 %defattr(644,root,root,755)
222 %doc sample-nonspam.txt sample-spam.txt
223 %dir %{_sysconfdir}/mail/spamassassin
224 %config(noreplace) %{_sysconfdir}/mail/spamassassin/*
225 %dir %{_datadir}/spamassassin
226 %config(noreplace) %{_datadir}/spamassassin/*
227 %{perl_vendorlib}/Mail/*